View Single Post
  #1  
Old 01-29-2005, 05:44 PM
renee1 renee1 is offline
 
Join Date: Jan 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default help with conditions

I am trying to come up with a way to use phpadsnew on our site. We did in the past having seperate ads for each forum by using a different set of templates for each forum. This makes some edits very hard and I wanted to makes things a little simpler. We have also been using the remote invocation codes and I would like to use the php codes instead.

In order to do this, and I am trying to make it simple for others to edit....
I have considered several options and been trying hard to make them work. Getting my butt kicked all over the place.

I was thinking if I set a condition based on forumid I should be able to call the proper set of avdertisements embeded in a table...


I tried
PHP Code:
$advertiser2 'table and it's contents'; 
but can't get the table and contents to print to FORUM Display templates.

I also have tried to set conditions for advertiser2 so it would call the advertisments for that forum

PHP Code:
if ($foruminfo['forumid']=='9'){
     
$advertiser2 'table and content with remote linking codes';}
else 
if (
$foruminfo['forumid']=='6'){$advertiser2 'table and content with remote linking codes';} 
failed

I have even considered making new templates just to contain the linking codes thinking I could use the local php invocation codes but that didnt seem to work either.

I can't believe this is so hard to do but I am sure it is not that hard just that I don't know enough to do it. Any help would be appreciated for sure. I just feel so beatin down by this, been working on it for two days and gotten nowhere. I can get text to work for the variable but not the table. :tired:


PHP Code:
<!---- START UPPER ADVERTISEMENT BUTTON SPOTS --->
<if 
condition="THIS_SCRIPT=='index'">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr
<
td class="alt1"> <div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=abaafd4c' target='_blank'><img src='http://xxxxx.com/adscript/adview.php?what=zone:26&amp;n=abaafd4c' border='0' alt=''></a></div>
</
td>

<
td class="alt1"
<
div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=a2c8dace' target='_blank'><img src='http://xxxxx.com/adscript/adview.php?what=zone:27&amp;n=a2c8dace' border='0' alt=''></a></div>
</
td>

<
td class="alt1"
<
div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=a4fc83ad' target='_blank'><img 
src
='http://xxxxx.com/adscript/adview.php?what=zone:28&amp;n=a4fc83ad' border='0' alt=''></a></div>
</
td>

<
td class="alt1"
<
div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=a164885b' target='_blank'><img src='http://xxxxx.com/adscript/adview.php?what=zone:29&amp;n=a164885b' border='0' alt=''></a></div>
</
td>

<
td class="alt1">
<
div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=aa3f37b7' target='_blank'><img 
src
='http://xxxxx.com/adscript/adview.php?what=zone:30&amp;n=aa3f37b7' border='0' alt=''></a></div></td></tr>
</
table><br>
<else />

<!-- /
FORUM JUST STUFF -->
<if 
condition="$foruminfo[forumid]=='6'">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr> <td class="alt1"> <div align="center"><a href='http://xxxxx.com/adscript/adclick.php?n=ac837f0c' target='_blank'><img 
src
='http://xxxxx.com/adscript/adview.php?what=zone:19&amp;n=ac837f0c' border='0' alt=''></a></div>
</
td
(its big so I will stop here)
This seems to be working in the navbar template but wont work in the forumdisply template.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01187 seconds
  • Memory Usage 1,823KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete