| How to Add Additional Sidebanner to Your phpMyDirectory Site |
|
|
|
|
You already have 2 sidebanners on your default phpMyDirectory installation but if you want to add more side banner to your website then this tutorial will guide you. This article explains how you can add additional sidebanner to your phpMyDirectory website. Step 1: Backup everything! First of all backup all files within your phpMyDirectory installation. Create a folder on your local system, and download all files to that folder using any ftp client application. You want to backup your files in case something goes wrong. Step 2: Modify template_setup.php The second thing you need to do is open /includes/template_setup.php file and locate this piece of code. It must be near line 38.
$banner_code = '';
$banner_type = 1;
include (PMDROOT.'/includes/banner.php');
$template->set('sidebanner1',$banner_code);
$banner_code = '';
$banner_type = 1;
include (PMDROOT.'/includes/banner.php');
$template->set('sidebanner2',$banner_code);
Now you need to add additional code (4 lines for each additional sidebanner) just after these lines. So for 3rd sidebanner.
$banner_code = '';
$banner_type = 1;
include (PMDROOT.'/includes/banner.php');
$template->set('sidebanner3',$banner_code);
same as for 4th sidebanner...
$banner_code = '';
$banner_type = 1;
include (PMDROOT.'/includes/banner.php');
$template->set('sidebanner4',$banner_code);
and so on.Step 3: Modify template_public.tpl This step is very important. Go to your template folder on your phpMyDirectory installation and open this file (template_public.tpl) with a text editor and make the necessary changes. You will need to insert code for newly created sidebanners in your template. insert sidebanner code in template_public.tpl <?php echo $sidebanner3; ?> <?php echo $sidebanner4; ?>Step 4: Test your new sidebanners Now test your site to make sure that newly created sidebanners are working properly. |
|
| Wednesday, 07 May 2008 |







Creative Commons License