Archive for October, 2009
KINAMU Outlook – SugarCRM connector conflicts with other SOAP plugins

UPDATE Jan 5th – ATTN: New Version Users. (Kinamu 1.5.2)
Kinamu can be updated to run properly with both plugins integrated into the same installation. (You can now delete kinamu.php and kinamu/ if you had previously done an install like below)

Make a backup of your current SugarSoapUsers.php in the soap directory, install the new KINAMU plugin in your sugar module panel, then restore the SugarSoapUsers.php file that you backed up and add two requires at the end for KINAMUSoapTypes.php and KINAMUSoapSugarUsers.php:

require_once(‘soap/KINAMUSoapTypes.php’);
require_once(‘soap/KINAMUSoapSugarUsers.php’);

Then install the outlook plugin, change your path from [url]/kinamu.php to [url]/soap.php and you are back up and running without the custom mods, with Joomla Portal authentication and Kinamu.

BTW, to those at KINAMU, great work, and very nice new features. For me, the ability to create a Case from an email was a HUGE deal. Thanks!

____________________________________________________

OK, another one for my geek friends. I have SugarCRM running at work. A while back i installed the Joomla Sugar Cases plugin and it works beautifully. Customers get added to Sugar and get a portal active login assigned to them in Sugar, then they can log in my joomla website (without me adding them to Joomla) and see their cases – history, leave notes for a case, and even initiate a case, all from Joomla.

Recently I found the KINAMU outlook connector for SugarCRM on Sugarforge. Anxious to see how this would improve productivity I loaded the plugin, only to discover that it modifies the core SoapSugarUsers file, causing my other plugin to fail.

Soooo, being a clever man of hacking ability, I decided to make a seperate instance of the SOAP namespace that would authenticate and manage the kinamu plugin as a stand alone. This resolved my problem and allowed both plugins to continue to run. Here is how I did it:

  1. copy soap.php and the soap directory from your root Sugar Installation
  2. rename soap.php to kinamu.php and the soap folder to kinamu
  3. change requires in soap.php to reference the kinamu folder instead of the soap folder.
  4. change all the requires from the files inside kinamu in the same way, referencing the kinamu folder instead of the soap folder.
  5. Take your sugar plugin (in my case i have the community version so it was SugarSOAPCEv1.3.5) and open the manifest file
  6. change the folder references for where the file will go “to” as kinamu instead of soap. Do not change the folder “from” as it refers to the temp location of the loaded installer. re-package the plugin with the new manifest file
  7. Go to the Sugar Admin panel and install the module

There was only one file change I had to make. The new namespace cannot reference a valid ip check, so I commented out that portion of the SoapSugarUsers on line 172

Then install the plugin into Outlook and the connection should work fine. To get outlook properly connected go to tools>Options>KINAMU Connects and the Destination should be : http://[your base url for sugar]/kinamu.php

Hope this helps someone. Let me know.

Fall Paintings

I have continued to paint regularly this fall. Thought I would upload a few for friends to take a look. I also have a couple more underway that I will get loaded soon:

PHP Date 30 days ahead, from SQL value

This is one of those things that seems like it should be simple, but very few examples are given that are straight forward and easy to follow. There are lots of examples of 30 days ahead of the current date/time, but here is a simple example of getting that data from a database and then calculating the date ahead.

$date = The value of the database from your query
$daysahead = The number of days ahead you want to calulate
$final_date = date(“m/d/Y”, strtotime($date) + (86400 * $daysahead));

echo $final_date;

Explanation:
The date object gets your desired format passed as the first variable, then we invoke strtotime with the database value for the date we are starting with, then add the number of seconds in a  day times the number of days ahead you are looking for. This would also work of course for previous days by changing the “+” to a “-”

Hope this helps someone.