Archive for the ‘ Open Source ’ Category
I’m going to use the Tasks Module as an example. I will link the ‘Contact’ field to the contacts module detail view. Open /modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php Initially it looks like this: 'contact_name' => array( 'width' => '8', 'label' => 'LBL_LIST_CONTACT' ), To make this field link to the contacts module: 'contact_name' => array( 'width' => '8', 'label' => 'LBL_LIST_CONTACT', [ READ MORE ]
You can hide a SubPanel in an upgrade safe way but unsetting the subpanel via PHP. Example: You can hid the Leads SubPanel into Accounts module by customizing the custom/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php, which is a upgrade safe customization. Add the following to the end of the file, before the closing PHP tag. unset($layout_defs['Accounts']['subpanel_setup']['leads']); [ READ MORE ]
unset($layout_defs['Accounts']['subpanel_setup']['leads']);
After searching for a while, I finally found out how to manually delete or remove a sugar crm relationship that was created in studio. I tested this on Sugar 5.2 Professional and it seems to work just fine. Use at your own risk. When you create a new relationship through Admin -> Studio -> -> Relationships, Sugar create several files at custom folders: Left Side Hand Relationship (module from which you created the relationship): custom/Extension/modules//Ext/Vardefs/.php [ READ MORE ]
Here's a quick plugin I wrote for vBulletin to display social group icons on the postbit. The social group icon for each public social group the user belongs to will be displayed. Please see attachment. To install, just import the plugin via the admin panel. This plugin was only tested on vBulletin 3.8 on http://www.b15u.com. Please use at your own risk[ READ MORE ]
This is a quick and dirty screen scraper for quantcast.com. It currently only grabs the site rank and description. Usage: $q = new QuantCast('cnet.com'); echo 'Rank: ' . $q->getRank() . ''; echo 'Desc: ' . $q->getDescription() . ''; Class Source Code: class QuantCast { public $siteName; private $siteContents; public function __construct($siteName){ $this->siteName = strtolower(str_replace('http://', '', $siteName)); [ READ MORE ]
$q = new QuantCast('cnet.com'); echo 'Rank: ' . $q->getRank() . ''; echo 'Desc: ' . $q->getDescription() . '';
class QuantCast { public $siteName; private $siteContents; public function __construct($siteName){ $this->siteName = strtolower(str_replace('http://', '', $siteName)); [ READ MORE ]
This class requires PHP 5.2+ and the MySQLi extension. It will not work with the regular MySQL extension. An object representing a table is created on the fly that will allow you to do inserts, updates etc. Please see comments in the code for usage. init('user_table'); * $user->get("user_id = 4343"); [ READ MORE ]
init('user_table'); * $user->get("user_id = 4343"); [ READ MORE ]
To register new custom entry points for Sugar CRM, do the following you have to create the file custom/include/MVC/Controller/entry_point_registry.php Contents should be the following: $entry_point_registry['entry_point_name'] = array('file' => 'path/to/custom/code.php', 'auth' => true); [ READ MORE ]
$entry_point_registry['entry_point_name'] = array('file' => 'path/to/custom/code.php', 'auth' => true);
Just a simple php mime type array $mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'doc' => 'application/msword', 'bin' => 'application/macbinary', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => 'application/octet-stream', 'class' => 'application/octet-stream', 'psd' => 'application/octet-stream', 'so' => 'application/octet-stream', [ READ MORE ]
$mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'doc' => 'application/msword', 'bin' => 'application/macbinary', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => 'application/octet-stream', 'class' => 'application/octet-stream', 'psd' => 'application/octet-stream', 'so' => 'application/octet-stream', [ READ MORE ]
Here's a nice and simple article explaining how to add Triggers and Actions in Drupal 6. This tutorial will send an email notification to the site administrator when a comment is added to an article. I use it on this site to send an email to the articles author when a comment is added. http://www.scribbledesigns.co.uk/2008/04/03/howto-configuring-triggers-and-actions-in-drupal-[ READ MORE ]
This is a little helper function I wrote to send an email using Sugar CRM's built in mail class. /** * A wrapper for sugar's mail class * Sends emails to everyon in $tos array. * $tos['user name'] = 'username@domain.com'; * * @example : $tos['Some User'] = 'SomeUser@somewhere.com'; * $tos['Some User 2'] = 'SomeUser2@somewhere.com'; * sendSugarPHPMail($tos, 'hi', 'hello fellas'); * * @param associative array * @param string $subject * @param string $body * @return boolean */ [ READ MORE ]
/** * A wrapper for sugar's mail class * Sends emails to everyon in $tos array. * $tos['user name'] = 'username@domain.com'; * * @example : $tos['Some User'] = 'SomeUser@somewhere.com'; * $tos['Some User 2'] = 'SomeUser2@somewhere.com'; * sendSugarPHPMail($tos, 'hi', 'hello fellas'); * * @param associative array * @param string $subject * @param string $body * @return boolean */ [ READ MORE ]