Author Archive

So let’s say you run into a situation like this. You are running a Wordpress site that needs more than 1 sidebars that are content manageable through the Wordpress admin interface using the ‘Wordpress Widgets’. I recently ran into a snag where I needed to find a solution in this area. It’s actually pretty easy. Let’s take a look at how to accomplish this.

Making A Wordpress Theme Widget Enabled

Basically, your theme’s functions.php file is the file that controls whether or not your Wordpress theme is “widget enabled”.  Many themes already contain this file, and many do not. So if yours does not you just need to create it. Here is what you would need to put in your functions.php file in order to make your theme “widget enabled”…

<?php
if ( function_exists('register_sidebar') )
register_sidebar();
?>

Next you need to put some php code inside your sidebar.php file in order for you to actually show the widgets on your Wordpress blog. Located your Sidebar.php file and place this code in your desired location.

<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>
<?php endif; ?>

Now your wordpress theme ( if it by chance was not already ) is widget enabled and can actually utilize the Wordpress Widget technology. That is the first step that must be covered.

Setting up Multiple Widget Enabled Sidebars

Now to the good stuff. Now we want to create more of these. If you noticed, in your administration interface under Design you now have a widgets section where you can manage your widgets for your sidebar. But we need to create more of these. Here’s how we do it. Go back to your functions.php file and input the following…

<?php
if ( function_exists('register_sidebar') )
register_sidebar(array('name'=>'sidebar1',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
register_sidebar(array('name'=>'sidebar2',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
?>

You can just continue repeating this code over and over to cover however many dynamic widget sidebars that you need. Once you are done with this, next you need to input some code in your sidebar.php file to actually present these new widget sidebars that you have created. Do this…

Sidebar1 code goes like this
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('sidebar1') ) : ?>
<?php endif; ?>

Sidebar2 code goes like this
<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar('sidebar2') ) : ?>
<?php endif; ?>

And on and on. You can use some simple PHP if else statements to put specific sidebars on specific pages. For example, you may want to place sidebar1 on only the homepage, and sidebar2 on the rest of the pages but not the homepage. Here’s the code I put together to accomplish this…

<?php
if (is_home()|| is_page()) {
echo wpads(’adFill’);
( !function_exists(’dynamic_sidebar’) || !dynamic_sidebar(’sidebar1′) );
} else {
echo wpads(’adFill’);
( !function_exists(’dynamic_sidebar’) || !dynamic_sidebar(’sidebar2′) );
echo wpads(’SADF’);
}
?>

That’s it! You now have multiple widget enabled sidebars running on your wordpress blog. This gives your site much more flexibility in design and functionality and can really enhance the content that you deliver to your visitors. Now you can go to your wordpress admin interface and you will see all your widget sidebars in a dropdown menu where you can drag and drop items to and from each specific sidebar. Good luck and have fun with this!

Recently in my freelance endeavors, I found myself in an interesting situation with Wordpress where I needed to create a navigation that integrated links of both pages and categories, and have that navigation be managable through the Wordpress administration area. Have you found yourself in a situation similar to this? Oddly enough this was my first time where I needed something like this, and I found a plugin that works perfectly.

The plugin is called Sticky Menu. You can find the plugin and a more detailed explanation by following the link. Basically, the plugin gives you a new section in your admin panel that allows you to create multiple menus where you specify the url and title of each link. You then use this code to display your menu…

$menu = new stickymenu;
$menu->display_menu('menu=Main'); # Will display menu 'Main' here

Multiple Dynamic Navigation Menus

With this as you can see, you can create as many dynamic navigation menus as you need. This plugin extends Wordpress in such a way that competes with the Drupal content management system and it’s dynamic menu feature. Where I ended up using this plugin was with integrated sub categories with pages on sub navigations. Basically, I had pages set up but when you clicked on a page, a sub navigation appeared that would display both sub categories and pages that relate to that page. Without the Sticky Menu plugin I would never have been able to do this.

Currently Wordpress syntax allows you to call either pages or categories, but not both integrated with each other. The Sticky Menu plugin takes care of that for you.

If you are looking for a book/manual to help you understand Zen Cart better than I recommend Zen Cart - E-commerce Application Development by Suhreed Sarkar. Zen Cart has alot of options and little bells and whistles and no matter what level of webmaster you are, it can be difficult to use, maintian, and develop. This manual will help answer many important questions you will have with your Zen Cart store. I have purchased a Zen Cart manual before, but this one is much better than the one I used previously. Here’s what book covers:

Installing & Basic Configuration of Zen Cart

Installing is one thing, but the basic configurations are another. Many developers, including myself have bypassed many of the basic configurations Zen Cart offers simply due to ignorance. You also learn exactly what Zen Cart has and can do right off the bat so you know what you are getting yourself into from the start.

Customize Look and Feel

In these chapters you get to understand the template file structure. You’ll learn how to create and customize your own new templates in Zen Cart. Suhreed’s simple instructions help clarify alot of issues designers have in making Zen Cart ecommerce stores look better. The biggest knock on Zen Cart has less to do with functionality, and more to do with usability and design. Suhreed helps clarify a few solutions that help your Zen Cart store look as good as any other.

Localization of Zen Cart

Many of you want to have a shopping cart that is available in many different languages, but just don’t know how to make that possible. Suhreed covers the topics of multiple languages, tax zones and many others so that you can sell your products to the world. In 15 minutes of reading I learned a heck of alot about what Zen Cart can do with multiple languages. It helped me gain a better respect for Zen Cart’s already created functions.

Migration from OS Commerce

Suhreed helps layout the specifics when it comes to migrating from an old OS Commerce web store over to your new Zen Cart one. This is a very common task that many people do and a very important one. Since Zen Cart is an advanced version of OS Commerce, you may find yourself wanting to do an upgrade yourself. Suhreed will show you how.

Maintenance & Troubleshooting

I have talked with many people who have spent hours and hours trying to troubleshoot a simple issue with Zen Cart. I myself have spent hours of my own time trying to find answers or solutions with no luck. For example, one evening I spent 4 hours trying to figure out how to allow customers to make purchases without having to create an account! Only to find out that by default, Zen Cart only allows customers to make purchases with an account, and that I needed a custom plugin to enable purchasing without an account! At the time I wish I had a good manual that could help me save those 4 hours. If only I had this manual back then. 

Integrate with other CMS’s

Last but not least perhaps the best chapter of this manual. I have not seen another Zen Cart author cover this in any other book. I also have not seen too much documentation of this on the web anywhere. Suhreed helps you learn how to easily integrate your Zen Cart ecommerce store with a Wordpress and/or Drupal content management system. Instead of wasting your time setting up some kind of shopping cart plugin, just integrate a full on Zen Cart store right into your site. For me this is the highlight of this book!!

Go get a copy of the book yourself if you are using Zen Cart. It’s currently listed at $45 at Packt Publishing. Follow the link also to learn more about the product from the author himself.

I was doing some research today in need of finding a directory plugin for Wordpress. This wasn’t the first time I had actually searched for something like this. But unlike past efforts, this time I found something. And it’s something very good! It’s called the WP Link Directory plugin for Wordpress and it was exactly what I was looking for. Probably something you are looking for as well. The plugin was created by web developer Alec Tang and here are the features as mentioned from his website:

Creation of link categories, sub-categories with descriptions

You can create any number of categories with description in the directory, including sub-categories.

Quick add of link from admin backend and visitor front-end

Your visitor will be able to click on this link “Insert your link here”, it will pop out a form below for submission. Clean and simple.

Search engine for admin to find link

You can search for a particular link based on its title, domain name, email address, etc, thus never have to worry about can’t find a link that you want to delete or edit.

Easy integration to your Wordpress theme

Now, this is one of the highlights of the plugin. You don’t have to worry about the template because this directory will use your Wordpress theme. You can easily modify styling using the external style sheet provided in the directory folder.

Backlink cleansing for checking reciprocal links

Yes! Another powerful option!!! What it is, is enabling you to run a link cleansing process that checks each reciprocal links and see if the site is linking back to you as it promised. A list of broken links will be listed and you can either remove them or do something else.

Non-reciprocal link allowance

Yes!!! Another great great great thing of the script. There’s many time when we want to allow a link to have non-reciprocal link, eg. you might just start setting up the directory and you’d need to stuff some default links in it. Thus, you can simply check the tickbox of “Allow non reciprocal”, and then the link will not be checked when performing link cleansing check.

Email notification templates

Sure you want to be able to have a good email template system that manage communication for submitters and webmaster. Thus, this script allows you to set a custom email template system for link notification and approval.

SEO friendly url rewrite

Wow! What more do you want? SEO friendly URL rewrite feature, that re-writes all url to search engine friendly format. Note that this requires you to be running on an apache though.

Here’s How To Install It!

1. Upload everything you downloaded to your root directory, except upgrade.txt, install.txt, license.txt and database.txt. (See manual). Tha means, if your blog is at domain.com/blog, then upload everything into /blog directory.
2. Chmod 777 to “directory/temp” folder. Go to plugin page and activate the plugin.
3. Go to option -> Link Manager to set your configurations.
4. Your directory is ready! (eg. http://www.yourdomain.com/directory/)

I’m currently using this plugin for a project I am working on and it’s working out great. The ability for me to customize the CSS and layout easily is probably my favorite feature of this plugin. It was very important for me that this plugin integrate design wise with the site I am working on. Too often link plugins for many CMS’s look weird and don’t flow with their respective sites. Check out the WP Link Directory Plugin for Wordpress. It’s totally free.

Don’t really understand what Drupal is yet? Still comparing Drupal to Wordpress? Then take 20 minutes and watch this video to get a better understanding of the monster that is Drupal! Whether you are a professional web designer/developer, freelancer, or just a basic webmaster understanding Drupal will at some point be critical to what you do. Take a looK!

http://video.google.com/videoplay?docid=-1412997312232368487

The TAC module, short for Taxonomy Access Control, gives you the ability to manage Access control for user roles based on taxonomy categories (vocabulary, terms) in Drupal. Sounds effective but how to use it is the key! I have talked with many people who need this sort of functionality and knew of the existence of this module, but could not figure out how to use it. I’ve got a step by step guide here for you on how I used it to make things a little more easy for you.

Practical Use of the TAC Module 

So why and when would you use this module for Drupal?  Let’s say you wanted to give specific users access to edit certain pages on your website, and those certain pages only! Or, let’s say you just have a “premium” section of your site that you want people to register for an account for before they can access it! These are two classic examples of why you would need to use the TAC module.

In my case, I needed it because a client of mine needed both mentioned above. He needed to give a certain page acccess only to those who are logged in. And also, he wanted to make a category of pages on his site editable by certain members of his staff. I went through alot of troubleshooting and about 5 hours of head scratching before I achieved my goal with this. So below are my specific steps to accomplish this saving you some serious time!

Step 1 - Install TAC Module

Let’s start this off right. Install the module just like you would any other module. The link to the module is at the beginning of this blog post. If by chance you already have the TAC_Lite module installed, install it first before installing this module. If you don’t know what i’m talking about, then don’t worry about it. Move on.

Step 2 - Create User(s)

For users that I want to have edit acccess to pages, I first created those users in my system. For the “premium” content users, I don’t need to create them. They are just classified as “Authenticated” users inside Drupal. You create a new user by going to User Management >> Users >> Add User.

Step 3 - Create User Roles

Now we need to create specific user roles. This is done by going to User Management >> Roles >>.  These roles are important because they let you specify multiple situations. In my example I needed two situations, one where the authenticated user could view “premium” content and the other where the “tech support” team needed access to all “tech support” pages. So create any user roles that apply to you here.

Step 4 - Assign Users to Roles

Now that you have your roles created, the user needs to be assigned to a role in order for the role to take into effect. When you go to create or edit a role, there is now a checkbox that allows you to select the role that you want for that usesr.

Step 5 - Create Taxonomy & Terms

The next step is that you need to classify the content pages that you are wanting to involve into this whole process. You need to create a taxonomy in my case “tech support” with the needed terms in my case “tech support” again.

Step 6 - Create Content

Now you can create your pages/posts/story etc. In my case I created my “tech support” pages. When you create your new page, you now have a dropdown option that let’s you select the term with the taxonomy that you created. Do that to assign your content page to the correct taxonomy!

Step 7 - Setup TAC Permissions

This is a very important step.  Go to User Management >> Taxonomy Access: Permissions. You will see your new roles that you created. Select on your roles and make the neccesssary modifications here. A stands for allow, I stands for Ignore, and D stands for disallow. Disallow always overrides allow. So make sure you are giving the correct permissions for the 3 main functions of View, Edit, & Delete. You will see that for each role in your Drupal system, you can specificy permissions for each Taxonomy! That’s the beautiful part of this module!

Step 8 - Access To Input Format Types

This part will trick you if you don’t know any better. But here is how it works. Basically when you create your pages, if you want to give someone else access to edit that page, you also need to give them access to the input type that you created the page on. So if you created the page using the Full HTML mode, then you need to go to Site Configuration >> Input Formats >> and select on Full HTML. Then check the boxes next to the roles that you want to have access to this Input Format Type!

I hope that all makes sense. If not feel free to contact me if you need further help. It can be a little confusing when you get into multiple access configurations. But once you get the hang of it it starts to make better sense.