Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Home tab

  1. #1
    timolein is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    51

    Default Home tab

    Is there quick solution to remove HOME tab ? My customer want´s it gone.

    Admin, Configure Tabs I try to Hide HOME tab, but it keeps displaying ?

    So what file to edit ?

    Thanks

  2. #2
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: Home tab

    Hi
    Go to themes\”your theme” \header.php
    And customize the header.php file.

  3. #3
    shailendra001's Avatar
    shailendra001 is offline A Prolific Poster
    Join Date
    Oct 2008
    Location
    Bangalore India
    Posts
    255

    Default Re: Home tab

    Hi
    Edit include/modules.php
    find line
    $moduleList[] = 'Home';

    replace with //$moduleList[] = 'Home';


    Quote Originally Posted by timolein View Post
    Is there quick solution to remove HOME tab ?

    So what file to edit ?

    Regards
    Shailendra

  4. #4
    timolein is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    51

    Default Re: Home tab

    Thanks for quick reply shailendra001!

    I did the following, but I still got Home tab ?

    Tpl

  5. #5
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Home tab

    Quote Originally Posted by shailendra001 View Post
    Hi
    Edit include/modules.php
    find line
    $moduleList[] = 'Home';

    replace with //$moduleList[] = 'Home';





    Regards
    Shailendra
    This definitely do not work and also this is not upgrade safe.

    Create a php script inside custom/Extension/application/Ext/Include/ containing something like that:

    PHP Code:
    <?php
    foreach($moduleList as $id => $module) {
        if(
    $module == 'Home') {
            unset(
    $moduleList[$id]);
        }
    }

    $modInvisList[] = 'Home';
    ?>
    Go to Admin -> Repair -> Rebuild Extensions
    Make sure the file custom/application/Ext/Include/modules.ext.php had been updated with these lines.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  6. #6
    shailendra001's Avatar
    shailendra001 is offline A Prolific Poster
    Join Date
    Oct 2008
    Location
    Bangalore India
    Posts
    255

    Default Re: Home tab

    Hi andopes!
    Thanks for positive response , this will greatly help me to improve .
    I am trying to write a module for that i have simply chosen these directory for my module 'Travel'

    modules/travels
    modules/travels/index.php
    modules/travel/language/en_us.lang.php
    modules/travels/Forms.php

    I have added module name in
    include/module.php
    $moduleList[] ='travels';

    is my way of writing is correct ,is this upgrade safe
    please guide

    Regards
    Shailendra

  7. #7
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Home tab

    It is not upgrade safe and it will not work as you had defined.

    include/modules.php is a core file and SHOULD NOT BE EDITED unless you have a really good reason for that.
    custom/Extension/application/Ext/Include/some_script.php is the correct place to extends include/modules.php
    It seems you do not want to get the Travel module visible on module tab, so you need to update the manifest.php to set the tab => false for the module.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  8. #8
    crmbalah is offline A Prolific Poster
    Join Date
    Mar 2009
    Location
    chennai
    Posts
    418

    Default Re: Home tab

    Hi
    Sample:

    Go to themes/sugar/header.php search the following code
    Code:
    foreach($preListHeader as $module_name)
        {
    	            if (!is_array($module_name)) {
    	            $xtpl->assign("MODULE_NAME", $app_list_strings['moduleList'][$module_name]);
    	            $xtpl->assign("MODULE_KEY", $module_name);
    
    	            if($module_name == $currentModule && ($module_name != 'iFrames' || empty($_REQUEST['record'])|| (!empty($_REQUEST['tab']) && $_REQUEST['tab']=='false')))
    	            {
    	                $tabClass = "currentTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "currentTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    		        else
    		        {
    		            $tabClass = "otherTab";
    		            $otherTab = "currentTab";
    		            $xtpl->assign("TAB_CLASS", "otherTab");
    		            $xtpl->assign("OTHER_TAB", "currentTab");
    		        }
               		 
               		 $xtpl->assign("LINK", '<a   class="'.$tabClass.'Link"  href="index.php?module='.$module_name.'&action=index">'.$app_list_strings['moduleList'][$module_name].'</A>');
               	
    	            } else {
    	
    	            $xtpl->assign("MODULE_NAME", $module_name[4]);
    	            $xtpl->assign("MODULE_KEY", $module_name[3]);
    
    
    	            if($module_name[3] == $currentModule && (!empty($_REQUEST['record']) and $_REQUEST['record']==$module_name[0] and !empty($_REQUEST['tab'])))
    	            {
    	                $tabClass = "currentTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "currentTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    	            else
    	            {
    	                $tabClass = "otherTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "otherTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    	            $xtpl->assign("LINK", '<a   class="'.$tabClass.'Link"  href="index.php?module='.$module_name[3].'&action=index&record='.$module_name[0].'&tab='.$module_name[2].'">'.$module_name[4].'</A>');
    	
    	            }
    
    	            if ($i==$max_tabs-1 and $numb_tabs>$max_tabs) {
    	                //$xtpl->assign("MORE", "<img src='".$image_path."more.gif' alt='' align='absmiddle' id='MoreHandle' style=' margin-left:2px; cursor: pointer; cursor: hand;' align='absmiddle' onmouseover='tbButtonMouseOver(this.id,\"\",\"\",0);'>");
    	                $xtpl->assign("MORE_HANDLE_CLASS", 'otherTab');
    	                $xtpl->parse("main.moreHandle");
    	            }
    	            $xtpl->parse("main.module_tab");
            
            	$i++;
            
        }
    And replace the this code

    Code:
    foreach($preListHeader as $module_name)
        {
              if($module_name != "Home")
              		{
    	            if (!is_array($module_name)) {
    	            $xtpl->assign("MODULE_NAME", $app_list_strings['moduleList'][$module_name]);
    	            $xtpl->assign("MODULE_KEY", $module_name);
    
    	            if($module_name == $currentModule && ($module_name != 'iFrames' || empty($_REQUEST['record'])|| (!empty($_REQUEST['tab']) && $_REQUEST['tab']=='false')))
    	            {
    	                $tabClass = "currentTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "currentTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    		        else
    		        {
    		            $tabClass = "otherTab";
    		            $otherTab = "currentTab";
    		            $xtpl->assign("TAB_CLASS", "otherTab");
    		            $xtpl->assign("OTHER_TAB", "currentTab");
    		        }
               		 
               		 $xtpl->assign("LINK", '<a   class="'.$tabClass.'Link"  href="index.php?module='.$module_name.'&action=index">'.$app_list_strings['moduleList'][$module_name].'</A>');
               	
    	            } else {
    	
    	            $xtpl->assign("MODULE_NAME", $module_name[4]);
    	            $xtpl->assign("MODULE_KEY", $module_name[3]);
    
    
    	            if($module_name[3] == $currentModule && (!empty($_REQUEST['record']) and $_REQUEST['record']==$module_name[0] and !empty($_REQUEST['tab'])))
    	            {
    	                $tabClass = "currentTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "currentTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    	            else
    	            {
    	                $tabClass = "otherTab";
    	                $otherTab = "currentTab";
    	                $xtpl->assign("TAB_CLASS", "otherTab");
    	                $xtpl->assign("OTHER_TAB", "currentTab");
    	            }
    	            $xtpl->assign("LINK", '<a   class="'.$tabClass.'Link"  href="index.php?module='.$module_name[3].'&action=index&record='.$module_name[0].'&tab='.$module_name[2].'">'.$module_name[4].'</A>');
    	
    	            }
    
    	            if ($i==$max_tabs-1 and $numb_tabs>$max_tabs) {
    	                //$xtpl->assign("MORE", "<img src='".$image_path."more.gif' alt='' align='absmiddle' id='MoreHandle' style=' margin-left:2px; cursor: pointer; cursor: hand;' align='absmiddle' onmouseover='tbButtonMouseOver(this.id,\"\",\"\",0);'>");
    	                $xtpl->assign("MORE_HANDLE_CLASS", 'otherTab');
    	                $xtpl->parse("main.moreHandle");
    	            }
    	            $xtpl->parse("main.module_tab");
            	}
            	$i++;
            
        }

    this is for all themes

  9. #9
    timolein is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    51

    Default Re: Home tab

    Thanks crmbalah!

    It worked great

    tpl

  10. #10
    timolein is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    51

    Default Re: Home tab

    hmm, okay now tab is gone, but when login, it´direct you to HOME screen ?

    When login it should go direct to accounts.

    How to do that ?

    tpl

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. I am able to see only 'HOME' tab
    By rachna01 in forum Developer Help
    Replies: 3
    Last Post: 2006-05-10, 06:50 PM
  2. Home Tab
    By jguglielmi in forum General Discussion
    Replies: 3
    Last Post: 2005-12-19, 10:39 PM
  3. home page
    By alexdepa in forum Help
    Replies: 1
    Last Post: 2005-12-14, 01:53 AM

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
  •