Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-25-2012, 08:07 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HMBeaty View Post
Yeah, I see where I screwed up on that first code. Also, not sure why I didn't think of this first, but replace this
HTML Code:
<vb:if condition="$foruminfo['forumid'] == 50">
    <!-- no ads-->
<vb:else />
    ad code here
</vb:if>
With this:
HTML Code:
<vb:if condition="$foruminfo['forumid'] != '50' AND $show['guest']">
    ad code here
</vb:if>
works like a charm. Thank you so much
Reply With Quote
Благодарность от:
HMBeaty
  #12  
Old 02-02-2012, 08:49 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys,

This time i want to SHOW ads for one forum and its two sub-forums -- but i don't want the ad to show in any other forums.

What's the conditional?
Reply With Quote
  #13  
Old 02-03-2012, 03:46 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Assuming you still want guests only:

Code:
<vb:if condition="$foruminfo['forumid'] == '50' AND $show['guest']">
    ad code here
</vb:if>
Reply With Quote
  #14  
Old 02-03-2012, 07:14 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Assuming you still want guests only:

Code:
<vb:if condition="$foruminfo['forumid'] == '50' AND $show['guest']">
    ad code here
</vb:if>
Thanks for the reply. The above conditional didn't work out for me. Let me be clearer... hopefully this image makes sense...

http://img15.imageshack.us/img15/5799/24292276.jpg

1. I believe this code needs to go somewhere in postbit legacy, but i don't know exactly where. I would like it for the 1st post on all pages. Please advise.

2. The forum IDs for this particular ad code: 27, 31, and 33. (31 and 33 are subforums to 27) I want everyone to see this ad. I don't want this ad appearing in any other forums.

3. What's the piece of code to make the thread titles show for Send "(Thread Title)" Ringtone to your Cell

For our wordpress site this works:
rm_artist = "<?php the_title(); ?>";
Reply With Quote
  #15  
Old 02-03-2012, 07:19 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, you did say "and subforums". Try this:

Code:
<vb:if condition="in_array($foruminfo['forumid'], array(27, 31, 33)) AND $show['guest']">
    ad code here
</vb:if>

I'm not sure if you wanted a response to the rest of the styuff you posted.
Reply With Quote
  #16  
Old 02-03-2012, 08:19 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Sorry, you did say "and subforums". Try this:

Code:
<vb:if condition="in_array($foruminfo['forumid'], array(27, 31, 33)) AND $show['guest']">
    ad code here
</vb:if>

I'm not sure if you wanted a response to the rest of the styuff you posted.
Yes, I would like a reply to 1. and 3.

thanks for providing me the conditional as well
Reply With Quote
  #17  
Old 02-03-2012, 08:28 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HipHopStan.com View Post
1. I believe this code needs to go somewhere in postbit legacy, but i don't know exactly where. I would like it for the 1st post on all pages. Please advise.
I don't know exactly where to put the code, but to show it only for the first post I believe you want to check $post[isfirstshown].

Quote:
3. What's the piece of code to make the thread titles show for Send "(Thread Title)" Ringtone to your Cell
Try {vb:raw thread.title}
Reply With Quote
  #18  
Old 02-03-2012, 08:42 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

something is wrong...

the code isn't appearing at all... i don't see it in the page source either

Quote:
<vb:if condition="in_array($foruminfo['forumid'], array(27, 31, 33)) AND $show['guest']">
<div align="center">
<script type="text/javascript">
rm_sid = "***";
rm_artist = "{vb:raw thread.title}";
rm_song = "";
rm_icon_left = "http://www.***.com/ToneFuse/phone_left.gif";
rm_icon_right = "http://www.***.com/ToneFuse/phone_right.gif";

document.write('<a href="http://www.****.com/go/?sid=' + rm_sid + '&amp;artist=' + encodeURIComponent(rm_artist)+'&amp;song=' + encodeURIComponent(rm_song) + '" target="_blank" rel="nofollow" style="text-decoration: none; font: bold 14px Arial;"><img src="' + rm_icon_left + '" style="border-style: none; vertical-align: bottom;" /> <span style="text-decoration: underline; color: #f00;">Send ' + (rm_song != '' && rm_artist != '' ? '&quot;' + rm_song + '&quot; Ringtone' : (rm_artist != '' ? rm_artist + ' Ringtones' : 'Ringtones')) + ' to your Cell</span> <img src="' + rm_icon_right + '" style="border-style: none; vertical-align: bottom;" /></a>');
</script></div>
</vb:if>
Reply With Quote
  #19  
Old 02-03-2012, 08:49 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess the 'if' condition is false. Where are you putting that code?
Reply With Quote
  #20  
Old 02-03-2012, 09:09 PM
HipHopStan.com HipHopStan.com is offline
 
Join Date: Sep 2008
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm placing the code in postbit legacy
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04358 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_html
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete