Author Topic: [MOD] - Banners Ads - Fully configurable from ACP  (Read 75176 times)

0 Members and 1 Guest are viewing this topic.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
[MOD] - Banners Ads - Fully configurable from ACP
« on: January 08, 2006, 07:31:23 PM »
//  Banners Ads - Fully configurable from ACP - v1.0 - First release

Responding for this topic :

http://www.4homepages.de/forum/index.php?topic=11035.0

Since most of E-Commerce scripts uses this type of functionnality, I never realized the importance of this feature before today.

// Affected files

- admin/settings.php.
- lang/<your_lang>/admin.php (assuming english).
- includes/page_header.php
- SETTINGS_TABLE.

// Purpose

As we all know already, this feature allows you to show your ads banner from, either, the top header and / or your footer below your site (depending of the configuration you chosed from your ACP's settings).

// Step 1

In your admin/settings.php file,

find :

Quote

function show_setting_row($setting_name, $value_option = "", $htmlspecialchars = 0) {
  global $config, $setting;
  $config_value = ($htmlspecialchars) ? htmlspecialchars($config[$setting_name]) : $config[$setting_name];
  $setting[$setting_name] = replace_url($setting[$setting_name]);
  if ($value_option == "") {
    show_input_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value);
  }
  elseif ($value_option == "textarea") {
    show_textarea_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value, "", 6);
  }
  elseif ($value_option == "radio") {
    show_radio_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value);
  }
  else {
    echo "<tr class=\"".get_row_bg()."\">\n<td valign=\"top\"><p class=\"rowtitle\">".$setting[$setting_name]."</p></td>\n";
    echo "<td><p>";
    $value_option($setting_name, $config_value);
    echo "</p></td>\n</tr>\n";
  }
}


add below :

Code: [Select]

function show_ads_banner_header_options($setting_name, $setting_value) {
  global $set_ads_banner_header_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($set_ads_banner_header_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}

function show_ads_banner_footer_options($setting_name, $setting_value) {
  global $set_ads_banner_footer_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($set_ads_banner_footer_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}


Then, find :

Quote

show_table_separator($setting_group[3], 2, "#setting_group_3");
show_setting_row("image_order", "show_image_order_select");
show_setting_row("image_sort", "show_image_sort_select");
show_setting_row("new_cutoff");
show_setting_row("image_border");
show_setting_row("image_cells");
show_setting_row("default_image_rows");
show_setting_row("custom_row_steps");
show_setting_row("image_table_width");
show_setting_row("image_table_cellspacing");
show_setting_row("image_table_cellpadding");


add below :

Code: [Select]

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("ads_banner_header", "show_ads_banner_header_options");
show_setting_row("ads_banner_footer", "show_ads_banner_footer_options");
show_setting_row("ads_banner_url");


Note : You must change the "X" letter to your next new number.

Example : Assuming you have the first 10 values already, simply add 11 on this one. ;)

// Step 2

In your lang/english/admin.php file, above the "?>" tag,

add this :

Code: [Select]

/*-- Setting-Group X --*/
$setting_group[X] = "Banner Ads Activation Options";
$set_ads_banner_header_optionlist = array(
  "1" => "yes",
  "2" => "no",
);
$setting['ads_banner_header'] = "<span class=\"smalltext\">Would you like to activate your Banners Ads on your album's site header page (top) ?</span>";
$set_ads_banner_footer_optionlist = array(
  "1" => "yes",
  "2" => "no",
);
$setting['ads_banner_footer'] = "<span class=\"smalltext\">Would you like to activate your Banners Ads on your album's site footer page (below) ?</span>";
$setting['ads_banner_url'] = "<span class=\"smalltext\">If you chosed to activate (at least) one of these two above, please specify the URL where the clicker should be redirected.";


(Remember the 'X' rules above).

// Step 3

In your includes/page_header.php file,

find :

Quote

// Cache Templates
$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
  $template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);


add below :

Code: [Select]

//-----------------------------------------------------
//--- Ads Banner --------------------------------------
//-----------------------------------------------------

if ($config['ads_banner_header'] != 2) {

$site_template->register_vars(array(
"banner_header_url" => ($config['ads_banner_url'] != "") ? "<br />".$config['ads_banner_url']."<br /><br />" : ""
));

} ###### End of if statement.

if ($config['ads_banner_footer'] != 2) {

$site_template->register_vars(array(
"banner_footer_url" => ($config['ads_banner_url'] != "") ? "<br /><br />".$config['ads_banner_url']."<br /><br />" : ""
));

} ###### End of if statement.


// Step 4

Then, add the following SQL fields in your SETTINGS_TABLE :

Quote

- Setting_name: ads_banner_header
- Setting_value: 1
- Setting_name: ads_banner_footer
- Setting_value: 1
- Setting_name: ads_banner_url
- Setting_value: your_url


// Step 5

In your templates/<your_template>/header.html file, you can fully customize the way you'd like to show it.

However, just use these tags to show your header banner ads correctly :

Code: [Select]

{if banner_header_url}
{banner_header_url}
{endif banner_header_url}


// Step 6

In your templates/<your_template>/footer.html file, you can also customize your presentation in the way you'd like.

However, use these codes to show your footer banner correctly :

Code: [Select]

{if banner_footer_url}
{banner_footer_url}
{endif banner_footer_url}


// Installation Complete

This completes the installation of this MOD.

// Try-out

To test it out, go to your ACP's configuration page and activate, either (or both) banners in order to show it from your header / footer - depending on your personal preference. Then, right below these two choices, simply add the given URL from your affiliate and the banner show be able to appear genericly from your album once you'll save your settings. ;)

Enjoy and, hopefully, someone will send HIS INPUTS THIS TIME !!! 8)

//  Banners Ads - Fully configurable from ACP - v2.0 - Full installation

// Changelog

This topic was updated on : [ 01/26/2006 ].

---

This topic was updated on : [ 01/27/2006 ].

A new folder called : banner is now involved in the new version.
A single general function is being used rather than two seperated functions from the settings page (since it is useless) and uses less SQL ressources.

// Affected files

Same as v1.0 above (except includes/functions.php file in addition).

// Purpose

Same purpose as above - except this time - images for your header and footer are fully configurable from your ACP's configuration page and, both, are seperated options according to your decision - if you wish to activate them or not. ;)

Note: For users who has never installed this MOD before, there's no need to install v1.0 before the v2.0. You can install this version right away. For users who did installed the v1.0 before, it would be HIGHLY recommended you uninstall this MOD and install the new version instead. Much more and better functionnality has been established now.

// Step 1

In your admin/settings.php file,

find :

Quote

function show_setting_row($setting_name, $value_option = "", $htmlspecialchars = 0) {
  global $config, $setting;
  $config_value = ($htmlspecialchars) ? htmlspecialchars($config[$setting_name]) : $config[$setting_name];
  $setting[$setting_name] = replace_url($setting[$setting_name]);
  if ($value_option == "") {
    show_input_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value);
  }
  elseif ($value_option == "textarea") {
    show_textarea_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value, "", 6);
  }
  elseif ($value_option == "radio") {
    show_radio_row($setting[$setting_name], "setting_item[".$setting_name."]", $config_value);
  }
  else {
    echo "<tr class=\"".get_row_bg()."\">\n<td valign=\"top\"><p class=\"rowtitle\">".$setting[$setting_name]."</p></td>\n";
    echo "<td><p>";
    $value_option($setting_name, $config_value);
    echo "</p></td>\n</tr>\n";
  }
}


add below :

Code: [Select]

function show_ads_banner_header_footer_options($setting_name, $setting_value) {
  global $set_ads_banner_header_footer_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($set_ads_banner_header_footer_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}

function show_banner_dir_select($setting_name, $setting_value) {
  echo "<select name=\"setting_item[".$setting_name."]\">";
  $handle = @opendir(TEMPLATE_PATH."/images/banner");
  $folderlist[] = "---\n";
  while (false !== ($file = @readdir($handle))) {
    if (@is_dir(TEMPLATE_PATH."/images/banner") && $file != "." && $file != "..") {
      $folderlist[] .= $file;
    }
  }
  @sort($folderlist);
  for($i = 0; $i < sizeof($folderlist); $i++) {
    echo "<option value=\"".$folderlist[$i]."\"";
    if ($setting_value == $folderlist[$i]) {
      echo " selected=\"selected\"";
    }
    echo ">".$folderlist[$i]."</option>\n";
  }
  @closedir($handle);
  echo "</select>\n";
}


Then, find :

Quote

show_table_separator($setting_group[3], 2, "#setting_group_3");
show_setting_row("image_order", "show_image_order_select");
show_setting_row("image_sort", "show_image_sort_select");
show_setting_row("new_cutoff");
show_setting_row("image_border");
show_setting_row("image_cells");
show_setting_row("default_image_rows");
show_setting_row("custom_row_steps");
show_setting_row("image_table_width");
show_setting_row("image_table_cellspacing");
show_setting_row("image_table_cellpadding");


add below :

Code: [Select]

show_table_separator($setting_group[X], 2, "#setting_group_X");
show_setting_row("ads_banner_header", "show_ads_banner_header_footer_options");
show_setting_row("ads_banner_footer", "show_ads_banner_header_footer_options");
show_setting_row("ads_banner_header_image_url", "show_banner_dir_select");
show_setting_row("ads_banner_footer_image_url", "show_banner_dir_select");
show_setting_row("ads_banner_header_url");
show_setting_row("ads_banner_footer_url");


Note: Replace the 'X" with the latest value of the setting group.

// Step 2

In your lang/english/admin.php file,

add before your '?>' tag (code updated below - thanks to JensF for pointing the array error.):

Code: [Select]

/*-- Setting-Group xx --*/
$setting_group[xx] = "Banner Ads Activation Options";
$set_ads_banner_header_header_optionlist = array(
  "1" => "yes",
  "2" => "no",
);
$setting['ads_banner_header'] = "<span class=\"smalltext\">Would you like to activate your Banners Ads on your album's site header page (top) ?</span>";
$set_ads_banner_header_footer_optionlist = array(
  "1" => "yes",
  "2" => "no",
);
$setting['ads_banner_footer'] = "<span class=\"smalltext\">Would you like to activate your Banners Ads on your album's site footer page (below) ?</span>";
$setting['ads_banner_header_image_url'] = "<span class=\"smalltext\">Please select your banner ads image you would like to show from your site header.";
$setting['ads_banner_header_url'] = "<span class=\"smalltext\">If you chosed to activate the banner from the site header, please specify the URL (which will go with your selected image).";
$setting['ads_banner_footer_image_url'] = "<span class=\"smalltext\">Please select your banner ads image you would like to show from your site footer.";
$setting['ads_banner_footer_url'] = "<span class=\"smalltext\">If you chosed to activate the banner from the site footer, please specify the URL (which will go with your selected image).";


Remember the 'X' rule. ;)

// Step 3

In your includes/page_header.php file,

find :

Quote

// Cache Templates
$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
  $template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);


add below :

Code: [Select]

//-----------------------------------------------------
//--- Ads Banner --------------------------------------
//-----------------------------------------------------

if ($config['ads_banner_header'] == 1) {

$site_template->register_vars(array(
"banner_header_url" => (@file_exists(TEMPLATE_PATH."/images/banner/".$config['ads_banner_header_image_url']) && $config['ads_banner_header_url'] != "") ? "<br /><center><a href=\"".$config['ads_banner_header_url']."\"><img src=\"".get_banner_image($config["ads_banner_header_image_url"])."\" border=\"0\" target=\"_blank\"></a></center><br /><br />" : ""
));

} ###### End of if statement.

if ($config['ads_banner_footer'] == 1) {

$site_template->register_vars(array(
"banner_footer_url" => (@file_exists(TEMPLATE_PATH."/images/banner/".$config['ads_banner_footer_image_url']) && $config['ads_banner_footer_url'] != "") ? "<br /><br /><center><a href=\"".$config["ads_banner_footer_url"]."\"><img src=\"".get_banner_image($config["ads_banner_footer_image_url"])."\" border=\"0\" target=\"_blank\"></a></center><br /><br />" : ""
));

} ###### End of if statement.


// Step 4

In your includes/functions.php file,

find :

Quote

function get_gallery_image($image_name) {
  global $config;
  if (file_exists(TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name)) {
    return TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name;
  }
  else {
    return TEMPLATE_PATH."/images/".$image_name;
  }
}


add below :

Code: [Select]

function get_banner_image($banner_name) {
 if (@file_exists(TEMPLATE_PATH."/images/banner/".$banner_name)) {
   return TEMPLATE_PATH."/images/banner/".$banner_name;
   }
  }


// Step 5 (Updated on: 02/12/2006)

Create a file called : install_ads.php on your ROOT_PATH folder (remember, this is a FRESH install !) and

add the following setting name in your SETTINGS_TABLE :

Quote

<?php

define ('ROOT_PATH', './');
include (ROOT_PATH."global.php");
require (ROOT_PATH."includes/sessions.php");
$user_access = get_permission();

if ($user_info['user_level'] == ADMIN) {

$sql = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_header', '2')

";

$result = $site_db->query($sql);

$sql1 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_footer', '2')

";

$result1 = $site_db->query($sql1);

$sql2 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_header', '2')

";

$result2 = $site_db->query($sql2);

$sql3 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_header_image_url', '')

";

$result3 = $site_db->query($sql3);

$sql4 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_footer_image_url', '')

";

$result4 = $site_db->query($sql4);

$sql5 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_header_url', '')

";

$result5 = $site_db->query($sql5);

$sql6 = "INSERT INTO ".SETTINGS_TABLE."
      (setting_name, setting_value)
      VALUES ('ads_banner_footer_url', '')

";

$result6 = $site_db->query($sql6);

if ($result && $result1 && $result2 && $result3 && $result4 && $result5 && $result6) {

echo "Installation successful.";

} else {

echo "Installation failed.";

} ####### End of if statement.
} ####### End of if statement.
?>


// Step 6

In your templates/<your_template>/header.html file,

add the following below your <BODY> tag :

Quote

{if banner_header_url}{banner_header_url}{endif banner_header_url}


// Step 7

In your templates/<your_template>/footer.html file,

find :

Quote

{cp_link}


add below :

Code: [Select]

{if banner_footer_url}{banner_footer_url}{endif banner_footer_url}


// Step 8

[Updated since 01-27-2006]

In your templates/<your_template>/images folder, create a new folder called : banner.

// Installation complete

This completes the installation of this MOD.

// Try-out

To test it out, go to your ACP's configuration page and activate, either (or both) banners in order to show it from your header / footer - depending on your personal preference. Then, right below these two choices, simply choose your images for your header + footer and add the given URL (for each - if required) from your affiliate and the banner show be able to appear genericly from your album once you'll save your settings. ;)

// Where are the upgrade instructions ?

If there's enough place on this topic to type it all, I'll post these instructions. ;)

Good luck !
« Last Edit: February 13, 2006, 04:36:08 AM by TheOracle »

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #1 on: January 09, 2006, 07:40:30 PM »
If I like to use differents banner n the same place??!?
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #2 on: January 10, 2006, 12:16:15 AM »
Quote

If I like to use differents banner n the same place??!?


And this is the first question I was expecting to read after my first release.  :mrgreen:

The thing is ... how would I know precisely the quantity of banners you would like to add ?

Please advise.

Offline live@ct

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #3 on: January 10, 2006, 08:40:36 AM »
usually I manage 5 to 10 banners and these banners ill like to show by importance

 :D
thanks!! for the mod
Existen 10 tipos de personas, los que entienden el codigo binario y los que no.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #4 on: January 10, 2006, 12:33:09 PM »
Ok, this quite answers. Tonight, I will post results for a max of "10 banners" to match with your preferences. However, you must be aware that 19 more rows (10 for header - 10 for footer) will need to be added in your SETTINGS_TABLE in order to accomplish this.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #5 on: January 10, 2006, 06:13:10 PM »
@TheOracle,
with a little modification I use this MOD now for my "Stern Shortnews" ... an it works great ... Thanks TheOracle  8)

@live@ct, TheOracle,
my suggestions for the banner rotation :

1. - save banner_rotation.js with your Banner-Codes in /scripts/
Code: [Select]
function randInt(min,max)
{
     var div = (max - min) + 1
     var randNum = Math.random()
     for (var i = 0; i <= div - 1; i++)
     {
          if (randNum >= i / div && randNum < (i+1) / div)
          {return i + min}
     }
}
var abc = randInt(1,5);
if (abc == 1) {
     document.write("<\"Your 1. HTML-Banner-Code\">");
}
if (abc == 2) {
     document.write("<\"Your 2. HTML-Banner-Code\">");
}
if (abc == 3) {
     document.write("<\"Your 3. HTML-Banner-Code\">");
}
if (abc == 4) {
     document.write("<\"Your 4. HTML-Banner-Code\">");
}
if (abc == 5) {
     document.write("<\"Your 5. HTML-Banner-Code\">");
}
( With this script you can add : Banner-codes , -scripts, -URLs ... )

2. - in Step 1 in admin/settings.php use
Code: [Select]
show_setting_row("ads_banner_url", "textarea");

3. - in Step 2 in lang/english/admin.php use
Code: [Select]
$setting[ads_banner_url'] = "Banner Script URL<br><span class=\"smalltext\"><br><b>Format :</b><br>&lt;script type=\"text/javascript\" src=\"---URL---\"&gt;&lt;/script&gt;";

in ACP->Banner Settings use here : <script type="text/javascript" src="http://your_website.com/scripts/banner_rotation.js"></script>

Now there is no change of the database for Banner-Rotation necessary !
For changing the banner codes only the banner_rotation.js must be edited .

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #6 on: January 10, 2006, 11:48:50 PM »
@mawenzi :

Quote

for (var i = 0; i <= div - 1; i++)
     {

I had a hard time on this one. Althought, mine was PHP - not JS. Excellent codings I might add. ;)

Offline Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #7 on: January 11, 2006, 03:00:38 PM »
wow a big thank you for this mod and i can get ride of adsense that i never have any control over.

Thanks again

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #8 on: January 11, 2006, 03:55:56 PM »
... Althought, mine was PHP - not JS. ...
... of course ... and mine was a fast suggestion ... without any other db-changes for your MOD ...  :wink:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #9 on: January 11, 2006, 06:17:44 PM »
not got this working yet  :(

Just checking these 3 new fields are added to   4images_settings so i now have, is that correct ??

 - setting_name
 - setting_value
 - ads_banner_header
 - ads_banner_footer
 - ads_banner_url

The settings in acp dont apear to be saving ???

Also  mawenzi  your mod of the mod, if i use yours for multi banner

Code: [Select]
in Step 1 in admin/settings.php use

Code:
show_setting_row("ads_banner_url", "textarea");

3. - in Step 2 in lang/english/admin.php use

Code:
$setting[ads_banner_url'] = "Banner Script URL<br><span class=\"smalltext\"><br><b>Format :</b><br>&lt;script type=\"text/javascript\" src=\"---URL---\"&gt;&lt;/script&gt;";

do these replace a line of code or addition to the script ??? 

Excuse my ignorance  :roll:

Thank you both  :wink:




Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #10 on: January 11, 2006, 06:30:36 PM »
The settings in acp dont apear to be saving ??? 

... not 3 new fields in 4images_settings ... ! (@ TheOracle ... your Step 4 ... ist not quite correct ...  :wink: )
... you must add 3 new data records (insert 3 new rows) in 4images_settings ... !
... 1. setting_name -> ads_banner_header , setting_value -> 1
... 2. setting_name -> ads_banner_footer , setting_value -> 1
... 3. setting_name -> ads_banner_url , setting_value -> url

do these replace a line of code or addition to the script ??? 

... you must replace the accordingly line ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #11 on: January 11, 2006, 10:03:01 PM »
yes got it working now i have inserted 3 new rows and not fields.
Will have a play with rotation later later.

Thanks for your help  :wink: 

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #12 on: January 12, 2006, 01:23:15 AM »
@Mawenzi:

Correct. I have just corrected step 4 from my first post. Thanks for posting this.

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #13 on: January 12, 2006, 09:09:10 AM »
hallo!
nice mod, thank you very much!

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] - Banners Ads - Fully configurable from ACP
« Reply #14 on: January 26, 2006, 05:01:31 PM »
Hi there,

i have a little problem with this Mod.

I have put this code into my header and my footer template

Code: [Select]
{if banner_header_url}
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10"><img src="templates/4grey2/images/anzeige.gif" width="10" height="60"></td>
    <td>{banner_header_url}</td>
  </tr>
</table>
{endif banner_header_url}


I have the gif "Anzeige" into the if - endif function. Why can i see it when i say no to the ads???
When i say yes to the ad all is correct






Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-