vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Help Needed Finding/Closing bad "if" ... (https://vborg.vbsupport.ru/showthread.php?t=277247)

HipHopStan.com 01-19-2012 04:12 AM

Help Needed Finding/Closing bad "if" ...
 
I get an error while trying to wrap my ads in the following condition:

<if condition="$foruminfo[forumid] == "xxx"">
<!-- no ads-->
<else />
ad code here
</if>

I've been told i'm missing a slash or closing </if> statement.

I can't find the bad if in the document... can someone help me troubleshoot it out please.

Quote:

<div id="navbar" class="navbar">
<ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
{vb:raw template_hook.navtab_start}
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
<li class="selected"><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a>
<ul class="floatcontainer">
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
</vb:if>
</vb:if>
{vb:raw template_hook.navbar_after_getnew}
<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_pm}
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
{vb:raw template_hook.navbar_after_faq}
<vb:if condition="$show['canviewcalendar']">
<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_calendar}
<vb:if condition="$show['communitylink']">
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a>
<ul class="popupbody popuphover">
{vb:raw template_hook.navbar_community_menu_start}
<vb:if condition="$show['quick_links_groups']">
<li><a href="{vb:link grouphome}">{vb:rawphrase social_groups}</a></li>
</vb:if>
<vb:if condition="$show['quick_links_albums']">
<li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
</vb:if>
<vb:if condition="$bbuserinfo['userid']">
<li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
</vb:if>
<vb:if condition="$show['memberslist']">
<li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
</vb:if>
{vb:raw template_hook.navbar_community_menu_end}
</ul>
</li>
</vb:if>
{vb:raw template_hook.navbar_after_community}
<vb:if condition="$show['canviewforums']">
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
<ul class="popupbody popuphover">
<li>
<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
</li>
<vb:if condition="$show['member']">
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
</li>
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
</li>
</vb:if>
</ul>
</li>
</vb:if>
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a>
<ul class="popupbody popuphover">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="{vb:link subscription}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
<li><a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&amp;focus=1','budd ylist','statusbar=no,menubar=no,toolbar=no,scrollb ars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a></li>
</vb:if>
<vb:if condition="$vboptions['forumleaders']">
<li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}
<vb:if condition="$show['wollink']">
<li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos4}
</ul>
</li>
{vb:raw template_hook.navbar_end}
</ul>

</li>
<vb:else />
<li><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a></li>
</vb:if>
{vb:raw template_hook.navtab_middle}
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
<vb:if condition="$show['member']">
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Event">{vb:rawphrase new_events_nav}</a></li>
{vb:raw template_hook.navbar_getnew_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
<vb:else />
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Event">{vb:rawphrase daily_events}</a></li>
{vb:raw template_hook.navbar_getdaily_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
</vb:if>
<vb:elseif condition="$show['member']" />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
</vb:if>
{vb:raw template_hook.navtab_end}
</ul>

<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
<vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.<vb:if condition="is_browser('ie') AND !is_browser('ie', 7)">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search'). submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->

<div class="body_wrapper">
<div id="breadcrumb" class="breadcrumb">
<ul class="floatcontainer">
<li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
{vb:raw navbits.breadcrumb}
{vb:raw navbits.lastelement}
</ul>
<hr />
</div>

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">
<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
<input type="hidden" name="do" value="dismissnotice" />
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
<input type="hidden" name="url" value="{vb:raw return_link}" />
<ol>
{vb:raw notices}
</ol>
</form>
</vb:if>


<if condition="$forum[forumid] == "50"">
<!-- no ads-->
<else />
<div style=""><div style="width: 700px; height: 270px; margin-left: auto; margin-right: auto; clear: both;">
<div style="width: 350px; float: left;">
<center>
<!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */-->

<!--/*
* This tag has been generated for use on a non-SSL page. If this tag
* is to be placed on an SSL page, change the
* 'http://www.xxxxx.com/openx/www/delivery/...'
* to
* 'https://www.xxxxx.com/openx/www/delivery/...'
*
* The backup image section of this tag has been generated for use on a
* non-SSL page. If this tag is to be placed on an SSL page, change the
* 'http://www.xxxx.com/openx/www/delivery/...'
* to
* 'https://www.xxxx.com/openx/www/delivery/...'
*
* If iFrames are not supported by the viewer's browser, then this
* tag only shows image banners. There is no width or height in these
* banners, so if you want these tags to allocate space for the ad
* before it shows, you will need to add this information to the <img>
* tag.
*/-->

<iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl }' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;c t0={clickurl}' border='0' alt='' /></a></iframe>
</center>
</div><div style="width: 350px; float: left;">
<center>
<!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */-->

<!--/*
* This tag has been generated for use on a non-SSL page. If this tag
* is to be placed on an SSL page, change the
* 'http://www.xxxxx.com/openx/www/delivery/...'
* to
* 'https://www.xxxxx.com/openx/www/delivery/...'
*
* The backup image section of this tag has been generated for use on a
* non-SSL page. If this tag is to be placed on an SSL page, change the
* 'http://www.xxxx.com/openx/www/delivery/...'
* to
* 'https://www.xxxx.com/openx/www/delivery/...'
*
* If iFrames are not supported by the viewer's browser, then this
* tag only shows image banners. There is no width or height in these
* banners, so if you want these tags to allocate space for the ad
* before it shows, you will need to add this information to the <img>
* tag.
*/-->

<iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl }' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;c t0={clickurl}' border='0' alt='' /></a></iframe>
</center>
</div></div></div>
</if>
^^ the above is my navbar html. You can find the condition I'm trying to add at the very bottom. It gives me the following error...

Quote:

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3555

The following error occurred when attempting to evaluate this template:
%1$s

nerbert 01-19-2012 04:27 AM

I don't know where you put that bit of code but it's for vB3. For vB4 it should look like this:

HTML Code:

<vb:if condition="$foruminfo['forumid'] == "xxx"">
<!-- no ads-->
<vb:else />
ad code here
</vb:if>

And another thing, you have two double quote marks in the first tag at the end after xxx. Should be just one.

EDIT: put single quotes around forumid

HipHopStan.com 01-23-2012 03:03 AM

I appreciate your assistance...


i get the following error:

Quote:

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3557

vBulletin Message
The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
when adding the code below to my navbar template at the end... after </vb:if>

Quote:

<vb:if condition="$foruminfo['forumid'] == "50">
<!-- no ads-->
<vb:else />
ad code here
</vb:if>

nerbert 01-23-2012 03:33 AM

Oops, I think I see the problem:

HTML Code:

<vb:if condition="$foruminfo['forumid'] == 50">
<!-- no ads-->
<vb:else />
ad code here
</vb:if>

There shouldn't be quotes around the 50 but you do need quotes around the entire condition

HMBeaty 01-23-2012 03:38 AM

Replace all of this:
HTML Code:

<if condition="$forum[forumid] == "50"">
 <!-- no ads-->
 <else />
<div style=""><div style="width: 700px; height: 270px; margin-left: auto; margin-right: auto; clear: both;">
 <div style="width: 350px; float: left;">
 <center>
 <!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */-->
 
 <!--/*
  * This tag has been generated for use on a non-SSL page. If this tag
  * is to be placed on an SSL page, change the
  *  'http://www.xxxxx.com/openx/www/delivery/...'
  * to
  *  'https://www.xxxxx.com/openx/www/delivery/...'
  *
  * The backup image section of this tag has been generated for use on a
  * non-SSL page. If this tag is to be placed on an SSL page, change the
  *  'http://www.xxxx.com/openx/www/delivery/...'
  * to
  *  'https://www.xxxx.com/openx/www/delivery/...'
  *
  * If iFrames are not supported by the viewer's browser, then this
  * tag only shows image banners. There is no width or height in these
  * banners, so if you want these tags to allocate space for the ad
  * before it shows, you will need to add this information to the <img>
  * tag.
  */-->

 
 <iframe id='xxxx' name='xxxx'  src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl}'  frameborder='0' scrolling='no' width='300' height='250'><a  href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}'  target='_blank'><img  src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;ct0={clickurl}'  border='0' alt='' /></a></iframe>
 </center>
 </div><div style="width: 350px; float: left;">
 <center>
 <!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */-->
 
  <!--/*
    * This tag has been generated for use on a non-SSL page. If this tag
    * is to be placed on an SSL page, change the
    *  'http://www.xxxxx.com/openx/www/delivery/...'
    * to
    *  'https://www.xxxxx.com/openx/www/delivery/...'
    *
    * The backup image section of this tag has been generated for use on a
    * non-SSL page. If this tag is to be placed on an SSL page, change the
    *  'http://www.xxxx.com/openx/www/delivery/...'
    * to
    *  'https://www.xxxx.com/openx/www/delivery/...'
    *
    * If iFrames are not supported by the viewer's browser, then this
    * tag only shows image banners. There is no width or height in these
    * banners, so if you want these tags to allocate space for the ad
    * before it shows, you will need to add this information to the <img>
    * tag.
    */-->

 
  <iframe id='xxxx' name='xxxx'  src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl}'  frameborder='0' scrolling='no' width='300' height='250'><a  href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}'  target='_blank'><img  src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;ct0={clickurl}'  border='0' alt='' /></a></iframe>
 </center>
 </div></div></div>
 </if>

With this:
HTML Code:

<vb:if condition="$forum['forumid'] == 50">
    <!-- no ads -->
<vb:else />
    <div style="">
        <div style="width:700px;height:270px;margin-left:auto;margin-right:auto;clear:both;">
            <div style="width:350px;float:left;">
                <center>
                    <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;ct0={clickurl}' border='0' alt='' /></a></iframe>
                </center>
            </div>
            <div style="width: 350px; float: left;">
                <center>
                    <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&amp;cb={random}&amp;ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&amp;cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&amp;cb={random}&amp;n=axxxa&amp;ct0={clickurl}' border='0' alt='' /></a></iframe>
                </center>
            </div>
        </div>
    </div>
</vb:if>


HipHopStan.com 01-23-2012 08:47 PM

wow... finally works!

thanks guys!

--------------- Added [DATE]1327360021[/DATE] at [TIME]1327360021[/TIME] ---------------

still using this...

<vb:if condition="$foruminfo['forumid'] == 50">
<!-- no ads-->
<vb:else />
ad code here
</vb:if>

how do i make the the ad code show only for guest still?

HipHopStan.com 01-25-2012 02:11 AM

how do i make the ad code for this condition display only for guest?

HMBeaty 01-25-2012 02:13 AM

Try this
HTML Code:

<vb:if condition="$foruminfo['forumid'] == 50" AND $show['member']>
    <!-- no ads-->
<vb:else />
    ad code here
</vb:if>


HipHopStan.com 01-25-2012 02:55 AM

the ad code still showed for all members.

HMBeaty 01-25-2012 03:07 AM

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>


HipHopStan.com 01-25-2012 07:07 PM

Quote:

Originally Posted by HMBeaty (Post 2292059)
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

HipHopStan.com 02-02-2012 07:49 PM

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?

kh99 02-03-2012 02:46 PM

Assuming you still want guests only:

Code:

<vb:if condition="$foruminfo['forumid'] == '50' AND $show['guest']">
    ad code here
</vb:if>


HipHopStan.com 02-03-2012 06:14 PM

Quote:

Originally Posted by kh99 (Post 2295741)
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(); ?>";

kh99 02-03-2012 06:19 PM

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.

HipHopStan.com 02-03-2012 07:19 PM

Quote:

Originally Posted by kh99 (Post 2295802)
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

kh99 02-03-2012 07:28 PM

Quote:

Originally Posted by HipHopStan.com (Post 2295800)
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}

HipHopStan.com 02-03-2012 07:42 PM

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>

kh99 02-03-2012 07:49 PM

I guess the 'if' condition is false. Where are you putting that code?

HipHopStan.com 02-03-2012 08:09 PM

i'm placing the code in postbit legacy

kh99 02-03-2012 08:21 PM

Try using $thread[forumid] instead of $foruminfo[forumid].

HipHopStan.com 02-03-2012 08:48 PM

didn't work either...

i tried

$thread[forumid]

and

$thread['forumid']

kh99 02-03-2012 08:53 PM

OK, try this: before the first line of your code (outside the 'if') put
Code:

Forum {vb:raw thread.forumid}<br />

and see if you can see that.

HipHopStan.com 02-03-2012 09:11 PM

are you referring to the post bit legacy code or my conditional code?

kh99 02-03-2012 09:18 PM

Quote:

Originally Posted by HipHopStan.com (Post 2295852)
are you referring to the post bit legacy code or my conditional code?

Just before your code. I want to see if thread.forumid has the forumid and what it is.

I also could be wrong about what the probelm is, in which case you might see nothing.

HipHopStan.com 02-03-2012 09:26 PM

I placed Forum {vb:raw thread.forumid}<br /> at the very top of my post bit legacy.. but i'm not seeing it in my page source

kh99 02-03-2012 09:33 PM

I just noticed the link to your site in your sig, so I went there and I can see "Forum 31" before each post. http://www.hiphopstan.com/forum/mixt...ed-2012-a.html

(so I guess you can take it out now)

HipHopStan.com 02-03-2012 09:40 PM

ok...

is there any solution to make the code work?

I was searching page source for thread.forumid

kh99 02-04-2012 12:25 AM

Well if you start your code with:

Code:

<vb:if condition="in_array($thread[forumid], array(27, 31, 33)) AND $show[guest]">

then you should see your code (only for guests and only in those 3 forums).

HipHopStan.com 02-04-2012 12:10 PM

Great!

I got it working and in position. You've been a BIG help.

My last question... I would like guest and members to see this ad

kh99 02-04-2012 12:14 PM

Just remove "AND $show[guest]" from the condition.

HipHopStan.com 02-04-2012 12:27 PM

Quote:

Originally Posted by kh99 (Post 2296093)
Just remove "AND $show[guest]" from the condition.

i'm all set!

thanks kh99


All times are GMT. The time now is 09:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02039 seconds
  • Memory Usage 1,908KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (9)bbcode_html_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete