Thursday, September 8, 2011

Building a social network: Elgg vs BuddyPress

I've wanted to build a social network for many years, I've worked on some building from scratch but now I stand in the why reinvent the wheel camp. After searching the web for people picks I've picked a couple of favorites. Elgg and BuddyPress. During my search I've also tested Dolphin, drupal, and joomla but my primary criteria was it should be easy to setup out of the box and work ok on a shared host which removed Drupal and Joomla though both look promising if you want to spend a little more time on it, and have some decent hosting.

BuddyPress
BuddyPress is really a plugin to wordpress adding basic social network features to the blog cms foundation. I've worked a lot with wordpress recently so that probably swayed my decision to try BuddyPress.
Features:
Out of the box buddy press offers
  • Activity streams
  • Extended Profiles
  • Friend connections
  • private messaging
Being the BuddyPress is a wordpress extension you a lot of plugins available to refine your social network. With some added plugins you can implement
  • groups
  • forums
  • albums
ELGG
Elgg is an open source social network project and is specifically built to be a social network.

Features

  • Profiles
  • Activity Feed
  • Groups
  • Pages for users and groups
  • Blogs for users and groups
  • Group discussions, bookmarks and calendar
  • Messaging system

The main difference between the two is how you want to generate content. A BuddyPress system is great for having the administrator publishing a blog and maintaining website pages with user content primarily in the forums. On the other hand Elgg doesn't really have any tools for an overall blog and website but has lots of ways for content to be published by users and user groups in addition to group discussions (forums).

BuddyPress is easier to skin especially if you are familiar with wordpress themes, and may have a slightly larger support base because of it's close ties to wordpress. I'd say use BuddyPress for a site that publishes content and wants a community discussion. Use Elgg if you want to empower your community more. 

Wednesday, July 13, 2011

Updating the date modified field on SugarCRM when saving a note using triggers

About SugarCRM
SugarCRM is an opensource CRM solution made with php and mysql, it is also available in a paid support version. It is a solid CRM with tons of features and some add-ons available. It is highly customizable for many types of businesses to work with.

Why update date modified?
CRM's can be used in a number of different ways, in many respects how the system is set up and the processes the users establish dictate how useful the CRM will be. In this case the system was pre-existing and the sales force has been using it for quite some time, so I didn't really want to try and change their process.

In SugarCRM the accounts screen view generates a table with numerous columns, one of which is the date modified which can be used for sorting. The sales team liked to use this to see which of their clients they had last worked with; however saving a note does not change the date modified. Only updating the main record updates the the data modified in the database, so they would create a note then do a save on the record to force a change on the date modified field.

I researched a number of solutions, there was logic hooks, custom fields and a number of things people have done but I had a simple idea... database triggers.

Basically I used the following statements:

create trigger note_insert insert on notes for each row update accounts set accounts.date_modified = NEW.date_modified where accounts.id= NEW.parent_id
create trigger note_update after update on notes for each row update accounts set accounts.date_modified = NEW.date_modified where accounts.id= NEW.parent_id
Now when some one creates or updates a note the date modified is changed by mysql and I didn't even have to touch the SugarCRM code. I know from searching around that others have made more elaborate changes to SugarCRM for similar purposes but this worked for me so I share it with you.

Friday, February 11, 2011

First Experiences with Magento

Recently I started a job and was tasked with setting up a Magento based website. For those that don't know Magento is an open source e-commerce php/mysql software platform.

Installation
Installation was super easy, a simple upload of files, create the database, set some permissions and run the install script. I did the install on a private server but I know Bluehost offers a one click install, and I'm sure many other hosts would as well.

You should set up the cron job or you may unexpectedly see your pricing rules disappear.

Cool Features
Magento allows you to run multiple stores (using multiple domains, subdomains or subfolders) with one installation. That is you have one admin panel and one set of inventory. Each store can have it's own template, or you can have the same template with different inventories (this is what I did for a Canada/US store and different labelling requirements on products).

Magento allows for an extra temporary theme to replace your current theme, and the ability to set a duration on the change. For example you could create a Christmas theme that over rides your current one. This can be done at a site, category or even product level.
Magento handles newsletter registration and sending, inventory, a variety of shipping option, many types of payment gateways are built in, as well as pricing rules at the catalogue and shopping cart levels.

Things I didn't like...

Magento has a module system which can add a lot of funtionality but there are some core features I think that are missing.
  1. In the wysiwig editor inserting a link to a page in the site requires a cut and paste from a browser. I like the Concrete5 method of having a sitemap open and selecting a page. Seems like a feature most CMS' lack but should be available.
  2. Lightbox style gallery. I manually added one to the site but it would be nice to have out of the box, the pop up box used for products is not particularly attractive.
  3. A quality set of default emails. Some of the emails have a hard coded "Demo Store" in them, while others use the proper variables to create the store name. A really simple fix if you ask me.
The administrator user interface can be a bit confusing with options spread out all over the place, and multiple levels of settings based on websites and stores. It is very easy to miss a setting that is hidden in another view. A trade off for the power of having multipe websites/stores, but could be presented better.

Customizing Magento Templates
The template system in Magento is not for beginners, there are numerous files spread across a number of directories. For example the you have the "skin" directory where you keep css, js and images, then you have the app directory which you dig down into until you find your templates layout and template directories where you have the xml files that control layout blocks and the individual .phtml (php) template files.

Admittedly once you get used to it it's not as bad as it sounds. The template systems is based on a base template with your custom files over-riding the base set, so if you don't have all the files built into your something will still likely work. I would say you need some php experience in addition to skills in html and css to do basic customization, and good php skills to do more than that.

I also discovered some of the templates other people built have hard coded elements like banner images, logos etc. This isn't a fault with Magento but with the template designer. Magento allows for static blocks which can be used as place holders for these items, not forcing people to rename images to match the existing file or having to delve into the template code.

Getting the store running.
This is a very tedious process. Product creation is pretty slow, I created each product one at a time, entering the basic data and using the editor to layout the product descriptions. Getting a properly resized image can take you a lot of time as well but these details are necessary to make the store look good. There is the ability to import data from a spreadsheet but you still need to upload images manually and select them for each product.

After creating products and categories, you also have to check out tax rules, shipping rules, create good transaction emails and set up the payment system to start. There's much more to it and I found a handy checklist online just prior to launching the website. You can find it at
http://retailevolved.com/blog/cat/magento/post/magento-launch-checklist/, click on the link in the page for a 9 page pdf - a great resource for creating a well functioning store.

Final Thoughts
Now that I've worked with it for almost a month I'd recommend it, especially if you are making a large e-commerce site with numerous products. If you don't need to sell alot of products or carry a very small catalog, you do lack many of powerful cms tools you find in Concrete5 or even wordpress, for a robust ecommerce solution.

Check out the magento site in action http://www.4everfit.com/

Wednesday, November 10, 2010

The Joy of Telus Shared Hosting

Recently I've had the joy (sarcasm here) of working on a Telus shared hosting plan. It's not something I'd recommend for anyone who wants any sort of data driven website but I've found a workable if not ideal solution.

The first thing to note with Telus is how slow the servers are. I can't say whether it is the mysql server or the equipment, or the php (no phpinfo allowed), but I can say with concrete5 it was 30 -90 seconds, timeouts errors and more making the system unworkable.

Note: If you want to use concrete5 I like Bluehost with the auto-installer, and it works fine on Dreamhost as well.

After building the site in concrete5 only to be stifled by the server, I decided to try a wordpress installation. I did find a few websites that said wordpress was terrible on telus too but I had to try it for myself. To my surprise the wordpress site performs reasonably well. True some pages take up to 8 seconds to load but with supercache this may be reduced for site visitors.

I had to manually install wordpress, which includes using the Telus archaic control panel but it really isn't that hard. Note they recommend filezilla for ftp and it seemed to work way better than my Dreamweaver ftp.

The site I'm working on isn't live yet and I haven't tested under any sort of load but I can say at least there is a chance that wordpress will create a reasonably working CMS on Telus hosting.

Tuesday, January 12, 2010

Creating A Fancy Menu In Concrete5 with CSS

I was working on a subcontract for the Canadian Clean Power Coalition website and received a set of design files which included a very colorful side menu. I had planned to make the site using Concrete5 since the client wanted a CMS and C5 is my favourite.
The menu looks like this


As you can see the menu consists of :
the top level links in grey
the current top level in green with a leaf
sub level links in black
and the active page in red.

Once I created the skeleton of pages in the website I can use the auto-nav feature to create the menu. In this case the menu display all relevant subpages.

The actual html generated by the autonav looks like this:

<ul class="nav">
<li>
<a href="/index.php/about-the-ccpc/">About the CCPC</a>
</li>
<li class="nav-path-selected">
<a class="nav-path-selected" href="/index.php/electricity-sector/">Electricity Sector</a>
<ul>
<li class="nav-selected nav-path-selected">
<a class="nav-selected nav-path-selected" href="/index.php/electricity-sector/electricity-terms/">Electricity Terms</a>
</li>
<li>
<a href="/index.php/electricity-sector/how-a-coal-fired-power-plant-works/">How a coal-fired power plant works</a>
</li>
</ul>
</li>
<li>
<a href="/index.php/clean-power-projects-and-technology/">Clean Power Projects and Technology</a>
</li>
<li>
<a href="/index.php/ccpc-members/">CCPC Members</a>
</li>
<li><a href="/index.php/newsroom/">Newsroom</a>
</ul> 
I like to wrap the nav in it's own div with an id, in this case I wrapped the navigation in a <div id="navBar">. Based on this it is an exercise in CSS using child and descendant selectors.

1. The base menu styles

#navBar{width: 180px; margin: 25px 0px 0px 5px; float:left ;font: normal 12px Arial, Helvetica, sans-serif; text-transform: uppercase;}

#navBar a{display: block; text-decoration: none; margin: 10px 0px 10px 20px; color: #999} // grey color
#navBar ul{margin: 0px; padding: 0px};
#navBar ul.nav li{list-style: none; margin-left: 0px;} // remove the list circles

2. The green on state, uses the .nav-path-selected class generated by autonav

#navBar ul.nav > li.nav-path-selected{background: url(images/nav_leaf.gif) 4px 4px no-repeat;} //place the leaf on the list item, note the descendant since the .nav-path-selected is used on both menu levels.
#navBar ul.nav li.nav-path-selected a{color:#090; font-weight:600;} // change text to bold green

3. The submenu only exists when the parent item is selected so i can still use .nav-path-selected class

#navBar ul.nav li.nav-path-selected ul{margin-left:20px;} // indent the sub menu

#navBar ul.nav li.nav-path-selected ul a{color:#000;} // base color of links is black
#navBar ul.nav li.nav-path-selected ul a.nav-selected{color:#C00;} // active link is red

The result is a 2 tier menu with 4 colors and a graphic leaf, sure it looks a little like Christmas but that's what they wanted.

Thursday, December 17, 2009

Google webmaster tools great for web marketers

Over the years I have built numerous websites, studied the art of SEO and recently have been testing theories on SEO and web marketing, in particular using Google Adsense.

It goes without saying that Adsense is a powerful force in the online advertising market, and that ads directly related to content only makes sense since it is more likely your target market on the site. Over the past 6 months I have been creating more and more content on different styles of sites, and can say the fastest way I have found to get a site crawled is using Google Webmaster Tools - specifically the sitemaps.

If the first step is ensuring your site/content is included in Google, the next step would be seeing how your content is viewed, where it appears on Google and using what search terms. Well this is super easy since the webmaster tools reports your position based on selected terms. How easy is that.

Case in point, this blog was started on October 29th, I haven't written a lot of posts but it appears in the top ten results for:
primus softphone and dreamhost kill ftp - admittedly not real money makers but I wouldn't have known this without the webmaster tools.

Some of the other great features are:
1. shows errors when crawling - for example 404 pages
2. shows you inbound links Google knows about.
3. reporting of content issues such as duplicate content or title tags
4. tools to help move a website
5. tools to test your site performance.

All in all a great little package you get for free from Google.

Monday, December 7, 2009

PR 6 in less than a month

Recently 22.04 media recreated the Eagelcrest Resorts website repurposing the site from an investment website to a resort real estate sales website. Less than one month later I noticed that 2 pages have achieved a PR 6 on the google toolbar. How did this happen? With google there is no real way on knowing why, I can only offer what I have done.

How It's Built
All of the websites I build offer solid on page SEO, that is a good keyword title, matching h1 and content on topic. I use alt tags with keywords, and on this particular site I wrote all the content so it may have more keywords than a non-seo site like the previous version. The site is build on a concrete5 CMS, and also uses google analytics and a google sitemap account.

This site has a few differences from other sites I've made:
1. Numerous images, meaning more alt tags.
2. Integrated Youtube videos. The location page features 3 seperate videos about La Paz which may have been linked to, and the home page has another video. The youtube account does have the eaglecrest link in the profile.
3. Several PDF documents for download.

Off-site Work
I also had launched the REI Gallery which google webmaster tools reports 4 links from REI gallery to eaglecrest resorts. Note REI gallery has no page rank and is a brand new site.

There seems to be a few other links to the site, from old directory sites I submitted to and in a news group.

Did the PR6 help?
The website does list well for a number of good keywords, and traffic is actually arriving for things other than "eaglecrest" so in that sense it is a success. On the other hand in a straigt up search for a keyword in the title it doesn't beat lower PR sites so the PR6 may be less important than having good keyword content.