SQL Conditions - A CakePHP Component Class

“aka: How to add advanced search functionality to your CakePHP Application”

Advanced search functionality is something that I’ve always built into my applications.  Even back in the days of writing CGI/PERL applications, I’ve always had some class or set of functions to help build SQL conditions (aka WHERE expressions) based on user input (GET/POST). When I started to work with CakePHP, I noticed that it lacked this functionality. There was no “cake way” of defining advanced search parameters. Luckily CakePHP makes up for it by being a great MVC! There is a way to input conditions into the paginate/find methods, but … Continue reading SQL Conditions – A CakePHP Component Class

Tools and Reports Modules for SugarCRM CE

Over the past couple of years I have worked with SugarCRM. During that time I’ve tried to overcome the lack of Reports and Tools in the Community Edition (CE) by incorporating my own custom reports and tools for marketing professionals to be able to use thru SugarCRM custom modules. These reports and tool were eventually compiled into a SugarCRM package which is now available for download thru the Sugar Forge web site.

SugarCRM Tools and Reports by JJWDesign: A collection of field developed and tested tools and reports. They we’re developed with SugarCRM CE and used for the daily maintenance … Continue reading Tools and Reports Modules for SugarCRM CE

New Application Types for MS Word

Have you ever wondered why the new Microsoft 2007 Word file type (.docx) can not be downloaded directly from your Apache server? Well, the answer is because it doesn’t recognize what kind of application type it is, therefore it can’t send the correct header information to your browser. Fortunately, the fix for this is rather simple with Apache. Just add these application types for MS Word to your server’s httpd configuration (httpd.conf or apache2.conf) and files will start downloading like magic.

# New Application Types for MS Word.
addtype application/onenote … Continue reading New Application Types for MS Word

SugarCRM Account Re-assign Logic Hook

This SugarCRM Logic Hook was used to overcome a common issue with SugarCRM. SugarCRM CE doesn’t automatically reassign an Account’s related contacts when the Account is reassigned. This often creates visibility/usability issues due to the lack of permissions (roles). The logic hook below reassigns the Accounts related contacts and opportunities saving you the time of doing it manually as well as preventing multiple contact issues. This logic hook also manages a reassigning mapping to general store users based on status … Continue reading SugarCRM Account Re-assign Logic Hook

SugarCRM Leads Logic Hook

This SugarCRM logic hook was used to automatically assign leads to users based on status. This mapping was required to help users reassign leads to users such as the “Dead Targets User”. See the logic hook below for the mapping details. In order for this Logic Hook to function the Usernames must … Continue reading SugarCRM Leads Logic Hook

SugarCRM Users Logic Hooks

Custom Logic Hooks are a great way of adding functionality to SugarCRM. The logic hook below was used to establish a default role for new users. This was required for the automatic LDAP Users functionality that is built into SugarCRM. This logic hook was used with SugarCRM CE 5.2 in a production environment.

<?php
// custom/modules/Users/logic_hooks.php

// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['after_login'] = Array();
$hook_array['after_login'][] = Array(1, ‘SugarFeed old feed entry … Continue reading SugarCRM Users Logic Hooks

SugarCRM Backup Scheme

This SugarCRM backup scheme (tested on v5.2) was developed with help from several online tutorials. The concept is to generate daily and weekly file backups of the SugarCRM file structure, excluding the upload directory which contained too many email attachments (mostly spam) at the time. These shell scripts assume your SugarCRM install is located at /var/www/html, make the necessary changes to the paths. Also, remember to setup the actual CRON for these shell scripts.

SugarCRM Backup
Place two files into directory /usr/local/bin

#!/bin/bash
# crmfbweekly:
# consists of three lines: one to find the modified files, and then two to tar and gzip … Continue reading SugarCRM Backup Scheme

Southeast Fabricators – Metal Fabrication

Southeast Fabricators is an experienced custom metal fabricator here in the central florida area.  They specialize in metal fabrication techniques and can handle projects of a considerably large size.  I recently had the opportunity to visit their “old” metal fabrication facility in Travares, FL.  While I wish I could say that the facility gave me a good first impression; honestly, it did not.  The building has major roof leaking problems and everything looks rusty and dirty.  Fortunately, they make up for it with their knowledge and experience.  I also was very impressed with their machinery available.

They have a huge … Continue reading Southeast Fabricators – Metal Fabrication

WordPress JS/Downloader.Agent Virus

Well, I just got done cleaning my WordPress program.  There were a couple of exploits that I was unaware of for my older v2.1.  Here’s how the story goes. One day I visit my blog and get a Virus Alert from my AVG antivirus program:  JS / Downloader Agent Virus.  I also noticed that I got reported on Google’s block list as an Attack Site. Doh! Doh!

So, I immediate started an upgrade to v2.6, but it didn’t help. After scouring the Internet for information, I came across a WordPress article that mentioned a bit of code in the Themes.  In particular, in the footer.php and … Continue reading WordPress JS/Downloader.Agent Virus

“What’s my IP address?”

IPRoundup.com: What is an IP Address?

When your web browser requests a web page from another computer on the Internet, it automatically gives that computer the address where it should send the information. This is called your computer’s “IP address.” (IP stands for “Internet protocol.”) For most users accessing the Internet from a dial-up Internet service provider (ISP), the IP address will be different every time you log on. This is commonly referred to as a dynamic IP address.

What’s my IP address?“, you might ask. I’m glad you asked. I recently created a Web site … Continue reading “What’s my IP address?”