zher0e Posted March 28, 2005 Posted March 28, 2005 Hi Guys, I would like to build a box on the right that allows me to put in banner ads. The box has to be empty with only picture and a link only. How should i go about doing it? E.g. if i want my box to be called 'sponsorbox.php' [1.] Upload 'sponsorbox.php' to /catalog/includes/boxes [2.] Insert the line below in 'column_right.php' include(DIR_WS_BOXES . 'sponsorbox.php'); [3.] Open the english file (catalog/includes/languages/english.php) and add the following // Banner ads Link (boxes/sponsorbox.php) define('BOX_HEADING_SPONSORBOX', 'Sponsorbox'); [4.] Now i am stuck in this step as what to write in the sponsorbox.php my basic code: <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_SPONSORBOX); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'src="http://127.0.0.1/catalog/images/ads/right_banner.gif"> new infoBox($info_box_contents); ?> I would really appreciate it if any of you guys out there could help me with this. Cheers
Taxidermist Posted March 28, 2005 Posted March 28, 2005 Get this contribution: Banner-ad-in-a-box V1.0 Exactaly what you want and would be faster than doing it all from scratch yourself.
zher0e Posted March 28, 2005 Author Posted March 28, 2005 Cheers mate! Banner-ad-in-a-box V1.0 was great indeed. However i still have problems with the banners not showing. can someone take a look at my codes and see if i've made a mistake? [advertisement.php] <?php if ($banner = tep_banner_exists('dynamic', BOX_AD_BANNER_TYPE)) { ?> <tr> <td> <?php $bannerstring = '<tr><td class="infoBoxContents" valign="top">' . tep_image(DIR_WS_IMAGES . 'ads/right_banner.gif' . </td></tr>; $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => BOX_AD_BANNER_HEADING ); new infoBoxHeading($info_box_contents, true, true); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => $bannerstring ); new infoBox($info_box_contents); ?> </td> </tr> <?php } ?> <!-- advertisement //--> Cheers guys, looking forward for a reply here!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.