Implementing PhpAdsNew into your Xoops site

Categories:

PhpAdsNew is a comprehensive open source ad management system that is scripted in PHP and backs onto a MySQL database for data storage. PhpAdsNew is trully one of the jewels in the open source crown, and is well worth being on your shortlist of ad management systems. In this "how to" guide we will cover the topic of how to seamlessly integrate the PhpAdsNew ads management system into your Xoops CMS based website in three different ways. The use of PhpAdsNew in an Xoops environment is a question that has been asked many times, and a search of the Xoops forums for 'PhpAdsNew' will return over 130 posts spanning back to 2002. To date however, I am unaware of any documentation that explores the best practices for integrating PhpAdsNew into Xoops, which is kind of surprising considering the popularity of the subject and the ease in which it can be done (viewed in hindsight of course). Assuming you have your PhpAdsNew environment set up with all your zones and banners ready to go, then with the assistance of this "how to" guide you will be up and running in only a few minutes. All you have to do now is read on to find out how.

ARTICLE SCOPE

Before continuing however, we must first layout the scope of what this article covers. In the interest of trying to keep this article as short and to the point as possible, there are several assumptions made about both your PhpAdsNew and Xoops environments. There are also assumptions made of your experience with both these products, and this guide is not recommended if you have only just started using either one without ever having used another similar product.

PhpAdsNew Environment

This article assumes that you have a fully set up PhpAdsNew environment, and are familiar with the with the administration of it. If you are looking to install PhpAdsNew for the first time for implementation into your Xoops site, then it is highly recommended that you first spend some time using the product, ensuring that you read both the Administration and User guides from the PhpAdsNew site. In all cases PhpAdsNew will be implemented using local mode invocation, as this mode is not only best for performance, it also means all PhpAdsNew related processing is done server side which means there is 100% computability with all visiting browsers. The following points are the major assumptions made of your PhpAdsNew environment;

  1. You are using PhpAdsNew 2.06 or later (although this should also work with earlier versions).
  2. You have PhpAdsNew installed in a directory underneath your Xoops root directory.
  3. You have PhpAdsNew configured to use local mode invocation (this is not done by default).
  4. All publishers and zones are set up correctly and you are familiar with the terminology.
  5. All advertisers and banners are set up correctly and you are familiar with the terminology.
  6. All invocation code is generated using local mode.

Xoops Environment

This article assumes that Xoops is installed, and that you have good working knowledge of the Xoops administration area. Your knowledge of Xoops is probably required to be deeper than your knowledge of PhpAdsNew, and you will also require some basic PHP and HTML knowledge. This is only very basic though, and all that you'll need is stepped through quite clearly in this article. There are three levels at which we will be implementing PhpAdsNew into the Xoops system, and they are the theme.html, module templates and finally in a custom Xoops block. The following points are the major assumptions made of your Xoops environment & knowledge;

  1. Xoops is installed and configured correctly. Xoops 2.0.13.1 was used for this article, but it should also be valid for all previous versions as well as the new 2.2.x branch.
  2. You are familiar with the Xoops administration system.
  3. You are familiar with editing the theme.html of your selected theme.
  4. You are familiar with using the Xoops template cloning and editing system.
  5. You are familiar with the Xoops blocks administration system, and are comfortable with creating custom blocks.
  6. Very basic knowledge of HTML and PHP.

For the purpose of this article I used a clean copy of my own site. The PhpAdsNew zone implemented into the theme will be a full banner (468x60) placed in the site header bar at the top of the site. The zone placed into the Xoops template will be a large rectangle (336x280) inserted into the AMS article template between the article introduction and the main body, and will only be visible to the end user once the "read more" link is clicked. The zone implemented into the custom Xoops block will be a vertical banner (120x240) and will be placed in the right column of the site. The site viewed from an AMS article prior to any zones added can be seen below in figure 1.


Figure 1

Average rating
(0 votes)