September 2, 2008

CodeIgniter: No Output

Filed under: CodeIgniter (CI) — Soleer @ 10:27 pm

The Problem 

We experienced a problem when attempting to move one of our codeigniter (CI) websites from one server to another.  We performed the transfer of the files, database setup, and necessary config file changes.  Then came time to test, and… Nothing.  FireFox and IE7 both rendered a blank page.

Debugging 

We tracked down the problem, by setting up test points within the php code.  Basically we’d put a ‘print “test” ‘ command in various places, and if it was successfully displayed, then the code was breaking after that point.

Starting with the index.php file, the breaking points were as follows:

<base_path>/index.php (approx. line 117)
require_once BASEPATH.’codeigniter/CodeIgniter’.EXT;

<base_path>/system/codeigniter/CodeIgniter.php (approx. line 80)
$EXT =& load_class(’Hooks’);

<base_path>/system/libraries/Hooks.php (approx. line 43)
log_message(’debug’, “Hooks Class Initialized”);

Okay, so the “log_message” was causing the problem.  After searching the CI user guide, we found the Error Handling page.  At the bottom, it states:

Note: In order for the log file to actually be written, the “logs” folder must be writable. In addition, you must set the “threshold” for logging. You might, for example, only want error messages to be logged, and not the other two types. If you set it to zero logging will be disabled.

So, possibly this was a permissions issue on the logs folder. 

The Solution 

To solve the problem, we navigated to our server, and changed the permissions to 777 (read/write/execute across the board) for the logs folder (<base_path>/system/logs).  

[localhost]$ chmod 777 system/logs

We did this via ssh, but you could also use some other file manager or possibly ftp on some servers. 

…And voila!  Our site threw us a database error. 

We had never been so happy about a database error before!  With the problem isolated, we quickly solved the issue, and got the website rolling.

July 11, 2008

Install Drupal Modules via CVS

Filed under: Drupal — Soleer @ 8:26 am

CVS deployment enables a whole new level of simple installation and upgrading.  To install a Drupal module using the standard method, you have to:

  1. Find the module on Drupal.org
  2. Wait for the Module to Upload
  3. Unzip the contents
  4. Connect to your FTP server
  5. Browse to the module directory
  6. Wait for the module to upload

Using CVS installation, all you have to do is:

  1. Enter one command into your ssh program. (The files are downloaded and installed directly from server to server in lightning-fast fashion)

Even more impressive, is the fact that if you install the module using CVS, you can also upgrade using a very short command in your ssh program.

Now that your excitement is palpable, let’s get into the how.  Here are the prerequisites:

  • SSH/Shell access to your server.
  • Some sort of SSH client.  (I use putty on windows)
  • Hopefully some understanding of unix commands

Now that you have all of the necessary tools, let’s install a module! 

  1. Use your SSH client to connect to your server
  2. In your client, navigate to your modules directory
  3. Browse to: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/ (This is the CVS repository for modules)
  4. Click on the link for your desired module (We’ll use the pathauto module for our example)
    CVS Drupal Module Repository
  5. Go the the Sticky Tag Selection, and make note of the latest stable version of the module for your drupal release.  In this example, I’m running Drupal 6.x.  So, the latest release for pathauto at the time of this writing is “DRUPAL-6–1-1″.  Take note of this; we’ll call this {latest_stable_version}.  Also note how the module is listed in the directory structure at the top of this page (contributions/modules/pathauto), in this case, the name is listed as “pathauto”.  Take note of this; we’ll call this {module_name}.
  6. Type the following command:

    cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r {latest_stable_version} -d {module_name} contributions/modules/{module_name}

    So, for our example, the code would look like this:

    cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib checkout -r DRUPAL-6–1-1 -d pathauto contributions/modules/pathauto

  7. Voila!  It’s installed.  All you have to do is enable it in your drupal admin section.

Stay tuned for a post on how to update via CVS…

April 24, 2008

SEO more important than ever

Filed under: Industry News, SEO — Soleer @ 8:20 am

The importance of search engine optimization (SEO) is at an all time high, and the value of solid SEO is increasing daily.  A recent JupiterResearch and NPD Group “Blended Search Results Study” shows first page search-result-listings are vital for web traffic.

Almost 7 out of 10 individuals surveyed clicked on a first-page search result.  Only 8% of respondents were willing to click results beyond the third page.  This continues a recent trend of search engine users refusing to dig into deeper search-result pages.

Instead of progressing into deeper search results, most users (over 9/10) simply altered their search terms or switched search engines.

eMarketer forecasts these dramatic trends to influence SEO spending in the next few years.  Companies are not only realizing the importance of quality search engine rankings, but also the relative cost efficiency of SEO investment.  By 2011, they forecast SEO spending to total 23% of search-marketing spending. 

For more information on SEO, including how your company can benefit, please contact Soleer.

April 14, 2008

<UL> Bullet Coloring with CSS

Filed under: CSS, XHTML — Soleer @ 9:30 am

As we know, designers can never leave well enough alone.  The default css behavior is for bullets to be the same color as their associated list item <li>.  Although there are a number of solutions on the internet, this is the most simple, elegant, and universally compatible.

 Here is an example of what we’re looking to accomplish:

  • Bullet-List Item 1
  • Bullet-List Item 2
  • Bullet-List Item 3
  • Bullet-List Item 4
  • Bullet-List Item 5

Note how the bullets are red and the list-item text is blue.  Now, let’s take a look at the code:

Standard code:

<ul id=”ex_list”>
      <li>Bullet-List Item 1</li>
      <li>Bullet-List Item 2</li>
      <li>Bullet-List Item 3</li>
      <li>Bullet-List Item 4</li>
      <li>Bullet-List Item 5</li>
</ul>

In order to style the bullets and text seperately, we must enclose the <li> text within <span> tags:

<ul id=”ex_list”>
      <li><span>Bullet-List Item 1</span></li>
      <li><span>Bullet-List Item 2</span></li>
      <li><span>Bullet-List Item 3</span></li>
      <li><span>Bullet-List Item 4</span></li>
      <li><span>Bullet-List Item 5</span></li>
</ul>

Now that we have the xhtml setup correctly, all we have to do is perform some minor CSS changes:

#ex_list li{
          color: blue;       /* The color you want the bullets to be */
}
#ex_list li span{
          color: red;      /* The color you want the bullets to be */
}

March 24, 2008

How to Display CiviCRM events on a Drupal Calendar:

Filed under: CiviCRM, Drupal — Soleer @ 9:52 am

How to Display CiviCRM events on a Drupal Calendar using CiviEvent’s iCal Feed and the Drupal Calendar Module:

  1. Pre-requisits: You’ll need an instance of CiviCRM running on Drupal, (we’re using Drupal 5.5 with CiviCRM 1.9) with CiviEvents Enabled.
  2. Download & Install the following Drupal modules:
    1. Calendar: http://drupal.org/project/calendar
    2. Views (required by Calendar): http://drupal.org/project/views
    3. Date (required by Calendar): http://drupal.org/project/date
  3. Go to your Module management screen ( Administer >> Site Building >> Modules )
    Screenshot 1

    1. Enable Calendar View
    2. Enable Calendar iCal
    3. Enable all other modules required by these
  4. Go to the “Administer Views” screen ( Administer >> Site Building >> Views)
    Screen shot 2

    1. Set ‘calender’ view status to ‘enabled’
    2. Click on the ‘add’ link next to calendar
    3. Screen Shot 3

    4. On the “Add a View” Screen, under Access, select all the roles you want to be able to view this calendar.
    5. Go to the bottom of the page and click save
    6. You will now see ‘calendar’ listed under ‘existing views’
    7. Click on the ‘calendar’ link listed in that same row or go to the calendar url, which should be http://www.yoursite.com/calendar (if you have drupal installed in the base directory) or http://www.yoursite.com/drupal/calendar (if you have drupal in it’s own directory).
  5. Go to your “Access Control” page. (Administer >> User Management >> Access Control)
    1. Under CiviCRM, make sure “register for events” is enabled for your anonymous role, and any other roles you are going to want to register for events.
  6. From the Calendar page, you should see the following:
    Screen Shot 4

    1. Click on the “iCal” tab, and insert the following information:
    2. Screen Shot 5

    3. Under “Expire iCal cache:” I recommend setting this to ‘0 sec’ for debugging purposes, and then scale back based on your traffic and update timing requirements.
    4. Set the Name as anything, I went with “civi” to keep it simple.
    5. Set the Url to your civi iCal feed.  Should be something like:  http://www.yoursite.com/civicrm/event/ical?reset=1&page=1  or http://www.yoursite.com/drupal/civicrm/event/ical?reset=1&page=1 .
  7. And that should be it!  Set up a test event, and make sure it shows up on your calendar page.
Newer Posts »

Who we are

Explore our history and character.

If you've ever been on a blind-date, odds are great that you know how disastrous "jumping before looking" can be. Feel free to do some online stalking here before you contact Soleer.

What We Do

"Girls only want boyfriends who have great skills." -Napoleon Dynamite

While we aren't looking to be your boyfriend and might not have "nunchuku skills," we do offer a number of other services and solutions to assist your organization.

What We’ve Done

As we say in Texas, "This ain't our first rodeo." Take a look at a sampling of some of our masterpieces, from logo design and brochure creation to webpage design and online community development.