Results 1 to 7 of 7

Thread: Creating NEW MODULES

  1. #1
    newseed is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    11

    Default Creating NEW MODULES

    Sugar Version 4.5.0c

    Question:
    How in the world does one create a new module? I've found a Module Building via SugarCRM web site but that is for the earlier version (4.2). Anyone got a crash course on how it's done?

    Other comments:
    Too bad they didn't use Add Columns in all areas for Aministrative use. Thanks to user that made a post that I have read elsewhere, I was able to manually edit the files to create the columns myself.

    I love how it's laid out and how it populates so quickly when you create new entries.

  2. #2
    chrisky is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Trondheim, Norway
    Posts
    293

    Cool Re: Creating NEW MODULES

    For 4.5? Yeah, that's a challenge...

    The best idea we have going at the moment is to make a copy of a module, and replace things such as the module name [and in it's specific case sensitive nature] with unique strings.

    Some type of install script/app to take the user input for desired module name, then format it accordingly (case sensitive) and replace those unique strings with this formatted module name string..

    It gets real hairer having to modify many sugar core files in which code must actually be inserted into, though isis doable, utilizing a search function in which searchs for a string... well, essentially, it'd search for another module name and particular formatting before and after it/them in order to find the correct spots in those files in which to make the code additions..

    All in all, I' wouldn't expect a module builder for 4.5 to show up anytime soon..

    As for doing things manually, the easiest program I've found to work with is RapidPHP..
    almost takes the place of kdiff but not quite..

    RapidPHP has built in find/search & replace for entire directory structures (recursively).
    Type in a search string and the path to your sugarcrm root directory;
    a list of files will be displayed on the bottom in which contain that srch string;
    just click once on a file in the list and that file is opened in the edtor (txt editor essentially);
    and the cursor is placed on the first line containing your srch string;
    just hit F3 to search the remainder of the file for additional entries of your srch string,
    if there aren't any a dialog box saying so;
    click the save button and onto the next file....

    I've got it all software wise, and try every new thing I come across, though I highly love rapidphp for my sugar editing.. It even has a multi-line search & replace ability which works recursively.. It's pretty light on system resources too, compared to many other apps I use including: firefox, nvu, Zend, EngineSite, etc.

    Back to new modules for 4.5, the only thing I have on my desk at the moment is an old list we made, of files that need editing:

    soap/SoapSugarUsers.php
    custom/include/language/en_us.lang.php
    metadata/{applicable meta data files}
    modulename/vardefs.php
    /soap.php
    modules/TableDictionary.php
    modules/Users/RemoveView.php & RemoveView.html
    modules/Notes/note.php
    modules/Help/Menu.php
    modules/Home/Menu.php
    modules/DynamicLayout/HTMLPHPMapping.php
    include/ListView/ListView.php
    include/tabConfig.php
    /index.php
    modules/Studio/wizards/SelectModuleWizard.php
    include/SubPanel/registered_layout_defs.php

    and that list isn't complete, but I think did just about cover it, aside from the copying of an the module and appropriate editing in regards to the database table(s)

    Another convienent trick I employ is running Samba, despite being startable and stoppable via Webmin if one so chose, our servers are behind firewalls. I thought it would be very nice to be able to do alot of editing and things on the 'fly', where such is actually done to a deployed environment. We just click on save for example, and in our browser reload whatever it is were working on, thus allowing us to immediately test things in their actual deployed environment (running on one of the servers, under it's web server, php, etc.).
    I highly reccomend Samba, but ONLY if behind a firewall AND your network admin is good & knowledgeable with security.

    The alternative for everyone else, is to just work with/from a local copy on your hard drive, and then xfr (likely via ftp) the modified files..

    You might also take a look at net2ftp (of which we're also integrating as a sugar module, lol), it's a pretty sweet lil app.
    Attached Images Attached Images  

  3. #3
    newseed is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    11

    Default Re: Creating NEW MODULES

    Whoa! What a source! I will probably take a shot at RapidPHP since the search feature is somewhat the same as FP2003 feature where it will list all the files that needs to be changed. The difference here is that FP2003 (if you choose to do so) will replace the searched lines in ALL the files in one click of a button.

    Since Sugar CRM 4.0 (and later) has been out for quite some time, I am surprised that no one has come up with a Module Building that will work for all versions. (with the exception of 4.2).

    Thanks for you input and help.

    Oh! How much success did you have when using this method?

  4. #4
    chrisky is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Trondheim, Norway
    Posts
    293

    Cool Re: Creating NEW MODULES

    Quote Originally Posted by newseed
    Whoa! What a source! I will probably take a shot at RapidPHP since the search feature is somewhat the same as FP2003 feature where it will list all the files that needs to be changed. The difference here is that FP2003 (if you choose to do so) will replace the searched lines in ALL the files in one click of a button.

    Since Sugar CRM 4.0 (and later) has been out for quite some time, I am surprised that no one has come up with a Module Building that will work for all versions. (with the exception of 4.2).

    Thanks for you input and help.

    Oh! How much success did you have when using this method?
    lol, I wasn't trying to touch every feature or detail, heck, I only use rapidphp for the few functions I touched on including what you mentioned..

    And, it also does do a 'single click' search and replace, recurseively (directory wise) and works with multi line search/replace strings..

    As for no one coming up with a 'module builder'.. In all truthfulness, the community is very lucky that as many addons/modules out there are even made..

    It takes a hell of a lot more time and work to make an addon distributable.
    Though fully functional, the extra code/time needed between an private/in-house used addon and a distributable version, is immense.

    I'm learning this the hard way, with BackupRestore, of which I haven't been working on lately after spending early evening till 4 am working on putting it in a distributable & installable sugarcrm module form... Not to mention, pulling all config settings automatically such as directory and path names, hostnames, etc.. Opposed to requiring manual editing (which is what we {and most others} do for in-house/private use) whereby manual editing takes only seconds and doesn't justify the hours, days, or weeks to code the automation of such..

    btw, earlier, were you referring to some of my posts on additional columns in view layouts?

  5. #5
    newseed is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    11

    Default Re: Creating NEW MODULES

    Quote Originally Posted by chrisky
    lol, I wasn't trying to touch every feature or detail, heck, I only use rapidphp for the few functions I touched on including what you mentioned..

    And, it also does do a 'single click' search and replace, recurseively (directory wise) and works with multi line search/replace strings..
    I will be downloading RapidPHP today to give a whirl to see how much success I have in creating a new module.

    Quote Originally Posted by chrisky
    As for no one coming up with a 'module builder'.. In all truthfulness, the community is very lucky that as many addons/modules out there are even made..

    It takes a hell of a lot more time and work to make an addon distributable.
    Though fully functional, the extra code/time needed between an private/in-house used addon and a distributable version, is immense.
    I am in no way a programmer but I am able to take something, get the source and tweak it a bit. However, as for those that create distributable addons, I can understand that there isn't a whole lot more than what I am use to seeing with other open source programs but I am surprise that someone created a Module Builder for the 4.2 version and then let it slide thus not coding it for later versions. I can't imagine anyone who wouldn't want to use a module builder.

    [QUOTE=chrisky]I'm learning this the hard way, with BackupRestore, of which I haven't been working on lately after spending early evening till 4 am working on putting it in a distributable & installable sugarcrm module form... Not to mention, pulling all config settings automatically such as directory and path names, hostnames, etc.. Opposed to requiring manual editing (which is what we {and most others} do for in-house/private use) whereby manual editing takes only seconds and doesn't justify the hours, days, or weeks to code the automation of such..{/QUOTE]
    Yikes! My 'staying up until 4 am' days are over for me.

    Quote Originally Posted by chrisky
    btw, earlier, were you referring to some of my posts on additional columns in view layouts?
    Yes. I was able to create the columns as you suggested in one of your post and view them correctly.

    Thanks for your help.

    PS: On another note: Is there any reason NOT to install the Admin Tool to CRM 4.5.0d ?
    Last edited by newseed; 2006-10-17 at 01:13 PM.

  6. #6
    chrisky is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Trondheim, Norway
    Posts
    293

    Cool Re: Creating NEW MODULES

    Quote Originally Posted by newseed
    Yes. I was able to create the columns as you suggested in one of your post and view them correctly.
    Thanks for your help.
    It's nice to to hear that I helped.. Turthfully it feels like I'm talking to a wall (posting) most of the time..
    Lately, seeking a break from coding, I've perused the forum and posted at times..
    I'm likely just gonna back off my forum participation..

    Quote Originally Posted by newseed
    PS: On another note: Is there any reason NOT to install the Admin Tool to CRM 4.5.0d ?
    Ignoring your question
    This is my advice...make a full backup of your sugar installation (i.e. for linux deployments, just tar up the sugar directory, and for windows I suppose you could zip it); and also be sure to backup your sugar database.
    I suggest you make a couple database backups such as:
    1) w/table dropping; 2) Update, 3) INSERT, 4) REPLACE

    Skipping my explanations, at least make two which would include an UPDATE type export, without table dropping, and with tabe creation if not existing. This update configuration can be written on top of a pre-existing sugar installation & database.

    So back to my original point... MAKE A FULL BACKUP (Sugar & SQL db) immediately BEFORE any modification, change, addition, etc. to Sugar.. If you do this, then I'd to do or try whatever ya want..
    Install whatever you want...

    How's that for an awnser? without even awnsering your question? lol

  7. #7
    kpit's Avatar
    kpit is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Dec 2005
    Location
    Memphis, TN
    Posts
    996

    Default Re: Creating NEW MODULES

    Hey everyone, there is an upcomming Developer and Users Group event that may be of interest to you as a new module developer. The very first webinar will be covering the almighty SugarBean. The SugarBean is the very core of SugarCRM. Check out the thread at http://www.sugarcrm.com/forums/showthread.php?t=17313 This is a must know part of SugarCRM if you are going to write modules that survive an upgrade process. This session first session will provide a general overview of how SugarCRM is Structured from a developers point of view. There will also be a 10 min Q&A at the end of the webinar with Ken Brill, Andy Dreisch, Jacob Taylor and myself.
    Cheers,

    Max W. Blackmer, Jr.

    Blog
    Phone: +1 (901) 672-2694



Thread Information

Users Browsing this Thread

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

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
  •