English 中文(简体)
SugarCRM - How to set the default homepage for all users
原标题:

I am using SugarCRM Version 5.2.0k (Build 5837). I would like to be able to set a default home page (with dashlets I ve created myself) that will be the same for all users, can anyone advice on best way to do this? Thanks in advance for your help

问题回答

I d like to know how to do this too... see here for some ideas, but it s clear that it s not a supported feature.

I wonder if you can write a module that installs a hook for post user creation (assuming that this hook is provided) and then populate the appropriate part of the user preferences table when the hook is invoked. Of course, your module will probably break with each upgrade of SurgarCRM, so this might be more trouble than it i worth.

Edit:

I had a look at the Dash Manager module that is referenced in the thread I linked to above. It s approach is to copy the preferences of the admin user to all other users when the administrator clicks a link in the admin page. So, the admin user is used as a sort of template for other users. Rudimentary solution, but not a bad start - using a template user and treating the preferences (as stored in the DB table) as opaque seems like the way to go.

It s quite easy to do it.

I have done it in SugarCRM 6.5.23.

Here I have mentioned steps to do it:

  1. Just copy sugarcrm_root/modules/Home/index.php and paste it in SugarCRM_root/custom/modules/Home/index.php.

  2. Now you can customize it s behavior as you want.

  3. You can remove default dashlets and add your own dashlets by creating one file at SugarCRM_root/custom/modules/Home/dashlets.php and add this code in it:

    <?php
        unset($defaultDashlets);
        $defaultDashlets = array(
             CustomDashlet  =>  ModuleName ,
             UpcomingAppointmentsDashlet  =>  Meetings , //Example
        );
    
  4. Once you do this thing still you have 3 dashlets left in your hook code you can remove it if it s needed code for that hook is like this:

    $dashlets[create_guid()] = array(
          className  =>  iFrameDashlet ,
          module  =>  Home ,
          forceColumn  => 0,
          fileLocation  => $dashletsFiles[ iFrameDashlet ][ file ],
          options  => array( titleLabel  =>  LBL_DASHLET_DISCOVER_SUGAR_PRO ,
          url  =>  ... ,
          height  => 315,
    ));
    

Hope this will help you. :)





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签