phpBB 3.0 Installation Guide2 – Administration Control Panel

January 24, 2010 by  
Filed under Phpbb Forums

1.3. General settings

zeroK

In this section you will learn how to change some of the basic settings of your new board.

Right after the installation you will be redirected to the so called “Administration Control Panel” (ACP). You can also access this panel by clicking the [Administration Control Panel] link at the bottom of your forum. In this interface you can change everything about your board.

1.3.1. Board Settings
The first section of the ACP you will probably want to visit right after the installation is “Board Settings”. Here you can first of all change the name (Site name) and description (Site description) of your board.

1.3. Board Settings

Here you can edit the Site name and Site description of your board.

This form also holds the options for changing things like the timezone (System timezone) as well as the date format used to render dates/times (Date format).

There you can also select a new style (after having installed it) for your board and enforce it on all members ignoring whatever style they’ve selected in their “User Control Panel”. The style will also be used for all forums where you haven’t specified a different one. For details on where to get new styles and how to install them, please visit the styles home page at phpbb.com.

If you want to use your board for a non-English community, this form also lets you change the default language (Default Language) (which can be overridden by each user in their UCPs). By default, phpBB3 only ships with the English language pack. So, before using this field, you will have to download the language pack for the language you want to use and install it. For details, please read Language packs .

1.3.2. Board Features

If you want to enable or disable some of the basic features of your board, this is the place to go. Here you can allow and disallow for example username changes (Allow Username changes) or the creation of attachments (Allow Attachments). You can even disable BBCode altogether (Allow BBCode).

1.4. Board Features

Enabling and disabling basic features with just 2 clicks

Disabling BBCode completely is a little bit to harsh for your taste but you don’t want your users to abuse the signature field for tons of images? Simply set Allow use of IMG BBCode Tag in user signatures to “No”. If you want to be a little bit more specific on what you want to allow and disallow in users’ signatures, have a look at the “Signature Settings” form.

The “Board Features” form offers you a great way to control the features in an all-or-nothing way. If you want to get into the details on each feature, there is for everything also a separated form which let’s you specify everything from the maximum number of characters allowed in a post (Max characters per post in “Post Settings”) to how large a user’s avatar can be (Maximum Avatar Dimensions in “Avatar Settings”).

Important

If you disable features, these will also be unavailable to users who would normally have them according to their respective permissions. For details on the permissions system, please read Section 1.5, “Setting permissions” or the in-depth guide in the Administrator Guide.

1.4. Creating and setting up forums
Anon

MennoniteHobbit

Forums are the sections where topics are stored. Without forums, your users would have nowhere to post! Creating forums is very easy.

Firstly, make sure you are logged in. Find the [ Administration Control Panel ] link at the bottom of the page, and click it. You should be in the Administration Index. You can administer your board here.

There are tabs at the top for the Administration Control Panel that will guide you to each category. You must get to the Forum Administration section to create a forum, so click the Forums tab.

The Forum Administration Index is where you can manage forums on your site. Along with being able to create forums, you are also able to create subforums. Subforums are forums that are located in a parent forum in a hierachy. For more information about subforums, see the administration guide on subforums.

Find the Create new forum button on the right side of the page. Type in the name of the forum you wish in the textbox located directly to the left of this button. For example, if the forum name was to be Test, in the text box put Test. Once you are done, click the Create new forum button create the forum.

You should see a page headed with the text “Create new forum :: Test”. You can change options for your forum; for example you can set what forum image the forum can use, if it’s a category, or what forum rules text will belong to the forum. You should type up a brief description for the forum as users will be able to figure out what the forum is for.

1.5. Creating a new forum

Here you can choose the name and the description of your a new forum.

The default settings are usually good enough to get your new forum up and running; however, you may change them to suit your needs. But there are three key forum settings that you should pay attention to. The Parent Forum setting allows you to choose which forum your new forum will belong to. Be careful to what level you want your forum to be in. (The Parent Forum setting is important when creating subforums. For more information on subforums, continue reading to the section on creating subforums) The “Copy Permissions” setting allows you to copy the permissions from an existing forum to your new forum. Use this if you want to keep permissions constant. The forum style setting allows you to set which style your new forum will display. Your new forum can show a different style to another. For more information on each forum setting, see the Section 3.3, “Forum Admin”

Once you’re done configuring the settings of your new forum, scroll to the bottom of the page and click the Submit button to create your forum and it’s settings. If your new forum was created successfully, the screen will show you a success message.

If you wish to set permissions for the forum (or if you do not click on anything), you will see the forum permissions screen. If you do not want to (and want to use the default permissions for your new forum), click on the Back to previous page link. Otherwise, continue and set each setting to what you wish. Once you are done, click the Apply all Permissions button at the bottom of the page. You will see the successful forum permissions updated screen if it worked.

Important

If you do not set any permissions on this forum it will not be accessible to anyone (including yourself).

You have successfully updated your forum permissions and set up your new forum. To create more forums, follow this general procedure again.

.5. Setting permissions

dhn

After you created your first forum, you have to decide who has access to it and what your users are allowed to do and what not. This is what Permissions are for. You can disallow guests to post or hand out moderating powers, for instance. Almost every aspect of user interaction with phpBB3 Olympus can be adjusted with permissions.

1.5.1. Permission types

There are four different types of permissions:

User/Group permissions (global) – e.g. disallow changing avatar

Administrator permissions (global) – e.g. allow to manage forums

Moderator permissions (global or local) – e.g. allow to lock topics or ban users (only global)

Forum permissions (local) – e.g. allow to see a forum or post topics

Each permission type consists of a different set of permissions and can apply either locally or globally. A global permission type is set for your whole bulletin board. If you disallow one of your users to send Private Messages, for instance, you have to do this with the global user permission. Administrator permission are also global.

1.6. Global and local permissions

Global and local permissions

On the other hand local permissions do only apply to specific forums. So if you disallow someone to post in one forum, for instance, it will not impact the rest of the board. The user will still be able to post in any other forum he has the local permission to post.

You can appoint moderators either globally or locally. If you trust some of your users enough, you can make them Global Moderators. They can moderate all forums they have access to with the permissions you assign to them. Compared to that, local moderators will only be able to moderate the number of forums you select for them. They can also have different moderator permissions for different forums. While they are able to delete topics in one forum, they may not be allowed to do it in another. Global moderators will have the same permissions for all forums.

1.5.2. Setting forum permissions

To set the permissions for your new forum we need the local Forum Based Permissions. First you have to decide how you want to set the permissions. If you want to set them for a single group or user, you should use the Group or User Forum Permissions. They will allow you to select one group or user, and then select the forums you want to set the permissions for.

But for this Quick Start Guide we will concentrate on the Forum Permissions. Instead of selecting a user or group, you select the forums you want to change first. You can select them either by selecting the forums manually in the top list, or by single forum and single forum plus subforums respectively in the lower pull down menus. Submit will bring you to the next page.

1.7. Select Groups

Select Groups or Users to set Forum Permissions

The Forum Permissions page shows you two columns, one for users and one for groups to select (see Figure 1.7, “Select Groups”). The top lists on both columns labelled as Manage Users and Manage Groups show users and groups that already have permissions on at least one of your selected forums set. You can select them and change their permissions with the Edit Permissions button, or use Remove Permissions to remove them which leads to them not having permissions set, and therefore not being able to see the forum or have any access to it (unless they have access to it through another group). The bottom boxes allow you to add new users or groups, that do not currently have permissions set on at least one of your selected forums.

To add permissions for groups, select one or more groups either in the Add Groups list (this works similar with users, but if you want to add new users, you have to type them in manually in the Add Users text box or use the Find a member function). Add Permissions will take you to the permission interface. Each forum you selected is listed, with the groups or users to change the permissions for below them.

There are two ways to assign permissions: You can set them manually or use predefined Permission Roles for a simpler but less powerful way. You can switch between both approaches any time you want. You can skip the manual permission introduction and jump directly into the section on “Permissions Roles”, if you are eager to get everything running as quickly as possible. But remember that permission roles do only offer a small bit of what the permission system has to offer and we believe that to be a good Olympus administrator, you have to fully grasp permissions.

Both ways only differ in the way you set them. They both share the same interface.

1.5.3. Manual permissions

This is the most important aspect of permissions. You need to understand this to properly work with them. There are three different values that a permission can take:

YES will allow a permission setting unless it is overwritten by a NEVER.

NO will be disallow a permission setting unless it is overwritten by a YES.

NEVER will completely disallow a permission setting for a user. It cannot be overwritten by a YES.

The three values are important as it is possible for a user to have more than one permissions for the same setting through multiple groups. If the user is a member of the default “Registered Users” group and a custom group called “Senior Users” you created for your most dedicated members, both could have different permissions for seeing a forum. In this example you want to make a forum called “Good old times” only available to the “Senior Users” group, but don’t want all “Registered Users” to see it. You will of course set the Can see forum permission to Yes for “Senior Users”. But do not set the permission to Never for “Registered Users”. If you do this, “Senior Members” will not see the forum as the Never overrides any Yes they have. Leave the setting at No instead. No is a weak Never that a Yes can override.

1.8. Manual permissions

Setting permissions manually

1.5.4. Permissions roles

phpBB3 Olympus ships with a number of default permission roles, that offer you a wide variety of options for setting permissions. Instead of having to check each radio button manually, you can select a predefined role in the Rolepull down list. Each role has a detailed description, that will pop up when you hover your mouse over it. Submit your changes with Apply Permissions or Apply All Permissions when you are satisfied with them. That will set the permissions and you are done.

1.9. Permission roles

Setting permissions with roles

But permission roles are not only a quick and easy way to set permissions, they are also a powerful tool for experienced board administrators to manage permissions on bigger boards. You can create your own roles and edit existing ones. Roles are dynamic, so when you edit a role, all groups and users that have the role assigned will automatically be updated.

1.5.5. Assign moderators to forums

zeroK

A quite common use case for permissions and roles are forum moderation. phpBB3 makes assigning users as moderators of forums really simple.

As you might have already guessed, moderation of specific forums is a local setting, so you can find Forum Moderators in the section for Forum Based Permissions. First of all, you will have to select for forum (or forums) you want to assign new moderators to. This form is divided into three areas. In the first one, you can select multiple forums (select multiple by holding down the CTRL button on your keyboard, or cmd (under MacOS X)), where the moderator settings you will set in the following form will only apply to these exact forums. The second area allows you to select only one forum but all the following settings will apply not only to this forum but also all its subforums. Finally, the third area’s selection will only affect exactly this forum.

After selecting the forums and hitting Submit, you will be greeted by a form you should already be familiar with from one of the previous sections in this guide: Figure 1.7, “Select Groups”. Here you can select the users or groups that should get some kind of moderation power over the selected forums. So go ahead: Select some users and/or groups and hit the Set Permissions button.

In the next form you can choose, what moderator permissions the selected users/groups should receive. First of all, there are some predefined roles from which you can select:

Standard Moderator

A Standard Moderator can approve or disapprove, edit and delete posts, delete or close reports, but not necessarily change the owner of a post. This kind of moderator can also issue warnings and view details of a post.

Simple Moderator

A Simple Moderator can edit posts and close and delete reports and can also view post details.

Queue Moderator

As a Queue Moderator, you can only approve or disapprove posts that landed in the moderator queue and edit posts.

Full Moderator

Full Moderators can do everything moderation-related; they can even ban users.

1.10. The Forum Moderator’s Permissions

Set the moderator’s permissions

When you’re done simply hit Apply all Permissions. All the permissions mentioned here can also be selected from the right side of the form to give you more granular options.

1.5.6. Setting global permissions

zeroK

Local Permissions are too local for you? Well, then phpBB3 has something to offer for you, too: Global Permissions:

Users Permissions

Groups Permissions

Administrators

Global Moderators

In “User Permissions” and “Group Permissions” you can allow and disallow features like attachments, signatures and avatars for specific users and user groups. Note that some of these settings only matter, if the respective feature is enabled in the “Board Features” (see Section 1.3.2, “Board Features” for details).

Under “Administrators” you can give users or groups administrator privileges like the ability to manage forums or change user permissions. For details on these settings please read the Section 3.7, “Permission Overload”.

The “Global Moderators” form offers you the same settings as the forum specific form (described in Section 1.5.5, “Assign moderators to forums”) but applies to all forums on your board.

1.6. Obtaining support

The phpBB Team provides many options for users to find support for their phpBB install. In addition to this very documentation, the support forum on www.phpbb.com has many answers that users like you are searching for. Therefore, we highly recommend the use of the search feature before asking a new question. If you are unable to find an answer, feel free to post a new topic asking for help. Be sure to be descriptive when explaining your problem! The more we know about what is happening, the faster we can provide you with the answer you are looking for. Be sure to fill out the Support Request Template with the information it asks for.

In addition to the support forum on www.phpbb.com, we provide a Knowledge Base for users to read and submit articles on common answers to questions. Our community has taken a lot of time in writing these articles, so be sure to check them out.

We provide realtime support in #phpBB on the popular Open Source IRC network, Freenode. You can typically find someone from each of the teams in here, as well as fellow users who are more than happy to help you out. Be sure to read the IRC rules before joining the channel, as we have a few basic netiquette rules that we ask users to follow. At any given time, there can be as many as 60 users, if not more in the channel, so you are almost certain to find someone there to help you. However, it is important that you read and follow the IRC rules as people may not answer you. An example of this is that oftentimes users come in to the channel and ask if anybody is around and then end up leaving 30 seconds later before someone has the chance to answer. Instead, be sure to ask your question and wait. As the saying goes, “don’t ask to ask, just ask!”

English is not your native language? Not a problem! We also provide an International Support page with links to various websites that provide support in Espanol, Deutsch, Francais, and more.

phpBB 3.0 Installation Guide – Steps of Installation process

January 24, 2010 by  
Filed under Phpbb Forums

phpBB 3.0 Olympus has an easy to use installation system that will guide you through the installation process.

After you have decompressed the phpBB3 archive and uploaded the files to the location where you want it to be installed, you need to enter the URL into your browser to open the installation screen. The first time you point your browser to the URL (http://www.example.com/phpBB3 for instance), phpBB will detect that it is not yet installed and automatically redirect you to the installation screen.

1.1. Introduction

The introduction page of the installation system.

1.2.1. Introduction

The installation screen gives you a short introduction into phpBB. It allows you to read the license phpBB 3.0 is released under (the General Public License) and provides information about how you can receive support. To start the installation, click the Install tab (see Figure 1.1, “Introduction”).

1.2.2. Requirements

Important

Please read the section on phpBB3′s requirements to find out more about the phpBB 3.0′s minimum requirements.

The requirements list is the first page you will see after starting the installation. phpBB 3.0 automatically checks if everything that it needs to run properly is installed on your server. In order to continue the installation, you will need to have PHP installed (the minimum version number is shown on the requirements page), and at least one database available to continue the installation. It is also important that all shown folders are available and have the correct permissions set. Please see the description of each section to find out if they are optional or required for phpBB 3.0 to run. If everything is in order, you can continue the installation by clicking the Start Install button.

1.2.3. Database settings

You now have to decide which database to use. See the Requirements section for information on which databases are supported. If you do not know your database settings, please contact your hosting company and ask for them. You will not be able to continue without them. You need:

The Database Type – the database you will be using (e.g. mySQL, SQL server, Oracle)

The Database server hostname or DSN – the address of the database server.

The Database server port – the port of the database server (most of the time this is not needed).

The Database name- the name of the database on the server.

The Database username and Database password – the login data to access the database.

Tip

If you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.

1.2. Database settings

The database settings screen, please make sure to have all the required data available

You don’t need to change the Prefix for tables in database setting, unless you plan on using multiple phpBB installations on one database. In this case you can use a different prefix for each installation to make it work.

After you have entered your details, you can continue by clicking the Proceed to next step button. Now, phpBB 3.0 will test and verify the data you entered.

If you see a “Could not connect to the database” error, this means that you didn’t enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.

Tip

Remember that your database username and password are case sensitive. You must use the exact one you have set up or been given by your host

If you installed another version of phpBB before on the same database with the same prefix, phpBB will inform you and you just need to enter a different database prefix.

If you see the Successful Connection message, you can continue to the next step.

1.2.4. Administrator details

Now you have to create your administration user. This user will have full administration access and he will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla (basic) phpBB 3.0 installation we only include English [GB]. You can download further languages from www.phpbb.com, and add them later.

1.2.5. Configuration file

In this step, phpBB will automatically try to write the configuration file. The forum needs the configuration to run properly. It contains all of the database settings, so without it, phpBB will not be able to access the database.

Usually, automatically writing the configuration file works fine. But in some cases it can fail due to wrong file permissions, for instance. In this case, you need to upload the file manually. phpBB asks you to download the config.php file and tells you what to do with it. Please read the instructions carefully. After you have uploaded the file, click Done to get to the last step. If Done returns you to the same page as before, and does not return a success message, you did not upload the file correctly.

1.2.6. Advanced settings
The Advanced settings allow you to set some parameters of the board configuration. They are optional, and you can always change them later if you wish. So if you are unsure of what these settings mean, ignore them and proceed to the final step to finish the installation.

If the installation was successful, you can now use the Login button to visit the Administration Control Panel. Congratulations, you have installed phpBB 3.0 successfully. But there is still a lot of work ahead!

If you are unable to get phpBB 3.0 installed even after reading this guide, please look at the support section to find out where you can ask for further assistance.

At this point if you are upgrading from phpBB 2.0, you should refer to the upgrade guide for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.

Build a phpBB Forum in 5 Steps

January 22, 2010 by  
Filed under Phpbb Forums

If you’re thinking of setting up a forum for your Website, you need not start from scratch. The open-source script, phpBB, can easily be installed on most Web servers. This article will describe how to do it right, from downloading through to customisation.
To use this tutorial, you need not know anything about PHP, and need only have had minimum experience with databases.

Introduction to phpBB

phpBB is a stable, open-source, bulletin board script available as a free download from phpbb.com. It allows you to set up an unlimited number of forums and categories. Users, moderators and user groups with varying permissions can be created. In short, it provides everything you’d expect of a bulletin board service. For a complete list of all supported features, see phpbb.com/features.

This software can easily be installed using FTP and a browser. It will run on any PHP-enabled server and requires any one of the following databases: MySQL, PostgreSQL, MS SQL or Access via ODBC.

It doesn’t matter whether your server is running IIS or Apache, though setup tends to be simpler on an Apache Web server. Any Website administrator should be able to install and configure phpBB in a minimum amount of time.

The administrator’s interface allows for ongoing maintenance, so that styles can be changed and topics added or removed. In fact, any administrative duties can be easily performed.

The installation instructions provided at the phpBB site are clear and straightforward. This article does not attempt to replace those instructions but to supplement them and to assist site administrators who are not familiar with PHP. It will help you determine whether you can run phpBB on your server, and if so, how to upload, install and configure it.

System Requirements

As phpBB is written using the server-side scripting language PHP, you need to know whether your Web server supports this language.
If you don’t know the answer to this question, you can always ask your Web host, or upload the following script to your server.

<?php

phpinfo();

?>

Use any text editor to create this file and save it as info.php. The actual name of the file is not as important as the extension, .php. In text mode, upload this file to the root directory on your server. View it by typing the address into your browser.
If your server does not support PHP, all you will see are the three lines of code shown above. In this case, get in touch with your Web host and see if PHP can be enabled for your domain.

If PHP is installed, the configuration settings of PHP will be displayed. Assuming that you have PHP enabled on your server, the info.php file will also be useful to help determine if you have the database support needed by phpBB.

Confirming database support for phpBB varies slightly depending upon the Web server you’re running. Let’s first look at Web servers that use Apache.

Apache/Linux

Most versions of PHP on Apache are compiled with support for MySQL databases. You can confirm this by looking again at the “info.php” file. The third line of this file should be the Configure Command. In this line, look for the words with-mysql.
PostgreSQL is not as widely supported, but you should be able to discover whether your server supports it in exactly the same way, but instead, looking for with-pgsql.

IIS/Windows

There will be no Configure Command available when PHP is run on a Windows platform, so we’ll take a slightly different approach to confirm database support here. Again viewing the info.php file, choose Find from your browser’s menu options and search for your database type.

For instance, if we searched for mssql to confirm support for MS SQL Server, we should see something similar to the text below:

In the same way, you can test for PostgreSQL using the search string pgsql, for MySQL using mysql, and for ODBC support using odbc.
Use the info.php file to determine which version of the database you have. You’ll need to know this when we begin the installation, and, with database and PHP support confirmed, we can now begin that process.

Upload The phpBB Files

Assuming you’ve downloaded and decompressed the files for phpBB, everything you need to upload should be in the directory called phpBB2. The only real requirement is that the directory structure be preserved.

Use your favourite FTP program to upload the files to your server. Make sure that all non-graphic files are transferred in ASCII mode. Most FTP programmes will do this automatically for you, based on the file extensions. Make sure your software is configured to transfer all files with the extensions .php, .tpl, .inc, .htm and .cfg as text files.

After the upload is complete, change the permissions on the config.php file so that they’re writeable by all. If you don’t know how to do this, don’t worry about it. The program will give you the option of saving a new config.php file and then overwriting the original.

Prepare for Installation

In preparation for setting up phpBB on your server, you’ll need the following information:

• Database Server Hostname/DSN

• Database Name

• Database Username

• Database Password

• Admin Email Address

Let’s discuss this information before we proceed. The host name will be the domain name at which your database is hosted. If your database is hosted on the same server as your Web server, all you need enter here is localhost. If it resides on another server, you can enter the appropriate domain name or the IP address. If instead you’re using ODBC to connect, you will need the connection name. If you are unsure about your situation, clarify the specifics with your Web host.

The database name is, quite simply, the name of the database you’re planning to use. You may use an existing database or create a new one. To create a new database, you may again need to speak with your Web host. If you’re using MySQL with phpMyAdmin, then it’s a relatively simple matter. If you’re using an existing database, table names will be created with a distinctive prefix so that the phpBB tables are readily identifiable.

The username and password need no explanation. The admin email is the email address to which you want questions relating to your bulletin board to be sent.

Installation

With all the information at hand, installation is as simple as pointing your browser towards the install.php file. If you uploaded the directory phpBB2 and its contents to the root directory of your server, the path you need is http://www./phpBB2/install/install.php.

Fill in the text boxes and press the Start Install button. Within seconds you should be finished — installation really is that simple. All the necessary database tables have been created for you. If you wish, have a look at them. There should be a total of 29 new tables — and we haven’t even had to think about SQL!

Shut down your browser, and don’t forget to delete the directories called contrib and install. phpBB won’t run until you do so. If, during the installation, you were asked to download the “config.php” file, you must now upload it to the phpBB2 directory, overwriting the existing file.

Administer Your Forum

To administer your Bulletin Board open http://www./phpBB2/index.php in your browser, and log in with the administrator name and password that you specified on installation. Then, click the Go to Administration Panel link at the bottom of the page. You’ll probably want to go to Forum Admin > Management first, to set up a new forum and categories.

Styles Admin is probably the next area you’ll want to look at, but before you do, go to the phpBB site and see what other styles you might like to download. Upon installation, the phpBB default style, subSilver, is the only one available, but any number of styles may be installed.

After downloading them from the phpBB site, you need to upload your new styles to the Templates directory, which is directly below the phpBB2 directory. After this, new styles must be installed from the Administration panel by going to Styles Admin > Add.
Once you’ve found a theme you like, you can further customise it from the administration panel by choosing Style Admin > Management > Edit. You can associate a theme with an entirely new Cascading Style Sheet (CSS), or you can edit the existing one.

Customise Your Forum

Once you’ve settled on a style, you will doubtless want to further customise it in ways that aren’t available through the Administration panel. For instance, you might want to display your own logo, rather than the phpBB logo.
If you have some knowledge of HTML, minor changes like this are not too difficult. Any changes you wish to make to the appearance of the header can be addressed by making changes to the file called overall_header.tpl. Since this file is included for every page within a style, your changes will take effect throughout the whole bulletin board.

Some other changes can be relatively easy to make. For instance, if it doesn’t make sense to have user groups, the appropriate code can simply be commented out of the overall_header.tpl file.

Be aware that phpBB allows users to choose their own styles, so, unless you choose to override the user’s choice of style from the general configuration menu, any installed templates will be available for users to choose. If you do decide to customise styles and also want to allow users their choice, you’ll have to make the appropriate changes to every style template. One change you shouldn’t make is to the copyright notice on the footer of each page.

Conclusion

With little effort and no cost, you’ve installed a professional bulletin board service on your Website, regardless of the server you’re using and your level of knowledge of PHP and databases. The style of this bulletin board can be easily configured to match the look and feel of the rest of your site, so give it a try!

Creating your own WordPress Plugins Easily

January 22, 2010 by  
Filed under Wordpress

WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins. Here is a basic definition:

WordPress Plugin: A WordPress Plugin is a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).

Wishing that WordPress had some new or modified functionality? The first thing to do is to search various WordPress Plugin repositories and sources to see if someone has already created a WordPress Plugin that suits your needs. If not, this article will guide you through the process of creating your own WordPress Plugins.

This article assumes you are already familiar with the basic functionality of WordPress, and PHP programming.

Resources
■To understand how WordPress Plugins work and how to install them on your WordPress blog, see Plugins.
■There is a comprehensive list of articles and resources for Plugin developers, including external articles on writing WordPress Plugins, and articles on special topics, in Plugin Resources.
■To learn the basics about how WordPress Plugins are written, view the source code for well-written Plugins, such as Hello Dolly distributed with WordPress.
■Once you have written your WordPress Plugin, read Plugin Submission and Promotion to learn how to distribute it and share it with others.
Creating a Plugin
This section of the article goes through the steps you need to follow, and things to consider when creating a well-structured WordPress Plugin.

Names, Files, and Locations
Plugin Name
The first task in creating a WordPress Plugin is to think about what the Plugin will do, and make a (hopefully unique) name for your Plugin. Check out Plugins and the other repositories it refers to, to verify that your name is unique; you might also do a Google search on your proposed name. Most Plugin developers choose to use names that somewhat describe what the Plugin does; for instance, a weather-related Plugin would probably have the word “weather” in the name. The name can be multiple words.

Plugin Files
The next step is to create a PHP file with a name derived from your chosen Plugin name. For instance, if your Plugin will be called “Fabulous Functionality”, you might call your PHP file fabfunc.php. Again, try to choose a unique name. People who install your Plugin will be putting this PHP file into the WordPress Plugin directory in their installation, wp-content/plugins/, so no two Plugins they are using can have the same PHP file name.

Another option is to split your Plugin into multiple files. Your WordPress Plugin must have at least one PHP file; it could also contain JavaScript files, CSS files, image files, language files, etc. If there are multiple files, pick a unique name for a file directory and for the main PHP file, such as fabfunc and fabfunc.php in this example, put all your Plugin’s files into that directory, and tell your Plugin users to install the whole directory under wp-content/plugins/.

In the rest of this article, “the Plugin PHP file” refers to the main Plugin PHP file, whether in wp-content/plugins/ or a sub-directory.

Readme File
If you want to host your Plugin on http://wordpress.org/extend/plugins/, you also need to create a readme.txt file in a standard format, and include it with your Plugin. See http://wordpress.org/extend/plugins/about/readme.txt for a description of the format.

Home Page
It is also very useful to create a web page to act as the home page for your WordPress Plugin. This page should describe how to install the Plugin, what it does, what versions of WordPress it is compatible with, what has changed from version to version of your Plugin, and how to use the Plugin.

File Headers
Now it’s time to put some information into your main Plugin PHP file.

Standard Plugin Information
The top of your Plugin’s main PHP file must contain a standard Plugin information header. This header lets WordPress recognize that your Plugin exists, add it to the Plugin management screen so it can be activated, load it, and run its functions; without the header, your Plugin will never be activated and will never run. Here is the header format:

The minimum information WordPress needs to recognize your Plugin is the Plugin Name line. The rest of the information (if present) will be used to create the table of Plugins on the Plugin management screen. The order of the lines is not important.

License
It is customary to follow the standard header with information about licensing for the Plugin. Most Plugins use the GPL license used by WordPress or a license compatible with the GPL. To indicate a GPL license, include the following lines in your Plugin:

Programming Your Plugin
Now, it’s time to make your Plugin actually do something. This section contains some general ideas about Plugin development, and describes how to accomplish several tasks your Plugin will need to do.

WordPress Plugin Hooks
Many WordPress Plugins accomplish their goals by connecting to one or more WordPress Plugin “hooks”. The way Plugin hooks work is that at various times while WordPress is running, WordPress checks to see if any Plugins have registered functions to run at that time, and if so, the functions are run. These functions modify the default behavior of WordPress.

For instance, before WordPress adds the title of a post to browser output, it first checks to see if any Plugin has registered a function for the “filter” hook called “the_title”. If so, the title text is passed in turn through each registered function, and the final result is what is printed. So, if your Plugin needs to add some information to the printed title, it can register a “the_title” filter function.

Another example is the “action” hook called “wp_footer”. Just before the end of the HTML page WordPress is generating, it checks to see whether any Plugins have registered functions for the “wp_footer” action hook, and runs them in turn.

You can learn more about how to register functions for both filter and action hooks, and what Plugin hooks are available in WordPress, in the Plugin API. If you find a spot in the WordPress code where you’d like to have an action or filter, but WordPress doesn’t have one, you can also suggest new hooks (suggestions will generally be taken); see Reporting Bugs to find out how.

Template Tags
Another way for a WordPress Plugin to add functionality to WordPress is by creating custom Template Tags. Someone who wants to use your Plugin can add these “tags” to their theme, in the sidebar, post content section, or wherever it is appropriate. For instance, a Plugin that adds geographical tags to posts might define a template tag function called geotag_list_states() for the sidebar, which lists all the states posts are tagged with, with links to the state-based archive pages the Plugin enables.

To define a custom template tag, simply write a PHP function and document it for Plugin users on your Plugin’s home page and/or in the Plugin’s main PHP file. It’s a good idea when documenting the function to give an example of exactly what needs to be added to the theme file to use the function, including the .

Saving Plugin Data to the Database
Most WordPress Plugins will need to get some input from the site owner or blog users and save it between sessions, for use in its filter functions, action functions, and template functions. This information has to be saved in the WordPress database, in order to be persistent between sessions. There are two basic methods for saving Plugin data in the database:

1.Use the WordPress “option” mechanism (described below). This method is appropriate for storing relatively small amounts of relatively static, named pieces of data — the type of data you’d expect the site owner to enter when first setting up the Plugin, and rarely change thereafter.
2.Post Meta (a.k.a. Custom Fields). Appropriate for data associated with individual posts, pages, or attachments. See post_meta Function Examples, add_post_meta(), and related functions.
3.Create a new, custom database table. This method is appropriate for data associated with individual posts, pages, attachments, or comments — the type of data that will grow as time goes on, and that doesn’t have individual names. See Creating Tables with Plugins for information on how to do this.
WordPress Options Mechanism
See Creating Options Pages for info on how to create a page that will automatically save your options for you.

WordPress has a mechanism for saving, updating, and retrieving individual, named pieces of data (“options”) in the WordPress database. Option values can be strings, arrays, or PHP objects (they will be “serialized”, or converted to a string, before storage, and unserialized when retrieved). Option names are strings, and they must be unique, so that they do not conflict with either WordPress or other Plugins.

Here are the main functions your Plugin can use to access WordPress options.

add_option($name, $value, $deprecated, $autoload);
Creates a new option; does nothing if option already exists.
$name
Required (string). Name of the option to be added.
$value
Optional (string), defaults to empty string. The option value to be stored.
$deprecated
Optional (string), no longer used by WordPress, You may pass an empty string or null to this argument if you wish to use the following $autoload parameter.
$autoload
Optional, defaults to ‘yes’ (enum: ‘yes’ or ‘no’). If set to ‘yes’ the setting is automatically retrieved by the get_alloptions function.
get_option($option);
Retrieves an option value from the database.
$option
Required (string). Name of the option whose value you want returned. You can find a list of the default options that are installed with WordPress at the Option Reference.
update_option($option_name, $newvalue);
Updates or creates an option value in the database (note that add_option does not have to be called if you do not want to use the $deprecated or $autoload parameters).
$option_name
Required (string). Name of the option to update.
$newvalue
Required. (string|array|object) The new value for the option.
Administration Panels
Assuming that your Plugin has some options stored in the WordPress database (see section above), you will probably want it to have an administration panel that will enable your Plugin users to view and edit option values. The methods for doing this are described in Adding Administration Menus.

Internationalizing Your Plugin
Once you have the programming for your Plugin done, another consideration (assuming you are planning on distributing your Plugin) is internationalization. Internationalization is the process of setting up software so that it can be localized; localization is the process of translating text displayed by the software into different languages. WordPress is used all around the world, so it has internationalization and localization built into its structure, including localization of Plugins.

It is highly recommended that you internationalize your Plugin, so that users from different countries can localize it. There is a comprehensive reference on internationalization, including a section describing how to internationalize your plugin, at I18n for WordPress Developers.

Plugin Development Suggestions
This last section contains some random suggestions regarding Plugin development.

■The code of a WordPress Plugin should follow the WordPress Coding Standards. Please consider the Inline Documentation Standards as well.
■All the functions in your Plugin need to have unique names that are different from functions in the WordPress core, other Plugins, and themes. For that reason, it is a good idea to use a unique function name prefix on all of your Plugin’s functions. Another possibility is to define your Plugin functions inside a class (which also needs to have a unique name).
■Do not hardcode the WordPress database table prefix (usually “wp_”) into your Plugins. Be sure to use the $wpdb->prefix variable instead.
■Database reading is cheap, but writing is expensive. Databases are exceptionally good at fetching data and giving it to you, and these operations are (usually) lightning quick. Making changes to the database, though, is a more complex process, and computationally more expensive. As a result, try to minimize the amount of writing you do to the database. Get everything prepared in your code first, so that you can make only those write operations that you need.
■SELECT only what you need. Even though databases fetch data blindingly fast, you should still try to reduce the load on the database by only selecting that data which you need to use. If you need to count the number of rows in a table don’t SELECT * FROM, because all the data in all the rows will be pulled, wasting memory. Likewise, if you only need the post_id and the post_author in your Plugin, then just SELECT those specific fields, to minimize database load. Remember: hundreds of other processes may be hitting the database at the same time. The database and server each have only so many resources to spread around amongst all those processes. Learning how to minimize your Plugin’s hit against the database will ensure that your Plugin isn’t the one that is blamed for abuse of resources.
■Eliminate PHP errors in your plugin. Add define(‘WP_DEBUG’, true); to your wp-config.php file, try all of your plugin functionality, and check to see if there are any errors or warnings. Fix any that occur, and continue in debug mode until they have all been eliminated.

developing or designing your own WordPress Theme

January 22, 2010 by  
Filed under Wordpress

The following article is about developing or designing your own WordPress Theme. If you wish to learn more about how to install and use Themes, review the documentation regarding Using Themes. This topic differs from Using Themes because it discusses the technical aspects of writing code to build your own Themes rather than how to activate Themes or where to obtain new Themes.

You may wish to develop WordPress Themes for your own use or for distribution.

Why WordPress Themes

WordPress Themes are files and styles that work together to create a presentation or look for a WordPress site. Each Theme may be different, offering many choices for users to take advantage of in order to instantly change their website look.

Why should you build your own WordPress Theme?

 To create your own unique WordPress site look
 To take advantage of templates, template tags, and the WordPress Loop to generate different web page results and looks.
 To provide alternative templates for specific site features, such as category pages and search result pages.
 To quickly switch between two site layouts, or to take advantage of a Theme or style switcher to allow users to change the look of your site.
 To design WordPress Theme(s) so that others may enjoy your designs through public release.
A WordPress Theme has many benefits, too.
 It separates the presentation styles and template files from the system files so the site will upgrade without drastic changes to the visual presentation of the site.
 It allows for customization of the presentation and web page results unique to that Theme.
 It allows for quick changes of the look and feel of a WordPress site.
 It takes away the need for a WordPress user to have to learn CSS, HTML, and PHP in order to have a good looking website.
Why should you build your own WordPress Theme? That’s the real question.
 It’s an opportunity to learn more about CSS, HTML/XHTML, and PHP.
 It’s an opportunity to put your expertise with CSS, HTML/XHTML, and PHP to work.
 It’s creative.
 It’s fun (most of the time).
 If you release it to the public, you can feel good that you shared and gave something back to the WordPress Community (okay, bragging rights!)

Anatomy of a Theme

WordPress Themes live in subdirectories residing in wp-content/themes/. The Theme’s subdirectory holds all of the Theme’s style sheet files, template files, and optional functions file (functions.php), and images. For example, a Theme named “test” would probably reside in the directory wp-content/themes/test/.
WordPress includes two Themes in the download, a “Classic” and “Default” Theme. The two Themes are different and use different functions and tags to generate their web page results and looks. Examine the files carefully for these Themes to get a better idea of how to build your own Theme files.
WordPress Themes consist of three main types of files, in addition to images. One is the style sheet called style.css, which controls the presentation (look) of the web pages. The second is the optional functions file (functions.php). The other files are the template files which control the way the web page generates the information from the Database to be displayed as a web page. Let’s look at these individually.
Theme Style Sheet
In addition to CSS style information for your theme, the stylesheet, style.css must provide details about the Theme in the form of comments. No two Themes are allowed to have the same details listed in their comment headers, as this will lead to problems in the Theme selection dialog. If you make your own Theme by copying an existing one, make sure you change this information first.
The following is an example of the first few lines of the stylesheet, called the style sheet header, for the Theme “Rose”:
/*
Theme Name: Rose
Theme URI: the-theme’s-homepage
Description: a-brief-description
Author: your-name
Author URI: your-URI
Template: use-this-to-define-a-parent-theme–optional
Version: a-number–optional
.
General comments/License Statement if any.
.
*/
The simplest Theme includes only a style.css file, plus images, if any. To create such a Theme, you must specify a set of templates to inherit for use with the Theme by editing the Template: line in the style.css header comments. For example, if you wanted the Theme “Rose” to inherit the templates from another Theme called “test”, you would include Template: test in the comments at the beginning of Rose’s style.css. Now “test” is the parent Theme for “Rose”, which still consists only of a style.css file and the concomitant images, all located in the directory wp-content/themes/Rose. Additionally (as of WordPress 2.7), the child theme may contain template files, which can be selected in the admin panel as normal, and will override the parent’s template files where those possess the same name.
The comment header lines in style.css are required for WordPress to be able to identify a Theme and display it in the Administration Panel under Design > Themes as an available Theme option along with any other installed Themes.
Note : When defining the parent Theme, in the Template: section of the comment header, you must use the name of the directory of the style. For example, to use as parent template called Cold Steel, don’t write Template: Cold Steel, but Template: cold_steel, assuming cold_steel is the directory of that Theme. Also, Themes that inherit from default should not specify the Template: section at all.
Theme Functions File
A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php. This file basically acts like a plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages). Suggested uses for this file:
 Define functions used in several template files of your theme
 Set up an admin screen, giving users options for colors, styles, and other aspects of your theme
The “Default” WordPress theme contains a functions.php file that defines functions and an admin screen, so you might want to use it as a model. Since functions.php basically functions as a plugin, the Function_Reference list is the best place to go for more information on what you can do with this file.
Theme Template Files
Templates are PHP source files used to generate the pages requested by visitors. Let’s look at the various templates that can be defined as part of a Theme.
WordPress allows you to define separate templates for the various aspects of your weblog; however, it is not essential to have all these different template files for your blog to function fully. Templates are chosen and generated based upon the Template Hierarchy, depending upon what templates are available in a particular Theme. As a Theme developer, you can choose the amount of customization you want to implement using templates. For example, as an extreme case, you can use only one template file, called index.php as the template for all pages generated and displayed by the weblog. A more common use is to have different template files generate different results, to allow maximum customization.
Basic Templates
At the very minimum, a WordPress Theme consists of two files:
 style.css
 index.php
Both of these files go into the Theme’s directory. The index.php template file is very flexible. It can be used to include all references to the header, sidebar, footer, content, categories, archives, search, error, and other web pages generated by the user on your site. Or it can be subdivided into modular template files, each one taking on part of the workload. If you do not provide any other template files, WordPress will use the built-in default files. For example, if you do not have either a comments.php or comments-popup.php template file, then WordPress will automatically use the wp-comments.php and wp-comments-popup.php template files using Template Hierarchy. These default templates may not match your Theme very well, so you probably will want to provide your own. The basic files normally used to subdivide (which go into the Theme’s directory) are:
 header.php
 sidebar.php
 footer.php
 comments.php
 comments-popup.php
Using these modular template files, you can put template tags within the index.php master file to include or get these units where you want them to appear in the final generated web page.
 To include the header, use the get_header() template tag.
 To include the sidebar, use the get_sidebar() template tag.
 To include the footer, use the get_footer() template tag.
Here is an example of the include usage:

For more on how these various Templates work and how to generate different information within them, read the Templates documentation.
Query-based Templates
WordPress can load different Templates for different query types. There are two ways to do this: as part of the built-in Template Hierarchy, and through the use of Conditional Tags within The Loop of a template file.
To use the Template Hierarchy, you basically need to provide special-purpose Template files, which will automatically be used to override index.php. For instance, if your Theme provides a template called category.php and a category is being queried, category.php will be loaded instead of index.php. If category.php is not present, index.php is used as usual.
You can get even more specific in the Template Hierarchy by providing a file called, for instance, category-6.php — this file will be used rather than category.php when generating the page for the category whose ID number is 6. (You can find category ID numbers in Manage > Categories if you are logged in as the site administrator in WordPress version 2.3 and below. In WordPress 2.5 the ID column was removed from the Admin panels. You can locate the category id by clicking ‘Edit Category’ and looking on the URL address bar for the cat_ID value. It will look ‘…categories.php?action=edit&cat_ID=3′ where ’3′ is the category id). For a more detailed look at how this process works, see Category Templates.
If your Theme needs to have even more control over which Template files are used than what is provided in the Template Hierarchy, you can use Conditional Tags. The Conditional Tag basically checks to see if some particular condition is true, within the WordPress Loop, and then you can load a particular template, or put some particular text on the screen, based on that condition.
For example, to generate a distinctive style sheet in a post only found within a specific category, the code might look like this:

Or, using a query, it might look like this:
post;
if ( in_category(’9′) ) {
include(TEMPLATEPATH . ‘/single2.php’);
} else {
include(TEMPLATEPATH . ‘/single1.php’);
}
?>
In either case, this example code will cause different templates to be used depending on the category of the particular post being displayed. Query conditions are not limited to categories, however — see the Conditional Tags article to look at all the options.
Media Icons
This feature is currently broken in WordPress 2.5.
Wordpress uses media icons to represent attachment files on your blog and in the Admin interface, if those icons are available.
It looks for image files named by media type in the images directory of the current theme. (As of WordPress 2.2, the default theme comes with only one media icon, audio.jpg.)
For example, for an attachment of MIME type audio/mpeg, WordPress would look for an icon file at these locations, stopping after the first match (see wp_mime_type_icon):
1. my_theme/images/audio.jpg
2. my_theme/images/audio.gif
3. my_theme/images/audio.png
4. my_theme/images/mpeg.jpg
5. my_theme/images/mpeg.gif
6. my_theme/images/mpeg.png
7. my_theme/images/audio_mpeg.jpg
8. my_theme/images/audio_mpeg.gif
9. my_theme/images/audio_mpeg.png
Theme Template Files List
Here is the list of Theme template files recognized by WordPress. Of course, your Theme can contain any other style sheets, images, or files. Just keep in mind that the following have special meaning to WordPress — see Template Hierarchy for more information.
style.css
The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
index.php
The main template. If your Theme provides its own templates, index.php must be present.
comments.php
The comments template. If not present, comments.php from the “default” Theme is used.
comments-popup.php
The popup comments template. If not present, comments-popup.php from the “default” Theme is used.
home.php
The home page template.
single.php
The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
page.php
The page template. Used when an individual Page is queried.
category.php
The category template. Used when a category is queried.
tag.php
The tag template. Used when a tag is queried.
taxonomy.php
The term template. Used when a term in a custom taxonomy is queried.
author.php
The author template. Used when an author is queried.
date.php
The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
archive.php
The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
search.php
The search results template. Used when a search is performed.
404.php
The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query.
These files have a special meaning with regard to WordPress because they are used as a replacement for index.php, when available, according to the Template Hierarchy, and when the corresponding Conditional Tag (a.k.a is_*(); function) returns true. For example, if only a single post is being displayed, the is_single() function returns ‘true’, and, if there is a single.php file in the active Theme, that template is used to generate the page.
Referencing Files From a Template
The WordPress Default Theme (based on Michael Heilemann’s Kubrick layout for WordPress 1.2) provides a good example of how queries are mapped onto templates.
The code inserts the URL of the template directory into the template output. You can append any additional URI information to this output to reference files in your Theme.
The code inserts the URL of the directory that contains the current Theme stylesheet into the template output. You can append any additional URI information to this output to reference files for your Theme, specifically those that are used by the stylesheet.
The constant TEMPLATEPATH is a reference to the absolute path to the template directory for the current Theme (without the / at the end).
Note that URIs that are used in the stylesheet are relative to the stylesheet, not the page that references the stylesheet. For example, if you include an images/ directory in your Theme, you need only specify this relative directory in the CSS, like so:
h1 { background-image: URL(images/my_background.jpg); }
It is a good practice to use URIs in the manner described above to reference files from within a template, since, then your template will not depend on absolute paths.
Defining Custom Templates
It is possible to use the WordPress plugin system to define additional templates that are shown based on your own custom criteria. This advanced feature can be accomplished using the template_redirect action hook. More information about creating plugins can be found in the Plugin API reference.
Plugin API Hooks
When developing Themes, it’s good to keep in mind that your Theme should be set up so that it can work well with any WordPress plugins you (or another Theme user) might decide to install. Plugins add functionality to WordPress via “Action Hooks” (see Plugin API for more information). Most Action Hooks are within the core PHP code of WordPress, so your Theme does not have to have any special tags for them to work. But a few Action Hooks do need to be present in your Theme, in order for Plugins to display information directly in your header, footer, sidebar, or in the page body. Here is a list of the special Action Hook Template Tags you need to include:
wp_head
Goes in the HTML element of a theme; header.php template. Example plugin use: add javascript code.
Usage:
-or-
wp_footer
Goes in the “footer” of a theme; footer.php template. Example plugin use: insert PHP code that needs to run after everything else, at the bottom of the footer.
Usage:
-or-
wp_meta
Typically goes in the

  • Meta
  • section of a theme’s menu or sidebar; sidebar.php template. Example plugin use: include a rotating advertisement or a tag cloud.
    Usage:
    -or-
    comment_form
    Goes in comments.php and comments-popup.php, directly before the comment form’s closing tag (

    ). Example plugin use: display a comment preview.
    Usage: ID); ?>
    For a real world usage example, you’ll find these plugin hooks included in the default theme’s templates.
    Theme Development General Guidelines
    Please be clear about the following in your documentation (a README file included with your Theme helps many users over any potential stumbling blocks):
    1. Indicate precisely what your Theme and template files will achieve.
    2. Adhere to the naming conventions of the standard theme hierarchy.
    3. Indicate deficiencies in your Themes, if any.
    4. Clearly reference any special modifications in comments within the template and style sheet files. Add comments to modifications, template sections, and CSS styles, especially those which cross template files.
    5. If you have any special requirements, which may include custom Rewrite Rules, or the use of some additional, special templates, images or files, please explicitly state the steps of action a user should take to get your Theme working.
    6. Try and test your Theme across browsers to catch at least a few of the problems the users of the Theme may find later.
    7. Provide contact information (web page or email), if possible, for support information and questions.
    Take time to read through Designing Themes for Public Release, an article with good tips on preparing your Theme for the public.

    New To WordPress – Where to Start

    January 21, 2010 by  
    Filed under Wordpress

    If you are new to WordPress and you’re worried about where to start, you’ve come to the right place! Here is a very simple step-by-step plan for getting started with WordPress. Please remember, if you need help along the way, plenty of options for assistance are listed in this article. Welcome to the exciting world of WordPress!

    Contents

    1 Step One – Read
    2 Step Two – Make a Plan
    3 Step Three – Install WordPress
    4 Step Four – Set Up WordPress
    4.1 Presentation and Themes
    4.2 Adding Plugins
    5 Advanced Use of WordPress
    6 Need More Help
    ■7 And Finally

    Step One – Read
    Before you invest your valuable time and energy into installing WordPress, there are some documents you need to read. WordPress is a great product; it’s easy-to-use, it’s quite powerful, but it isn’t necessarily the right software for everyone. Just like building a house, you have to use the right tool for the right job. Consider creating a PDF to read at your leisure.

    ■About Weblogs – What is Blogging all about?
    ■What is WordPress?
    ■WordPress Features
    ■Before You Install WordPress
    Step Two – Make a Plan
    Based upon the information you’ve just read, including instructions on installing WordPress, you should have a list of the things you need, and the things you need to do. If not, make that list now–you’ll want to make sure it includes the following information:

    ■Website Host Requirements Checked and Verified
    ■Versions of PHP and MySQL Checked and Verified
    ■Web Host Compatibility with New Versions of WordPress
    ■Your Website Username and Password
    ■Text Editor Software
    ■An FTP Client Software
    ■Your Web Browser of Choice
    The following documents will help you understand more about how WordPress works and how to make a plan for your WordPress site:

    ■WordPress Features
    ■First Steps With WordPress
    ■WordPress Lessons
    It is important to make a plan about how you want to use WordPress on your site. Here are some questions to ask yourself. Make a list of the answers so you can add to your plan.

    ■Will you install WordPress in the root directory, subdirectory, or you just want to make a test site to make sure you want to use it?
    ■Have you made a list of your site Categories? Understand that WordPress can only order Categories alphabetically by name or by ID (order entered through the Manage > Categories screen), so if the display order of your Categories is important to you, start making your list of Categories.
    ■Have you made a list of Pages you may want to add to your site, such as About, Contact, or Events?
    Step Three – Install WordPress
    With this information and your plan, it’s time to install WordPress.

    ■Before You Install WordPress
    ■Installing WordPress
    ■Hosting WordPress
    ■Editing the wp-config.php file
    ■Frequently Asked Questions About Installing WordPress
    ■Using FTP Clients and Software
    ■Changing File Permissions
    ■Upgrading WordPress
    ■Common Installation Problems
    ■Trouble: I Can’t Login
    Step Four – Set Up WordPress
    With your installation complete, it’s time to set up WordPress so it will work the way you want it to work. As you change various settings, it is recommended you view how those changes impact your site by frequently clicking the View Site link at the top of the Administration Screen. Though you may choose to do these steps in any order, your site will cause you fewer problems if you proceed in the following order:

    ■Users > Your User Profile – set the user information you want published on your site
    ■Your User Profile > Other Users – add authors and users that will be using your site, if applicable
    ■Options > General – set your site name and other site information
    ■Options > Writing – set the settings of your Write Post screen
    ■Options > Reading – set how many posts to show on the front page and in categories and your feed requirements
    ■Options > Discussion – Turn on or off comments and set how to handle them
    ■Manage > Categories – add a few categories to get started from your category list
    ■Manage > Posts – After you have written a few posts, this is where you will manage them by editing or deleting
    ■Presentation > Themes – maybe change the look of your site?
    ■Manage > Pages – add a Page or two like “About Us” or “Contact Me”
    ■Write > Write Post – start adding content to your site
    ■Writing Posts – step-by-step instructions on writing posts
    Take time to explore the WordPress Codex site, the official documentation site for WordPress. You’ll find helpful information by reading WordPress Lessons, and these helpful documents:

    ■Introduction to Dealing with Comment Spam
    ■Moderating Comments
    ■Using the Links Manager
    ■WordPress in Languages Other than English
    Presentation and Themes
    With the new WordPress version 1.5, changing the look of your WordPress website is possible with just a few clicks. Here is a list of resources and information about changing the look of your site with WordPress Themes.

    ■Using WordPress Themes
    ■Blog Design and Layout
    ■Using Pages
    At this point, there may be something about your Theme choice that is bothering you, or, you really want to get your hands dirty understanding how your WordPress Theme works. These simple guides to help customize your WordPress Theme:

    ■Lessons: Designing Your WordPress Site
    ■CSS Overview, Tips, Techniques, and Resources
    ■Stepping Into Templates
    ■Lessons: Template Files
    ■Stepping Into Template Tags
    ■Lessons: Working With Template Tags
    ■WordPress Template Tags
    ■Understanding the WordPress Loop
    ■The WordPress Loop in Action
    ■Editing Files in WordPress
    ■Frequently Requested Design Help
    ■Frequently Asked Questions about Site Layout and Design
    If you want to create a new WordPress Theme from scratch, or do major renovations, or even design WordPress Themes for public release, you will need to be familiar with HTML, XHMTL, and CSS. The following documents will get you started:

    ■Developing Your Own WordPress Theme
    ■Designing Themes for Public Release
    ■Validating a Website
    ■Lessons: Website Development
    ■CSS Fixing Browser Bugs
    ■CSS Troubleshooting
    ■Positioniseverything
    ■Position is Everything’s 3 Complex Column – Perched on a Lily Pad
    ■Position is Everything Piefecta 3-Column Layout
    If you want a custom-made WordPress Theme created especially for you by expert web-designers, it is recommended you search for qualified web-designers on the Internet, or look in your local community, or draw from the List of Recommended Web Page Designers by Laughing Squid.

    Adding Plugins
    There are many “add-on” scripts and programs for WordPress called Plugins that add more capabilities, choices, and options to your WordPress site. WordPress Plugins do many things, including; customizing the results of your site information, adding weather reports, adding spell check capability, and presenting custom lists of posts and acronyms. For more on how to work with Plugins and where to find WordPress Plugins for your site:

    ■Managing Plugins
    ■Plugins
    ■http://www.wp-plugins.org/
    ■http://www.wp-plugins.net/
    ■Bloggingpro List of Plugins
    Advanced Use of WordPress
    Now that you are familiar with the basic features and functions of how WordPress works, it might be time for you to plunge deeper into the power of WordPress. The links below will expand your familiarity with PHP, HTML, XHTML, and CSS:

    ■Lessons: WordPress Feature and Functions
    ■Lessons: WordPress Tech Techniques
    ■Using Permalinks
    ■Photoblogs and Galleries
    ■WordPress Advanced Techniques
    ■Advanced Techniques for Plugins and Customization
    ■WordPress Server and Database Information
    ■Developer Documentation
    Need More Help
    As simple and easy as it is to use WordPress, if troubles arise, if something is confusing, if things aren’t working, don’t despair because help is available! Even though WordPress is free and open source, there are literally hundreds of volunteers eager to help you. Here are some helpful resources for WordPress:

    ■FAQ
    ■Getting More Help
    ■Using the Support Forums
    ■WordPress Forum
    ■IRC Freenode WordPress Support on channel #wordpress
    ■WordPress IRC Live Help
    And Finally
    Now that you’re a full fledged WordPress user, consider contributing to the WordPress Codex, Support Forum, Development, and other volunteer efforts that keep WordPress going. WordPress is free and totally supported by volunteers, and your help is needed.

    Object-Oriented Programming Concepts

    January 21, 2010 by  
    Filed under Programming Languages

    If you’ve never used an object-oriented programming language before, you’ll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language.

    What Is an Object?

    An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner.

    What Is a Class?

    A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even a simple class can cleanly model state and behavior.

    What Is Inheritance?

    Inheritance provides a powerful and natural mechanism for organizing and structuring your software. This section explains how classes inherit state and behavior from their superclasses, and explains how to derive one class from another using the simple syntax provided by the Java programming language.

    What Is an Interface?

    An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface. This section defines a simple interface and explains the necessary changes for any class that implements it.

    What Is a Package?

    A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage. This section explains why this is useful, and introduces you to the Application Programming Interface (API) provided by the Java platform.

    What Is an Object?

    Objects are key to understanding object-oriented technology. Look around right now and you’ll find many examples of real-world objects: your dog, your desk, your television set, your bicycle.
    Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes). Identifying the state and behavior for real-world objects is a great way to begin thinking in terms of object-oriented programming.

    Take a minute right now to observe the real-world objects that are in your immediate area. For each object that you see, ask yourself two questions: “What possible states can this object be in?” and “What possible behavior can this object perform?”. Make sure to write down your observations. As you do, you’ll notice that real-world objects vary in complexity; your desktop lamp may have only two possible states (on and off) and two possible behaviors (turn on, turn off), but your desktop radio might have additional states (on, off, current volume, current station) and behavior (turn on, turn off, increase volume, decrease volume, seek, scan, and tune). You may also notice that some objects, in turn, will also contain other objects. These real-world observations all translate into the world of object-oriented programming.

    A software object.

    Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages). Methods operate on an object’s internal state and serve as the primary mechanism for object-to-object communication. Hiding internal state and requiring all interaction to be performed through an object’s methods is known as data encapsulation — a fundamental principle of object-oriented programming.
    Consider a bicycle, for example:

    A bicycle modeled as a software object.
    By attributing state (current speed, current pedal cadence, and current gear) and providing methods for changing that state, the object remains in control of how the outside world is allowed to use it. For example, if the bicycle only has 6 gears, a method to change gears could reject any value that is less than 1 or greater than 6.
    Bundling code into individual software objects provides a number of benefits, including:
    1. Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system.
    2. Information-hiding: By interacting only with an object’s methods, the details of its internal implementation remain hidden from the outside world.
    3. Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code.
    4. Pluggability and debugging ease: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement. This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace it, not the entire machine.

    Objective-C

    January 21, 2010 by  
    Filed under Programming Languages

    Object-oriented programming, like most interesting new developments, builds on some old ideas, extends them, and puts them together in novel ways. The result is many-faceted and a clear step forward for the art of programming. An object-oriented approach makes programs more intuitive to design, faster to develop, more amenable to modifications, and easier to understand. It leads not only to new ways of constructing programs, but also to new ways of conceiving the programming task.
    Nevertheless, object-oriented programming presents some formidable obstacles to those who would like to understand what it’s all about or begin trying it out. It introduces a new way of doing things that may seem strange at first, and it comes with an extensive terminology that can take some getting used to. The terminology will help in the end, but it’s not always easy to learn. Moreover, there are as yet few full-fledged object-oriented development environments available to try out. It can be difficult to get started.
    That’s where this book comes in. It’s designed to help you become familiar with object-oriented programming and get over the hurdle its terminology presents. It spells out some of the implications of object-oriented design and tries to give you a flavor of what writing an object-oriented program is really like. It fully documents the Objective-C(tm) language, an object-oriented programming language based on standard C, and introduces the most extensive object-oriented development environment currently available–OPENSTEP(tm).
    The book is intended for readers who might be interested in:
    • Learning about object-oriented programming,
    • Finding out about the OPENSTEP development environment, or
    • Programming in Objective-C.
    NeXT supplies its own compiler for the Objective-C language (a modification of the GNU C compiler) and a run-time system to carry out the dynamic functions of the language. It has tested and made steady improvements to both over the years; this book describes the latest release, which includes provisions for declaring and adopting protocols and setting the scope of instance variables.
    Throughout this manual and in other NeXT documentation, the term “Objective-C” refers to the language as implemented for the OPENSTEP development environment and presented here.
    ________________________________________
    The Development Environment
    ________________________________________
    Every object-oriented development environment worthy of the name consists of at least three parts:
    • A library of objects and software frameworks and kits
    • A set of development tools
    • An object-oriented programming language
    OPENSTEP comes with an extensive library. It includes several software frameworks containing definitions for objects that you can use “off the shelf” or adapt to your program’s needs. These include the Foundation Framework, the Application Kit(tm) framework (for building a graphical user interface), and others.
    OPENSTEP also includes some exceptional development tools for putting together applications. There’s Interface Builder(tm), a program that lets you design an application graphically and assemble its user interface on-screen, and Project Builder, a project-management program that provides graphical access to the compiler, the debugger, documentation, a program editor, and other tools.
    This book is about the third component of the development environment–the programming language. All OPENSTEP software frameworks are written in the Objective-C language. To get the benefit of the frameworks, applications must also use Objective-C. You are not restricted entirely to Objective-C, however; you are free to incorporate C++ code into your applications as well.
    Objective-C is implemented as set of extensions to the C language. It’s designed to give C a full capability for object-oriented programming, and to do so in a simple and straightforward way. Its additions to C are few and are mostly based on Smalltalk, one of the first object-oriented programming languages.
    This book both introduces the object-oriented model that Objective-C is based upon and fully documents the language. It concentrates on the Objective-C extensions to C, not on the C language itself. There are many good books available on C; this manual doesn’t attempt to duplicate them.
    Because this isn’t a book about C, it assumes some prior acquaintance with that language. However, it doesn’t have to be an extensive acquaintance. Object-oriented programming in Objective-C is sufficiently different from procedural programming in standard C that you won’t be hampered if you’re not an experienced C programmer.
    ________________________________________
    Why Objective-C
    ________________________________________
    The Objective-C language was chosen for the OPENSTEP development environment for a variety of reasons. First and foremost, it’s an object-oriented language. The kind of functionality that’s packaged in the OPENSTEP software frameworks can only be delivered through object-oriented techniques. This manual will explain how the frameworks work and why this is the case.
    Second, because Objective-C is an extension of standard ANSI C, existing C programs can be adapted to use the software frameworks without losing any of the work that went into their original development. Since Objective-C incorporates C, you get all the benefits of C when working within Objective-C. You can choose when to do something in an object-oriented way (define a new class, for example) and when to stick to procedural programming techniques (define a structure and some functions instead of a class).
    Moreover, Objective-C is a simple language. Its syntax is small, unambiguous, and easy to learn. Object-oriented programming, with its self-conscious terminology and emphasis on abstract design, often presents a steep learning curve to new recruits. A well-organized language like Objective-C can make becoming a proficient object-oriented programmer that much less difficult. The size of this manual is a testament to the simplicity of Objective-C. It’s not a big book–and Objective-C is fully documented in just two of its chapters.
    Objective-C is the most dynamic of the object-oriented languages based on C. The compiler throws very little away, so a great deal of information is preserved for use at run time. Decisions that otherwise might be made at compile time can be postponed until the program is running. This gives Objective-C programs unusual flexibility and power. For example, Objective-C’s dynamism yields two big benefits that are hard to get with other nominally object-oriented languages:
    • Objective-C supports an open style of dynamic binding, a style than can accommodate a simple architecture for interactive user interfaces. Messages are not necessarily constrained by either the class of the receiver or the method selector, so a software framework can allow for user choices at run time and permit developers freedom of expression in their design. (Terminology like “dynamic binding,” “message,” “class,” “receiver,” and “selector” will be explained in due course in this manual.)
    • Objective-C’s dynamism enables the construction of sophisticated development tools. An interface to the run-time system provides access to information about running applications, so it’s possible to develop tools that monitor, intervene, and reveal the underlying structure and activity of Objective-C applications. Interface Builder could not have been developed with a less dynamic language.

    object-oriented programming

    January 21, 2010 by  
    Filed under Programming Languages

    Object-oriented programming (OOP) is a programming language model organized around “objects” rather than “actions” and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data.
    The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. Examples of objects range from human beings (described by name, address, and so forth) to buildings and floors (whose properties can be described and managed) down to the little widgets on your computer desktop (such as buttons and scroll bars).
    The first step in OOP is to identify all the objects you want to manipulate and how they relate to each other, an exercise often known as data modeling. Once you’ve identified an object, you generalize it as a class of objects (think of Plato’s concept of the “ideal” chair that stands for all chairs) and define the kind of data it contains and any logic sequences that can manipulate it. Each distinct logic sequence is known as a method. A real instance of a class is called (no surprise here) an “object” or, in some environments, an “instance of a class.” The object or class instance is what you run in the computer. Its methods provide computer instructions and the class object characteristics provide relevant data. You communicate with objects – and they communicate with each other – with well-defined interfaces called messages.
    The concepts and rules used in object-oriented programming provide these important benefits:
    • The concept of a data class makes it possible to define subclasses of data objects that share some or all of the main class characteristics. Called inheritance, this property of OOP forces a more thorough data analysis, reduces development time, and ensures more accurate coding.
    • Since a class defines only the data it needs to be concerned with, when an instance of that class (an object) is run, the code will not be able to accidentally access other program data. This characteristic of data hiding provides greater system security and avoids unintended data corruption.
    • The definition of a class is reuseable not only by the program for which it is initially created but also by other object-oriented programs (and, for this reason, can be more easily distributed for use in networks).
    • The concept of data classes allows a programmer to create any new data type that is not already defined in the language itself.
    Simula was the first object-oriented programming language. Java, Python, C++, Visual Basic .NET and Ruby are the most popular OOP languages today. The Java programming language is designed especially for use in distributed applications on corporate networks and the Internet. Ruby is used in many Web applications. Curl, Smalltalk, Delphi and Eiffel are also examples of object-oriented programming languages.
    OOPSLA is the annual conference for Object-Oriented Programming Systems, Languages and Applications.

    Tips on How to Get Started with E-Commerce and be Successful

    January 21, 2010 by  
    Filed under E-commerece

    If you want your business to thrive, do not wait for customers to come to you. Take your products to your customers through internet and e-commerce. Suitable for all business sizes, e-commerce allows you to harness the benefits of business at low-costs, without time and distance barriers.

    You do not need to spend a fortune to start your online store, use the following tips and tools to start reaping the benefits of a successful online business and e-commerce.

    How Do You Start Selling Online?

    1. If you do not want to build your own online store then you may sell your products on big market sites such as Amazon and eBay to build a client base, assess demand, prices and competition.
    2. Add a PayPal payment option to your existing website to give customers an easy and convenient payment option. Use PayPal to build a basic order form that can be integrated into your website.
    3. Build your own e-commerce site either by hiring a web designer or using template-based website building tools.

    If a single option does not work for you, use a combination of two or more options that best suits your business requirements.

    Develop a Specialty

    Before you start building a new online store, try to find a specific and unique e-commerce niche. Product categories like shoes and books are very common and saturated with large sellers who can cut your business profits. Conduct some research on product categories and specialize in one that has an untapped customer base. This can be your ticket to online store success.

    Getting Started With Building Online Store

    To build your web store ask your web provider for e-commerce tools and templates. This option is low-cost and can greatly simplify web store design reducing your job to merely pointing, clicking and modifying pre-designed templates. These basic web stores come for a small monthly fee and transaction fees for every order.

    If you need extensive customization then hire a web specialist. Discuss the available e-commerce services and web store options with your web designer. A specialist can help you to incorporate advanced features such as connecting your inventory database to the online store so that you do not offer out-of-stock products.

    Essential Features of an Online Store

    Photos
    Photos help to sell products. Use multiple views and pictures of different colors and options to minimize shopper queries and maximize impact on customers.

    Product Description
    Effective item descriptions can considerably improve product sales. For greatest impact, include all important details and answers to possible shopper queries.

    Privacy and Security
    If you want shoppers to do business with you, then assure them that their private information is secure and will never be misused. Ensure that sensitive data is always encrypted. Additionally, make sure your privacy and security policies are easily visible and clearly defined.

    Multiple Payment and Shipping Options
    Customers usually prefer variety in payment methods. Open a merchant account to enable customers to pay through credit cards. Integrate it with PayPal, another popular payment method. Provide multiple shipping options to your customers. Tie up with reputed shipping providers to automatically calculate and project shipping costs for products. Make sure you comply with tax laws. If unsure about tax regulations, get in touch with an e-commerce consultant.

    Great Customer Service
    Excellent customer service is central to the success of your online store. Ensure timely response to product queries, preferably within 24 hours. Online chat is another option you can offer your customers to get in touch with you. To maintain and build your client base, offer discounts and special coupons to customers. Keep your customers updated by asking them to sign up for monthly e-mails on new products and special deals.

    Combine the above mentioned strategies with attractive web design and clear navigation to build an excellent reputation and beat the competition.

    Next Page »