Results 1 to 4 of 4

Thread: Global Links

  1. #1
    lmiller is offline Sugar Community Member
    Join Date
    Feb 2010
    Posts
    106

    Default Global Links

    I uploaded the file globalControlLinks.php to the directory, /public_html/custom/include
    The contents of the file are this

    Code:
    <?php
     
    $sub_menu['googledocs']['weeklymaintenance'] = array(
    translate('LBL_Monthky_Maintenance', 'Sync')=>'http://spreadsheets1.google.com/ccc?key=tdbEvuB1eC3f08XPbToZiww&hl=en#gid=0');
    $sub_menu['googledocs']['onetimecontact'] = array(
    translate('LBL_One_Time_Contact', 'Sync')=>'http://spreadsheets.google.com/ccc?key=0Ai-cwXRw6xNKdFhLbkllWTQtaHR3OXVpUzhjaFEzckE&hl=en#gid=0');
     
    $global_control_links['googledocs'] = array(
    'linkinfo' => array($app_strings['LBL_Google_Docs'] => '#'),
    'submenu' => $sub_menu['googledocs']
    );

    Is this done correctly? And if it is, where do I prompt sugar to load my customization?

  2. #2
    nileshdave is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Gujarat
    Posts
    95

    Smile Re: Global Links

    Hi lmiller,

    In versions < 5.5 this is a core hack in /include/globalControlLinks.php.
    There you must edit this file directly.

    Since version 5.5 you can customize the global control links by writing an own /custom/include/globalControlLinks.php which is called at the end of /include/globalControlLinks.php.

    So you could solve your problem by writing a /custom/include/globalControlLinks.php with your code applied as above

    Hope this helps you.

    Best Regards,
    Nilesh Dave

  3. #3
    lmiller is offline Sugar Community Member
    Join Date
    Feb 2010
    Posts
    106

    Default Re: Global Links

    Version 5.2.0k (Build 5837)

    I edited the file directly, but all it did was make an arrow, that when clicked on, opens up a menu, a pretty long distance away from where you click it, so you can't ever click the links. How do you properly edit the global links in 5.2?

  4. #4
    lmiller is offline Sugar Community Member
    Join Date
    Feb 2010
    Posts
    106

    Default Re: Global Links

    Here, a few more details,

    This is the code that I added to the file that is above mentioned, as a direct edit to Sugar's Global links
    Code:
    if(!isset($global_control_links)){
     	$global_control_links = array();
    	$sub_menu = array();
     }
    if(isset( $sugar_config['disc_client']) && $sugar_config['disc_client']){
    	require_once('modules/Sync/headermenu.php');
    }
    $global_control_links['myaccount'] = array(
    'linkinfo' => array($app_strings['LBL_MY_ACCOUNT'] => 'index.php?module=Users&action=DetailView&record='.$current_user->id.''),
    'submenu' => ''
     );
    $global_control_links['employees'] = array(
    'linkinfo' => array($app_strings['LBL_EMPLOYEES']=> 'index.php?module=Employees&action=index'),
    'submenu' => ''
    );
    if (
            is_admin($current_user)
    
    
    
            
            ) $global_control_links['admin'] = array(
            
    'linkinfo' => array($app_strings['LBL_ADMIN'] => 'index.php?module=Administration&action=index'),
    'submenu' => ''
    );
    $global_control_links['training'] = array(
    'linkinfo' => array($app_strings['LBL_TRAINING'] => 'index.php?module=Home&action=TrainingPortal'),
    'submenu' => ''
     );
    $global_control_links['users'] = array(
    'linkinfo' => array($app_strings['LBL_LOGOUT'] => 'index.php?module=Users&action=Logout'),
    'submenu' => ''
    );
    $global_control_links['about'] = array('linkinfo' => array($app_strings['LNK_ABOUT'] => 'index.php?module=Home&action=About'),
    'submenu' => ''
    );
    $global_control_links['monthlymaintenance'] = array(
    'linkinfo' => array($app_strings['LBL_MONTHLY_MAINTENANCE'] => 'http://spreadsheets1.google.com/ccc?key=tdbEvuB1eC3f08XPbToZiww&hl=en#gid=0'),
    'submenu' => ''
     );
     ?>
    The last link is the one that I added, and when I upload the file, I get a new break in the Global links, where it now reads

    Welcome, Lane [ Logout ] My Account|Employees|Admin|Training|About|

    With the new | at the end, but there is no link there. Does anyone know where I'm going wrong? Without previously doing this, I mimicked one of the default global links, and input my own info, so I'd like to know where I'm messing this up.

    Thanks for the help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Remove Global links of sugar
    By akkimca in forum Help
    Replies: 11
    Last Post: 2010-07-09, 05:30 AM
  2. Global Variable
    By ishaan in forum Developer Help
    Replies: 5
    Last Post: 2009-05-23, 09:14 AM
  3. Shortcuts Menu Links Labels - Global Change?
    By erica26 in forum Developer Help
    Replies: 3
    Last Post: 2009-03-31, 11:29 PM
  4. Global dashlet changes?
    By mdbusse in forum Help
    Replies: 4
    Last Post: 2009-02-11, 06:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •