Results 1 to 5 of 5

Thread: iframes on hompage

  1. #1
    pattie is offline Senior Member
    Join Date
    Apr 2009
    Posts
    23

    Question iframes on hompage

    I'm trying to globally remove the iframes on the Homepage for Discover Sugar & Sugar News. I'm using CE and do not want my team members to see these dashlets.

    I cannot figure out how to globally remove them, I've removed them in admin, but still each users see them anyway.

    There is no specific configuration for the Home tab, nor can you remove it from view.

    I located where they are in the nodules/home/index.php page, but I can't figure out how to remove them without getting errors.

    This is the section that needs to be tweaked:

    Code:
    	else{
            // This is here to get Sugar dashlets added above the rest
    
            $dashlets[create_guid()] = array('className' => 'iFrameDashlet',
                                             'module' => 'iFrames',
                                             'fileLocation' => $dashletsFiles['iFrameDashlet']['file'],
                                             'options' => array('title' => translate('LBL_DASHLET_DISCOVER_SUGAR_PRO','iFrames'),
                                                                'url' => 'http://apps.sugarcrm.com/dashlet/5.2.0/go-pro.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@',
                                                                'height' => 315,
                                                 ));
    
            $dashlets[create_guid()] = array('className' => 'iFrameDashlet',
                                             'module' => 'iFrames',
                                             'fileLocation' => $dashletsFiles['iFrameDashlet']['file'],
                                             'options' => array('title' => translate('LBL_DASHLET_SUGAR_NEWS','iFrames'),
                                                                'url' => 'http://apps.sugarcrm.com/dashlet/5.2.0/sugarcrm-news-dashlet.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@',
                                                                'height' => 315,
                                                 ));
    	    foreach($defaultDashlets as $dashletName=>$module){
    			// clint - fixes bug #20398
    			// only display dashlets that are from visibile modules and that the user has permission to list
    			$myDashlet = new MySugar($module);
    			$displayDashlet = $myDashlet->checkDashletDisplay();
    	    	if (isset($dashletsFiles[$dashletName]) && $displayDashlet){
    	        	$options = array();
                   $prefsforthisdashlet = array_keys($prefstomove,$dashletName);
                   foreach ( $prefsforthisdashlet as $pref ) {
                       $options[$pref] = $current_user->getPreference($pref);
                   }
                    $dashlets[create_guid()] = array('className' => $dashletName, 
    												 'module' => $module, 
    	            	                             'fileLocation' => $dashletsFiles[$dashletName]['file'],
                                                     'options' => $options);
    	    	}
    	    }
    I'm not skilled at php so I'm not understanding what portion I need to comment out. I tried commenting just the $dashlets, no luck, then from the { after else to the end }, no luck.

    Any help with this would be appreciated.

    Kindest Regards

    Pattie

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: iframes on hompage

    Just comment like that:

    PHP Code:
    /*   ** start comment **
            $dashlets[create_guid()] = array('className' => 'iFrameDashlet',
                                             'module' => 'iFrames',
                                             'fileLocation' => $dashletsFiles['iFrameDashlet']['file'],
                                             'options' => array('title' => translate('LBL_DASHLET_DISCOVER_SUGAR_PRO','iFrames'),
                                                                'url' => 'http://apps.sugarcrm.com/dashlet/5.2.0/go-pro.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@',
                                                                'height' => 315,
                                                 ));

            $dashlets[create_guid()] = array('className' => 'iFrameDashlet',
                                             'module' => 'iFrames',
                                             'fileLocation' => $dashletsFiles['iFrameDashlet']['file'],
                                             'options' => array('title' => translate('LBL_DASHLET_SUGAR_NEWS','iFrames'),
                                                                'url' => 'http://apps.sugarcrm.com/dashlet/5.2.0/sugarcrm-news-dashlet.html?lang=@@LANG@@&edition=@@EDITION@@&ver=@@VER@@',
                                                                'height' => 315,
                                                 ));

    ** end comment **    */ 
    But this part of code is only responsible to create these two dashlets for users who log in the first time.

    All others have these daslets already in their preferences.

    For these users you must reset the homepage settings in admin - users.
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  3. #3
    pattie is offline Senior Member
    Join Date
    Apr 2009
    Posts
    23

    Default Re: iframes on hompage

    Hi Harald,

    Thanks for responding and my apologizes for a not so timely response.

    I made the comments as you suggested, reset the Homepage and am encountering the following error:

    Warning: Invalid argument supplied for foreach() in /home/admin/domains/mydomain.com/public_html/members/modules/Home/index.php on line 463

    I'm not sure why this is happening.

    I forgot to mention earlier... version Version 5.2.0c (Build 5505), community edition.

    Kindest Regards,

    Pattie

  4. #4
    Blues's Avatar
    Blues is offline Member
    Join Date
    Apr 2011
    Posts
    5

    Smile Re: iframes on hompage

    Hi All,
    Even i want to remove the two links from the dashlets
    "Sugar News","Discover Sugar"

    I have deleted from admin but unable to track in home page,

    But if you guys want to put another link just put the links in

    return parent::display() . "<iframe class='teamNoticeBox' src='####' height='".$this->height."px'></iframe>";

    which you can find in module/home/dashlet/iframedashlet

    Plz revert if you guys find something new

  5. #5
    bjhaid is offline Junior Member
    Join Date
    Jul 2011
    Posts
    5

    Default Re: iframes on hompage

    I have an app built on the rails framework (the app initiates calls), I want to include it in sugarcrm with iframes, i have a poor knowlegde of PHP, i was wondering if i can do it the html way, and if the contents of my app would function properly

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hompage Dashlets getting reset
    By hjjeff in forum General Discussion
    Replies: 1
    Last Post: 2009-04-21, 10:47 PM
  2. Replies: 1
    Last Post: 2008-05-01, 11:04 PM
  3. Dashlets missing on Hompage after Version 4.5.1b (Build 1246) Install
    By rik in forum Installation and Upgrade Help
    Replies: 9
    Last Post: 2007-10-11, 03:18 PM
  4. Help with iframes!! - thank you
    By customer99 in forum Help
    Replies: 0
    Last Post: 2007-05-14, 08:48 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
  •