Coinbase

Author Topic: Tower ads only on certain forums?  (Read 5795 times)

0 Members and 1 Guest are viewing this topic.

Offline Myself

  • Newbie
  • *
  • Posts: 7
Tower ads only on certain forums?
« on: November 25, 2006, 11:36:30 am »
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?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Tower ads only on certain forums?
« Reply #1 on: November 25, 2006, 01:47:03 pm »
It is the ID of the board.
It should look something liket his
1,2,3
you have to seperate them by a comma

Offline Myself

  • Newbie
  • *
  • Posts: 7
Re: Tower ads only on certain forums?
« Reply #2 on: November 25, 2006, 10:16:06 pm »
Stupid question: where do I find the ID of the board? Is it a sequential number series based on where the board appears?

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Tower ads only on certain forums?
« Reply #3 on: November 26, 2006, 12:45:07 pm »
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

Offline Myself

  • Newbie
  • *
  • Posts: 7
Re: Tower ads only on certain forums?
« Reply #4 on: November 26, 2006, 01:36:42 pm »
Thanks!

Offline dp24

  • Newbie
  • *
  • Posts: 4
Re: Tower ads only on certain forums?
« Reply #5 on: November 26, 2006, 05:36:57 pm »
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....

Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Tower ads only on certain forums?
« Reply #6 on: November 27, 2006, 12:20:18 am »
Sorry.. but that gives me an idea for the next version.

Offline Myself

  • Newbie
  • *
  • Posts: 7
Re: Tower ads only on certain forums?
« Reply #7 on: November 27, 2006, 12:44:58 am »
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).

Offline dp24

  • Newbie
  • *
  • Posts: 4
Re: Tower ads only on certain forums?
« Reply #8 on: November 27, 2006, 05:58:33 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
« Last Edit: November 27, 2006, 06:09:04 am by dp24 »

Offline dp24

  • Newbie
  • *
  • Posts: 4
Re: Tower ads only on certain forums?
« Reply #9 on: November 27, 2006, 07:48:45 am »
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....


Offline jerm

  • Support
  • Elite Member
  • *
  • Posts: 726
Re: Tower ads only on certain forums?
« Reply #10 on: November 27, 2006, 04:12:20 pm »
So does that code work?
I do think these two lines need to be reversed:
   $ads = show_towerrightAds();   
   if(!empty($ads))

Offline dp24

  • Newbie
  • *
  • Posts: 4
Re: Tower ads only on certain forums?
« Reply #11 on: November 27, 2006, 07:48:43 pm »
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

Offline Rus

  • Jr. Member
  • **
  • Posts: 13
Re: Tower ads only on certain forums?
« Reply #12 on: August 08, 2007, 12:57:28 pm »
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.

SMF Ads Support Forum

Re: Tower ads only on certain forums?
« Reply #12 on: August 08, 2007, 12:57:28 pm »
.

 

.