We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2762
    • 1,198 Posts
    I’m working on modify MODx Manager Template system to allow work together original blue/orange manager template with my MODx green template or any other manager template, without overwriting files or images.


    at this moment i had:

    modified original blue/orange template
    created 3 new images subfolder (icons,tree,misc)
    changed all links from css styles to new images subfolder

    stipped out styles and redicted image path (to new folders) in frames:
    1.php
    3.php
    3c.php
    topbar.php
    3ldr.php

    stipped out styles from:
    include/accesscontrol.inc.php

    adjusted image path in:
    action/static/welcome.static.action.php

    correct path to tabs.css in
    action/static/resources.static.action.php
    now Manage Resource points to the right path

    I’m very near to complete it.
    Everything works fine wink the only things that does’nt change when i switch from a template to another are the document tree icons.
    I’ve tried to modify dtree.js, but nothing chages sad



      Free MODx Graphic resources and Templates www.tattoocms.it
      -----------------------------------------------------

      MODx IT  www.modx.it
      -----------------------------------------------------

      bubuna.com - Web & Multimedia Design
      • 2762
      • 1,198 Posts
      Ok i found my problem:

      the file that manage tree icons is frames/3ldr.php
      I’ve tried to replace in line 121
      $output .= ’<div id="node’.$id.’" p="’.$parent.’" style="white-space: nowrap;">’.$spacer.$pad.’<img id="p’.$id.’" align="absmiddle" title="’.$_lang[’click_to_context’].’" style="cursor: pointer" src="media/images/tree/’.$icon.’.gif" width="18" height="18" .......

      with
      $output .= ’<div id="node’.$id.’" p="’.$parent.’" style="white-space: nowrap;">’.$spacer.$pad.’<img id="p’.$id.’" align="absmiddle" title="’.$_lang[’click_to_context’].’" style="cursor: pointer" src="media/style/<?php echo $manager_theme ? "$manager_theme/":""; ?>images/tree/’.$icon.’.gif" width="18" height="18" .......

      but doesn’t work, i think it’s a sintax error cause i’m not a php coder ...
      anyone can help me?
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        You don’t need the <?php...?> bit, because you’re already in a php script. Try this:

        $output .= '<div id="node'.$id.'" p="'.$parent.'" style="white-space: nowrap;">'.$spacer.$pad.'<img id="p'.$id.'" align="absmiddle" title="'.$_lang['click_to_context'].'" style="cursor: pointer" src="media/style/' . $manager_theme ? $manager_theme . ' /': '' . 'images/tree/'.$icon.'.gif" width="18" height="18" .......   
        


        It may be a little off, all those ’ and . and in and out of the quotes generally have me going for a while until I get it right. If I were doing this, I would break the $output string into three sections, use an if condition to add the $manager_theme .’/’ bit, then add on the rest of the $output in a third section:

        $output .= '<div id="node'.$id.'" p="'.$parent.'" style="white-space: nowrap;">'.$spacer.$pad.'<img id="p'.$id.'" align="absmiddle" title="'.$_lang['click_to_context'].'" style="cursor: pointer" src="media/style/';
        
        if (isset($manager_theme) && $manager_theme != '') { $output .= $manager_theme . '/'; }
        
        $output .= 'images/tree/'.$icon.'.gif" width="18" height="18" .......   
        


        Not as elegant, but a whole lot easier to see what’s going on.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 2762
          • 1,198 Posts
          Thank a lot Susan, I’ve tried the first solution, but does not work.
          icons will be replace with an ’/’
          you can see here:

          http://test.tattoocms.it/manager/

          user:guest
          guest:modxcms

          You suggest the second solution like a more clean approach?

          Thanks again wink
            Free MODx Graphic resources and Templates www.tattoocms.it
            -----------------------------------------------------

            MODx IT  www.modx.it
            -----------------------------------------------------

            bubuna.com - Web & Multimedia Design
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            It’s around there somewhere. I usually end up doing a lot of trial-and-error at this point until I get it right, and breaking everything down into separate chunks to look at makes it a lot easier.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 33337
              • 3,975 Posts
              I suggest you to keep in touch with tillda, as he seems to working on the manager too.

              http://modxcms.com/forums/index.php/topic,3396.0.html
              http://modxcms.com/forums/index.php/topic,3389.0.html

              regards,

              zi
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 5158
                • 39 Posts
                Quote from: banzai at Mar 15, 2006, 06:27 AM

                Thank a lot Susan, I’ve tried the first solution, but does not work.
                icons will be replace with an ’/’
                you can see here:

                http://test.tattoocms.it/manager/

                Hello. I just now had a look at your work on this. NICE job.
                I especially liked the black template. Do you have a copy of that
                you’d be willing to share? Again, excellent work.

                Thank you.

                --Chris H.
                  • 2762
                  • 1,198 Posts
                  Thanks chris
                  with 0.9.2 release manager themes need some mod on core files, but will work nice with next release - stay toon;)

                  I will share these themes after 0.9.5 release
                    Free MODx Graphic resources and Templates www.tattoocms.it
                    -----------------------------------------------------

                    MODx IT  www.modx.it
                    -----------------------------------------------------

                    bubuna.com - Web & Multimedia Design
                    • 5158
                    • 39 Posts
                    Ahhh, I see. Bummer. I guess I’ll just have to wait.
                    But, like they say; good things are worth waiting for. smiley

                    Thank you very much for all your hard work.

                    Take care.

                    --Chris H.