News:

Version 3.5 has been released. Visit https://custom.simplemachines.org/mods/index.php?mod=255 to get the most up to date version.

Main Menu
Coinbase

Tower ads only on certain forums?

Started by Myself, November 25, 2006, 11:36:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Myself

There might be something I don't understand about the various options, so if I have this wrong please forgive me.

I have a 120x600 tower ad appearing on the left side of every page. How do I set this up so that this ad will only appear on certain boards?

I thought that putting the board names in the "Which boards should this ad display in" option would sort this out, but it didn't. The ads disappeared altogether. I then tried using the number of the board, but that didn't work either.

What am I doing wrong? Or is this feature not available yet?

jerm

It is the ID of the board.
It should look something liket his
1,2,3
you have to seperate them by a comma

Myself

Stupid question: where do I find the ID of the board? Is it a sequential number series based on where the board appears?

jerm

Hover over the link to the board, look at the bottom (or click the link)
You will see the ID in the link.
For example, if you hover of this board it will be:
http://www.smfads.com/forums/index.php?board=1.0
That means the ID for this board is 1


dp24

I have the tower ads displayed in all my boards threads etc...

What i would like to know is there away that the tower ad can display on the forumhome page (index) without showing up in the register, error pages and search....basically to comply with adsense TOS.

Thanks for a great mod....

jerm

Sorry.. but that gives me an idea for the next version.

Myself

I would like to see that feature too.

I think the basic logical structure of the mod should be as follows:

1. Select a page position for your ad block (top, bottom, left, right, etc)
2. Select pages for that ad block to appear (indexes, posts, etc.)

What I really like about this mod is that you don't have to only put ads in it, you can use it to integrate navigation to other parts of your website too (which is my main reason for installing it).

dp24

#8
Quote from: jerm on November 27, 2006, 12:20:18 AM
Sorry.. but that gives me an idea for the next version.


Thanks for considering that.... I have searched everywhere for the answer and could not find it.  Just to let you know on my path to find the answer I have encountered many who will truly appreciate that feature.


BTW This thread maybe of use to you.....however i am sure you know what you are doing....

http://www.simplemachines.org/community/index.php?topic=42714.0

dp24

jerm please tell me you think this is ok

I added

echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
   if (!isset($context['admin_areas'])
&& (!isset($context['sub_template']) || $context['sub_template'] != 'login')
&& (empty($context['current_board']) || $context['current_board'] != 4.0)
&& !in_array('profile', $context['template_layers'])
&& !isset($context['post_errors'])
&& !isset($context['require_agreement'])
&& !isset($context['simple_search']))



on the index template in the tower ads left and right

It now looks like this and seems to remove the ads from most areas needed.

//Tower left Ads
echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
   if (!isset($context['admin_areas'])
&& (!isset($context['sub_template']) || $context['sub_template'] != 'login')
&& (empty($context['current_board']) || $context['current_board'] != 4.0)
&& !in_array('profile', $context['template_layers'])
&& !isset($context['post_errors'])
&& !isset($context['require_agreement'])
&& !isset($context['simple_search']))
   $ads = show_towerleftAds();
   if(!empty($ads))
      echo '<table><tr><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td><td width="100%" valign="top">';

   unset($ads);
   //Tower Right Ads
echo '
   <div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
   if (!isset($context['admin_areas'])
&& (!isset($context['sub_template']) || $context['sub_template'] != 'login')
&& (empty($context['current_board']) || $context['current_board'] != 4.0)
&& !in_array('profile', $context['template_layers'])
&& !isset($context['post_errors'])
&& !isset($context['require_agreement'])
&& !isset($context['simple_search']))
   $ads = show_towerrightAds();   
   if(!empty($ads))
      echo '<table><tr><td width="100%" valign="top">';
   unset($ads);   



There are still a couple areas that need to be removed if any one has suggestions....


jerm

So does that code work?
I do think these two lines need to be reversed:
   $ads = show_towerrightAds();   
   if(!empty($ads))

dp24

yes it seems to work.

I will try and reverse like you suggested as well.

This is not my code it is just sliced out of that thread i linked to.

I am in no way a coder...i just thought it looked like it may work so i tried it....and dang it..it worked...lol

what would need to be added to remove the ads from these pages

action=help
action=mlist
action=pm

Rus

Is this still being considered?

I'm not much of a coder either so I could try adding those lines into mine but thought if the mod itself could do it that would be better.