SugarCRM - 如何为所有用户设置默认主页

发布于 2024-08-16 22:40:00 字数 104 浏览 2 评论 0原文

我正在使用 SugarCRM 版本 5.2.0k(内部版本 5837)。我希望能够设置一个对所有用户都相同的默认主页(带有我自己创建的小面板),任何人都可以建议最好的方法吗? 预先感谢您的帮助

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情域 2024-08-23 22:40:00

我也想知道如何做到这一点...请参阅此处 的一些想法,但很明显它不是受支持的功能。

我想知道您是否可以编写一个模块来安装用于用户创建后的挂钩(假设提供了此挂钩),然后在调用挂钩时填充用户首选项表的适当部分。当然,您的模块可能会随着 SurgarCRM 的每次升级而损坏,因此这可能比我值得的更麻烦。

编辑:

我查看了我链接的线程中引用的 Dash Manager 模块到上面。它的方法是当管理员单击管理页面中的链接时,将管理员用户的首选项复制到所有其他用户。因此,管理员用户被用作其他用户的一种模板。基本的解决方案,但不是一个糟糕的开始 - 使用模板用户并将首选项(存储在数据库表中)视为不透明似乎是可行的方法。

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.

栀子花开つ 2024-08-23 22:40:00

这很容易做到。

我已经在 SugarCRM 6.5.23 中完成了它。

在这里,我提到了执行此操作的步骤:

  1. 只需复制 sugarcrm_root/modules/Home/index.php 并将其粘贴到 SugarCRM_root/custom/modules/Home/index.php。

  2. 现在您可以根据需要自定义其行为。

  3. 您可以通过在 SugarCRM_root/custom/modules/Home/dashlets.php 创建一个文件并在其中添加以下代码来删除默认的小面板并添加您自己的小面板:

    <前><代码> '模块名称',
    'UpcomingAppointmentsDashlet' =>; '会议', //示例
    );

  4. 完成此操作后,您的挂钩代码中仍然留有 3 个小面板,如果该挂钩需要代码,则可以将其删除,如下所示:

    $dashlets[create_guid()] = array(
         '类名' => 'iFrameDashlet',
         '模块' => '家',
         'forceColumn' =>; 0,
         '文件位置' => $dashletsFiles['iFrameDashlet']['文件'],
         '选项' =>数组('titleLabel' => 'LBL_DASHLET_DISCOVER_SUGAR_PRO',
         '网址' => '...',
         '高度' => 315、
    ));
    

希望这会对你有所帮助。 :)

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. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文