Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #46  
Old 26 Dec 2010, 01:02
AlexisMedia AlexisMedia is offline
 
Join Date: Dec 2010
Yes, I apologize. I didn't realize it when I first typed my post... Then I left it.

Moving on...
Reply With Quote
  #47  
Old 03 Feb 2011, 14:15
nikki712 nikki712 is offline
 
Join Date: Sep 2006
I want to exclude the forums listed below. But when I use this conditional, I get an error. What am I doing wrong? I'm running 3.8.6 PL1


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It's not working.

I get the error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

How can I fix this? Is the fact that I run vbseo a problem?

I'd also like to exclude certain usergroups from seeing ads. How do I accomplish both of these things?

Last edited by nikki712; 03 Feb 2011 at 14:20.
Reply With Quote
  #48  
Old 03 Feb 2011, 14:48
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
What's wrong is your condition is wrong... it should look like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #49  
Old 03 Feb 2011, 14:52
nikki712 nikki712 is offline
 
Join Date: Sep 2006
Thanks! Is there a way to use two conditionals? I don't want ads showing up in certain forums, and there's on particular usergroup that I want to block ads from. Is this possible?
Reply With Quote
  #50  
Old 03 Feb 2011, 15:34
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That won't show it in forums 1, 2, 3, or 4 and won't show it to anyone in usergroups 5 or 6.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #51  
Old 03 Feb 2011, 16:07
nikki712 nikki712 is offline
 
Join Date: Sep 2006
I'm sorry to be a pain, but this is what I used and the ads are still showing up on every forum. I have one particular forum where sponsors answer questions. This forum as an "Ask the Expert" forum with several child forums dedicated to each individual expert. I don't want ads for competitors showing up there. What is wrong with my code now? I have included the "Ask the Expert" forum ID, along with the IDs for all the child forums. Ads cannot show up in these forums, and I don't want the "experts" usergroup to see any at ads at all...on any forum.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #52  
Old 03 Feb 2011, 16:18
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Where are you putting this code?

Some places user different variables, instead of $forum['forumid'] try $thread['forumid'] or $foruminfo['forumdid'] or $threadinfo['forumid'] (if you're in a thread).
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #53  
Old 03 Feb 2011, 16:28
nikki712 nikki712 is offline
 
Join Date: Sep 2006
I've tested it on ad_navbar_below.

--------------- Added 03 Feb 2011 at 17:12 ---------------

When I try the $foruminfo['forumdid'] code, the ad shows up as "page cannot be displayed". I'm gonna try the other two suggestions and see if they work.

Last edited by nikki712; 03 Feb 2011 at 17:12. Reason: Auto-Merged DoublePost
Reply With Quote
  #54  
Old 03 Feb 2011, 17:42
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by nikki712 View Post
I've tested it on ad_navbar_below.

--------------- Added 03 Feb 2011 at 17:12 ---------------

When I try the $foruminfo['forumdid'] code, the ad shows up as "page cannot be displayed". I'm gonna try the other two suggestions and see if they work.
It's $foruminfo then... if there's a problem the ad can't be shown that's an unrelated issue - a problem with your ad code.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #55  
Old 03 Feb 2011, 17:53
nikki712 nikki712 is offline
 
Join Date: Sep 2006
None of these seem to work. I'm so frustrated b/c I've had a server load problem and have narrowed it down to the Adsense hack I have installed. I'm hoping to find a workaround for this by using these conditionals, but they don't want to cooperate with me.

--------------- Added 03 Feb 2011 at 17:55 ---------------

The problem is that even though it said "page cannot be displayed", it was still showing up in a forum that it shouldn't be in. I made a test user and put it in the "experts" usergroup, and could see all ads.

--------------- Added 03 Feb 2011 at 17:56 ---------------

I'm just going to try to get it to not show up in the experts forum, and forget about blocking ads throughout the entire forum for my experts group.

Last edited by nikki712; 03 Feb 2011 at 17:56. Reason: Auto-Merged DoublePost
Reply With Quote
  #56  
Old 03 Feb 2011, 17:59
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I just tested this on my forum, it's definitely $foruminfo['forumid'] to show the ad code in specific forums (forumdisplay) and threads in that forum (showthread.)

If you get the page can't be displayed message in the ad box you have an error in the code you copied from google to show the ad. The fact that the box shows means the conditional is working.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #57  
Old 03 Feb 2011, 20:06
nikki712 nikki712 is offline
 
Join Date: Sep 2006
I don't know what I'm doing wrong, but if you don't mind, can you please take a look at my code and see if anything looks wrong? I'm copying the code directly from Google. My hack works fine, but I disable it to test out the conditionals.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

32,48,34,44,41,49,53,58,61,79,82,81,80,46,52,36,40 - Forum IDs I DON'T want ads shown in.

Also, could my PHP version be the problem? I'm running 5.2.16.

--------------- Added 03 Feb 2011 at 21:12 ---------------

The answer is to use $GLOBALS instead of $foruminfo. Works like a charm!

Last edited by nikki712; 03 Feb 2011 at 21:12. Reason: Auto-Merged DoublePost
Reply With Quote
  #58  
Old 03 Feb 2011, 21:13
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
I copied your code into my forum and the condition works perfectly fine for me (in the ad_navbar_below template) which is shown in the navbar template...

What exactly isn't working? I can't test the google code obviously but it looks like it should work if you had numbers in place of the x's.

DO you have a kink to a forum this is running on?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #59  
Old 03 Feb 2011, 23:29
nikki712 nikki712 is offline
 
Join Date: Sep 2006
Nope, no kinks. This code works:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Zachary at vb.com helped me out. He said to make them two separate conditionals like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I haven't tried the last code, but will a little later on. I'll let you know how it goes. Thanks!!!

--------------- Added 03 Feb 2011 at 23:31 ---------------

Oh, the problem was that the ads were showing up in the forums I didn't want them to show up in. They were also showing up to the usergroups I didn't want them showing up to. The "page cannot be displayed" was just a glitch with one of the image ads. That's all that was.

Last edited by nikki712; 03 Feb 2011 at 23:31. Reason: Auto-Merged DoublePost
Reply With Quote
  #60  
Old 28 Feb 2011, 15:12
PAKIDIL PAKIDIL is offline
 
Join Date: Jan 2007
i have problem in conditional coding too .

i am pasting this in one of my template ad location ad_showthread_firstpost

<if condition="THIS_SCRIPT != 'adv_index' AND THIS_SCRIPT != 'register' AND $GLOBALS[forumid] != 6">


and getting this error

Parse error: syntax error, unexpected ',' in /home/forum/public_html/includes/adminfunctions_template.php(3772) : eval()'d code on line 1

can anyone help ?.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:19.

Layout Options | Width: Wide Color: