vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Different headers on showthread for different rooms (https://vborg.vbsupport.ru/showthread.php?t=61973)

fonzerelli_79 02-27-2004 12:42 PM

Different headers on showthread for different rooms
 
i have this on one of my boards a few years ago with vb2 - ive had a look for it for vb3 but cant find anything

basically, the hack allows you to add different headers to each room you have - the main benefit being that you can sell advertising in all of the different rooms
id love to be able to add this to a forum site im launching soon

does anyone know if this hack has been done yet for vb3?

:)

Andreas 02-27-2004 01:31 PM

So you mean if a thread is in forum x then it should display ad x, if the thread is in forum y it should display ad y?

Then you don't need a hack, you can do this with template conditionals.

In template SHOWTHREAD put
Code:

<if condition="$thread[forumid] == 12">
  Ad for Forum ID 12
</if>
<if condition="$thread[forumid] == 16">
  Ad for Forum ID 16
</if>

Or you can use this Hack.
The template-code this hack uses for template FORUMDISPLAY also works in template SHOWTHREAD.

fonzerelli_79 02-27-2004 01:34 PM

oh right - i didnt realise you could do that with the template system - superb - thanks for that :)

mike095 06-24-2004 06:05 AM

If we create a table called t_ads with 2 columns:
ForumID = Integer
AdCode = The code from our ad server

When a user is browsing forum ID 22, how can we show the ad code
FROM Adcode WHERE (ForumID =22)

We'd like it to work for any forumID. The add code could be an IFrame, Javascript, or other code.

Andreas 06-26-2004 08:33 PM

There has been a hack released to add banners to the forum.
I think it could be easiliy modified for your needs.

mike095 06-26-2004 09:14 PM

Where would I find the hack?

Andreas 06-26-2004 09:17 PM

https://vborg.vbsupport.ru/showthread.php?t=61555
https://vborg.vbsupport.ru/showthread.php?t=65890

As far as I can see, the second hack does exactly what you want.


All times are GMT. The time now is 11:12 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.01072 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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