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

Thread: Custom Configurations

  1. #1
    fabiog's Avatar
    fabiog is offline Senior Member
    Join Date
    May 2009
    Location
    Turin - Italy
    Posts
    35

    Default Custom Configurations

    Hi all.

    I've just opened th Bug # 31941 as a feature request. Here my idea, what do You think ?
    Best Regards
    FabioG


    I've seen that in index.php file of Administration module, I can require_once a file named administration.ext.php to add my own modules to the page.
    But, what if other extensions add the same file ? It become a NON Upgrade-Safe way to add a personal configuration link....

    So, I thought to made the following changes:

    [...]
    // FG - Start
    foreach (glob("custom/modules/Administration/Ext/Administration/administration.ext.*.php") as $filename) {
    require_once($filename);
    }
    // FG - End


    if(file_exists('custom/modules/Administration/Ext/Administration/administration.ext.php')){
    require_once('custom/modules/Administration/Ext/Administration/administration.ext.php');
    }

    [...]

    In this way, the module will add the files:

    administration.ext.php
    administration.ext.xxx.php
    administration.ext.yyy.php
    etc...

    Meaning that company "xxx" could add its own extension file, company "yyy" would add its own extension file, and go on... This would really be an upgrade safe way to customize administration page !

    Best Regards
    Fabio GRANDE
    Software Developer @ Poker SpA
    ITALY

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom Configurations

    If I understand what you're doing it sounds like you're adding items to the admin page. If so, there is an upgrade safe way to do this. If you want to do this without using module loader you'd create a file (named whatever you like) in \custom\Extension\modules\Administration\Ext\Admin istration such as MyAdminMenu.php and then create the admin menu items as needed such as:

    PHP Code:
    $admin_option_defs=array();
    $admin_option_defs['mycompany_admin_link']= array($image_path 'ModuleNameForIconInThemeDirectory','LBL_INTERNAL_LINK_TITLE','LBL_INTERNAL_LINK_DISPLAY','www.google.com');
    $admin_group_header[]=array(LBL_COMPANY_ADMIN_DISPLAY_HEADER',',false,$admin_option_defs); 
    You'd then create a language file for the LBL_*s in a similar fashion in custom\Extension\modules\Administration\Ext\Langua ge.

    Then do a Quick Repair & Rebuild on the Administration module and you should see your items on the Admin page.

    You can do this as part of a custom module through a manifest file as well. More information on that syntax can be found here: http://www.sugarcrm.com/wiki/index.p...st.php_for_5.0

  3. #3
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Custom Configurations

    You are missing a vital point: The EXT files are all build from (multiple) custom files.

    See: http://www.sugarcrm.com/wiki/index.p..._Customization
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom Configurations

    I'm sure I'm not missing the point which is why I recommended using the custom\Extension directory and not the custom\modules directory as the custom\modules\...\Ext is an aggregate which includes any files from custom\Extension\....\Ext

  5. #5
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Custom Configurations

    Quote Originally Posted by eggsurplus View Post
    I'm sure I'm not missing the point which is why I recommended using the custom\Extension directory and not the custom\modules directory as the custom\modules\...\Ext is an aggregate which includes any files from custom\Extension\....\Ext
    It wasn't a direct reply to you, Eggie!
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  6. #6
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom Configurations

    Sorry, I wasn't exactly sure since it could have been. I thought my world was turned upside down and I missed something. Have a good day

  7. #7
    redroses is offline Junior Member
    Join Date
    Jul 2009
    Posts
    1

    Default Re: Custom Configurations

    The “seed in your mind” approach also works on single, great innovative ideas. You might think “hu, that’s a neat idea”, then forget about until you face the context in which it was conceived. If the idea is good enough, your brain will bring it up again through the power of association.
    simulation credit immobilier

  8. #8
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Custom Configurations

    Quote Originally Posted by redroses View Post
    The “seed in your mind” approach also works on single, great innovative ideas. You might think “hu, that’s a neat idea”, then forget about until you face the context in which it was conceived. If the idea is good enough, your brain will bring it up again through the power of association.
    simulation credit immobilier
    Aren't you forgetting something?
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  9. #9
    fabiog's Avatar
    fabiog is offline Senior Member
    Join Date
    May 2009
    Location
    Turin - Italy
    Posts
    35

    Default Re: Custom Configurations

    Hi all.
    First of all, thanks a lot for Your help but.... I can't make it work !!!!

    I tried to create the files:

    custom/Extension/modules/Administration/Ext/Administration/pippo.php
    custom/Extension/modules/Administration/Ext/Language/en_us.lang.php

    Then I executed the Quick Repair, but I can't see my new link in Admin page.

    I also created those files (according to what SugarDev.net said):

    custom/Administration/Ext/Administration/pippo.php
    custom/Administration/Ext/Language/en_us.lang.php

    But still no luck....

    Consider I'm running SugarCRM 5.2.0f on a CentOS System.

    FabioG
    Fabio GRANDE
    Software Developer @ Poker SpA
    ITALY

  10. #10
    ros.vol is offline Sugar Community Member
    Join Date
    Dec 2008
    Location
    Eastern Europe / Ukraine / Chernivtsi
    Posts
    114

    Smile Re: Custom Configurations

    Hello,

    Try to use filename with "ext.php"

    So final nakes will be
    custom/Extension/modules/Administration/Ext/Administration/pippo.ext.php
    custom/Extension/modules/Administration/Ext/Language/en_us.lang.ext.php

    Best,
    Rostyslav Volonchuk

    SugarCRM development and customizations

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. Replies: 4
    Last Post: 2010-03-12, 08:37 PM
  2. Replies: 1
    Last Post: 2009-03-25, 12:26 AM
  3. Why 3 email configurations?
    By rnatavio in forum General Discussion
    Replies: 1
    Last Post: 2008-05-08, 02:15 PM
  4. Replies: 4
    Last Post: 2007-05-17, 08:39 PM
  5. Replies: 4
    Last Post: 2005-09-12, 03:53 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
  •