We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25883
    • 128 Posts
    s9consulting Reply #1, 18 years ago
    Hello -


    I have a client who has seven separate logins to manage his store. (MODx, FoxyCart, Quantum Gateway, Merchant Account, Gmail for Business, Supplier, and FedEx.)


    I want to place all these links on one page for him.


    He doesn’t need a Wiki (yet)... and to avoid confusing him further I don’t want to have to make him log in from the front end of MODx to access a password-protected area.


    So I would like to place this page with links, somewhere easily accessible in the Manager/Admin area of his MODx site.


    What do you suggest? I would like for this to appear in any of these places:

    (1) A new green tab in line with Site/Resources/Tools, etc. -or-
    (2) Right on the first viewable page at Site > Home under the "Welcome to the MODx Content Manager" graphics.


    What would be the easiest option and where would I go to access it to code it?

    I can hard code this - he doesn’t need to have it editable.



    Thanks!

    John



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can very easily add a line with all the links you want to the Welcome page.

      There are two ways you can accomplish this. The easiest is to simply hand-code the extra links in the manager/media/style/MODxLight/welcome.html file after line 69 (where the linebreaks are set before the MessageInfo placeholder):
                          <td valign="top">
                              <span class="wm_button" style="border:0">[+SecurityIcon+]</span>
                              <span class="wm_button" style="border:0">[+WebUserIcon+]</span>
                              <span class="wm_button" style="border:0">[+ModulesIcon+]</span>
                              <span class="wm_button" style="border:0">[+ResourcesIcon+]</span>
                              <span class="wm_button" style="border:0">[+BackupIcon+]</span>
                              <br style="clear:both" /><br />
                              <span class="wm_button" style="border:0"><a href="../">Home</a></span>
                                         ********** more links *************
                              <br style="clear:both" /><br />
                              [+MessageInfo+]
                          </td>
      

      Or, if you want to do it the hard way, you can edit the actual core welcome file.

      In manager/actions/welcome.static.php around line 32 you’ll see where the existing icons/links are set up. Follow the pattern, setting placeholders as the original does, to add your own links (with or without icons).

      Then, in manager/media/style/MODxLight/welcome.html you’ll see beginning with line 15, then again with line 63, where to add these new placeholders to the welcome template.
        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
        • 7231
        • 4,205 Posts
        There is a tutorial in the wiki: http://wiki.modxcms.com/index.php/Customizing_the_Manager_Homepage

        I always add custom links to the welcome page, stuff like shortcuts to add articles or to a specific module. You can also add a new tab in the welcome page with custom links.

        Another option is to create a module with all of the links.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 25883
          • 128 Posts
          s9consulting Reply #4, 18 years ago
          Thanks! Great explanation, I appreciate it!

          John
            • 3749
            • 24,544 Posts
            Whichever method you use, I’d put the links in a chunk so it’s easy for you to change it.

            The quick and dirty way, IMO, would be to edit the code in /manager/actions/welcom.static.php in the "setup message info" section to add your chunk to the $msg variable. Remember, though, that you’ll have to redo your changes every time you upgrade MODx.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 7231
              • 4,205 Posts
              Remember, though, that you’ll have to redo your changes every time you upgrade MODx.
              Only if you are using one of the default manager themes. Duplicate the theme and rename it, then when you upgrade it will not be overwritten.

              Also if you use a module it will not be overwritten. wink
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 3749
                • 24,544 Posts
                Good point. I’m lazy and usually use the default theme. wink
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 25883
                  • 128 Posts
                  s9consulting Reply #8, 18 years ago
                  Thanks for all the help guys.

                  I tried Susan’s two ways of doing it and ran into walls with not knowing the right php syntax to do much.

                  I’m trying Bob’s quick and easy method and at least I can get text to show, but, lol, this isn’t pretty. My chunk won’t work.




                  Here’s where I tried to place the chunk:


                  // setup message info
                  if($modx->hasPermission(’messages’)) {
                  $msg = ’{{managerCode}}
                  <a href="index.php?a=10"><img src="media/style/[+theme+]/images/icons/mail_generic.gif" /></a>
                  <span style="color:#909090;font-size:15px;font-weight:bold">&nbsp;’.$_lang["inbox"].($_SESSION[’nrnewmessages’]>0 ? " (<span

                  style=’color:red’>".$_SESSION[’nrnewmessages’]."</span>)":"").’</span>

                  <span class="comment">’.sprintf($_lang["welcome_messages"], $_SESSION[’nrtotalmessages’], "<span style=’color:red;’>".$_SESSION

                  [’nrnewmessages’]."</span>").’</span>’;
                  $modx->setPlaceholder(’MessageInfo’,$msg);

                  }
                    • 4041
                    • 788 Posts
                    Instead of using a chunk call: {{managerCode}}, you’ll have to add the straight html link codes in that spot.

                    None of the backend manager pages goes through the document parser so its just hard coding smiley
                      xforum
                      http://frsbuilders.net (under construction) forum for evolution
                      • 25883
                      • 128 Posts
                      Thanks Breezer!

                      Off to hammer out some code with Textile. smiley