Results 1 to 8 of 8

Thread: Sugar Upgradability -> Needs community input

  1. #1
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Sugar Upgradability -> Needs community input

    Hi all,

    I wish to say a few things about Upgradability. Currently, there's no real upgradability priority in Sugar. I know, I know, there's the studio, and the logic hooks. And there's definately a strong will, from Sugar as well as from the community, to make it easier to upgrade Sugar throughout a single Sugar installation lifetime.
    But the reality is, that it's still pretty poor. Whenever I begin a new project (unlike a lot of users visiting the forums, I work with a company that implements Sugar for clients, we don't use it primarily for our own business), I try to keep the core code from changing and I try to maintain the code integrity. Usually, within a single business day I find myself modifying the core code of Sugar. Something in SugarBean perhaps, or a template, or vardefs.

    What I need, and what SugarCRM and a lot of implementors need, is a better system. If I can't make the modifications myself, and I can't add them in logic hooks (which are nice, by the way) or with the Studio, I'm stuck.

    So my idea is this: Use this topic to post your cases in, and explain why you need to change the Sugar production code. Maybe a few things can be picked out by the developers (or us, the community developers!) and maybe a few things can make it to the production code (usually optional, with a simple config.php variable to activate that code). I believe this is a great opportunity to see what's bugging us, implementers, while working with and modifying Sugar for our specific needs.

    I'll start with something:

    *Change the title: I want to be able to change the page title from the configuration module
    *Studio: I really, really need to be able to edit the Employees/Users modules from the Studio
    *ListView: I really, relaly need to be able to define a few views and store them into Sugar. Preferably integrating with Role
    *Layout: I really need to be able to insert a company logo with other dimensions then 212x40!!! Why is this hardcoded? it just doesn't make any sense this way...

    I love sugar, and I hope you guys can provide some more input! Things you really really need and need on a regular basis (with a lot of installs)...Ideally, you can provide the code that you used...Maybe this can become a sticky?

    My client needed the export column names to mean something...
    So I changed export.php:

    Code to replace database fields (id, phone_fax, billing_street_name) with their language labels:
    Code:
    foreach($fields_array AS $key=>$value) {
    			
    			/* Format and display field */
    				$new = $mod_strings[$focus->custom_fields->bean->field_name_map[$value]['vname']];
    				if (!empty($new))
    					$fields_array[$key] = $new;
    			
    			        /* Convert names */
    				$fields_array[$key] = str_replace("_c_10", 	"", 		$fields_array[$key]);
    				$fields_array[$key] = str_replace("_c", 	"", 		$fields_array[$key]);
    				$fields_array[$key] = str_replace("_", 		" ", 		$fields_array[$key]);
    				$fields_array[$key] = str_replace(":", 		"", 		$fields_array[$key]);
    				$fields_array[$key] = ucfirst($fields_array[$key]);
    		}
    Code to replace any enum fields with their full name (needed with non-US installations)
    Code:
    while($val = $db->fetchByAssoc($result,-1,false)) {
    
    		
    		$new_arr = array();
    		$i=0;
    
    		foreach (array_values($val) as $value) {
    			if (in_array($i, $unwanted_fields_int))
    				continue;
    			$fieldname = $db_fields[$i];
    			if ($focus->custom_fields->bean->field_name_map[$fieldname]['type'] == "enum"
    				OR $focus->custom_fields->bean->field_name_map[$fieldname]['custom_type'] == "enum") {
    				// Enum field, vertalen..
    				//echo $fieldname.": ".$value;
    				$value = $app_list_strings[$focus->custom_fields->bean->field_name_map[$fieldname]['options']][$value];
    				//echo " (".$value.")<br>";
    			}
    
    			array_push($new_arr, preg_replace("/\"/","\"\"",$value));
    			$i++;
    
    		}
    		
    
    		$line = implode("\";\"",$new_arr);
    
    		$line = "\"" .$line;
    
    		$line .= "\"\r\n";
    
    		$content .= $line;
    
    	}
    Last edited by lvangool; 2007-02-26 at 08:54 AM.

  2. #2
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Sugar Upgradability -> Needs community input

    Layout: I want users to be able to click on a text next to a selection box/radio (index.php?module=Configurator&action=EditView) to select that particular box/radio. This can be done like this:

    Code:
    <HTML>
    
    <SCRIPT LANGUAGE="JavaScript"><!--
    function click(which) {
        document.theForm.theRadio[which].checked = true;
    }
    
    //--></SCRIPT>
    
    <FORM NAME="theForm">
    <INPUT TYPE="RADIO" NAME="theRadio" CHECKED> <A HREF="javascript:click(0)">Click this</A>
    <BR>
    <INPUT TYPE="RADIO" NAME="theRadio"> <A HREF="javascript:click(1)">Click this</A>
    </FORM>
    
    </HTML

  3. #3
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Sugar Upgradability -> Needs community input

    You guys are great. Really.

  4. #4
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Sugar Upgradability -> Needs community input

    Hi lvangool, you're singing our tune!! Thanks for taking the lead on this.

    I'd add only one thing, though: submit the code mods through the Contribution form. Without this, we'd be unable to accept your work because of copyright concerns (it's imperative we keep the lineage of our code pure as the wind-driven snow).

    We'll provide attribution to code contributors on our About page as well.

    Believe me when I say that the Dev team is absolutely willing and excited about receiving your code contributions. Your work, folded into baseline code, helps thousands of others!!!

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  5. #5
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Sugar Upgradability -> Needs community input

    Andy, I had no idea that you guy's couldn't grab the code from the forums?

    Can't you also take the module builder, ZuckerDocs and Translation Suite and put them into SugarOS? That kind of things need to happen in my opinion, and exchange of code to and from both sides...

  6. #6
    Join Date
    Feb 2007
    Location
    San Jose, CA
    Posts
    1,169

    Default Re: Sugar Upgradability -> Needs community input

    Lvangool,

    Thank you for your code submissions... I saw that you did submit them via the link Andy posted. We're smoothing out this process so it will be very easy to submit code.

    Thank you again!

    -Susie
    Susie Williams

  7. #7
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: Sugar Upgradability -> Needs community input

    Quote Originally Posted by lvangool
    ... Can't you also take the module builder, ZuckerDocs and Translation Suite and put them into SugarOS? That kind of things need to happen in my opinion, and exchange of code to and from both sides...
    Well, not to get too ahead of ourselves, but we're in discussions right now to incorporate some good stuff from Mr Brill in association with Mr Blackmer.

    We're refining the module contribution process using them as guinea pigs. This will open the door to others, like those you mention, should they so desire. But, we have to recognize that some developers would rather sell their wares independently or on SugarExchange as modules ... and to us that's terrrific as well.

    Code contributions like yours just now (thanks!!) are more easily handled by the submission form.

    Overall, we're eager to open the doors to the best of the Sugar community. And you're helping lead this process.

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  8. #8
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: Sugar Upgradability -> Needs community input

    I really like the guinea pig idea. It's really open source culture you know

    So...there must be other developers with great points. Little things that would make all our lives better...so to everybody: got something?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2006-03-11, 04:06 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
  •