vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to: Add a advertisement after first post? (https://vborg.vbsupport.ru/showthread.php?t=65196)

ryancooper 05-16-2004 07:43 PM

How to: Add a advertisement after first post?
 
How can I do this:

http://www.techimo.com/forum/t108340.html

See the google ad after the first post?

Thanks!

Even better if it could be set to onyl show for certain usergroups. . .

Zachery 05-16-2004 08:46 PM

ITs more than possible with just simple template mods :)

Owen 05-16-2004 08:46 PM

that wouldnt be good, that would be GREAT! I am guessing something with <if>'s

Xenon 05-16-2004 09:00 PM

well you have to edit your postbittemplate

and at the very end you have to add something like:

HTML Code:

<if condition="$thread[firstpostid] == $post[postid]">code of your advertisments here</if>

Owen 05-16-2004 09:06 PM

since I have my google ads in the header, what would the <if> code be not to display it on the showthread page? (You are not allowed to show two google ads on one page).

Xenon 05-16-2004 09:08 PM

HTML Code:

<if condition="THIS_SCRIPT != 'showthread'">google add here</if>

P.Jackson 05-17-2004 03:30 PM

how could you do it only for unregistered or certain usersgroups? i.e show it to Registered,unreg,users awaing etc ad not showing it for admins,mods and a custom usergroup

Xenon 05-17-2004 04:24 PM

then you have to combine the conditions:

HTML Code:

<if condition="THIS_SCRIPT != 'showthread' AND $bbuserinfo['usergroupid'] != 6">google add here</if>

ryancooper 05-17-2004 06:51 PM

Quote:

Originally Posted by Xenon
then you have to combine the conditions:

HTML Code:

<if condition="THIS_SCRIPT != 'showthread' AND $bbuserinfo['usergroupid'] != 6">google add here</if>


I am a little confused. I trued to add

PHP Code:

<if condition="$thread[firstpostid] == $post[postid]AND $bbuserinfo['usergroupid'] != 2">code of your advertisments here</if> 

and got:

The following error occurred when attempting to evaluate this template:

Parse error: parse error in /home/talkdis/public_html/forums/includes/adminfunctions_template.php(3037) : eval()'d code on line 209

Also how can I show it to more than one usergroup: ['usergroupid'] != 2,3,4,5"

??

or ['usergroupid'] != 2 AND 3"

Xenon 05-17-2004 07:54 PM

there is a " in the middle of your condition, which shouldn'T be there :p

as for several usergroups you have to use something like this:
Code:

in_array($bbuserinfo['usergroupid'], array(2, 3, 4))


All times are GMT. The time now is 02:45 AM.

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.01066 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete