vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Dynamic filename includes for adverting (https://vborg.vbsupport.ru/showthread.php?t=143949)

GreeceMonkey 04-03-2007 07:19 PM

Dynamic filename includes for adverting
 
Hello People,

I am not any good at all with PHP, and am trying to find a good way for me to create a dyanmic advertising system.

I would like to be able to create static page containing the code for each advert

so I may have

/adverts/1.htm
/adverts/3.htm

to provide the content to foums 1 and 3. I will always have a file for all my forums, so I dont need any exceptions writen in the code.

just how do I write include /advert/{fourmid}.htm in the sections of the templates I want to display adverts

I did find some threads but I could not make it work, as it was not exactly what i was looking for

Kind Regards

Graham Mattingley

Hi Sorry to bump this already. I have found this code, and am going to try it. I know very little about PHP script. Does the blow script mean I need to create a ob_start for every possible file that could be called by the requirestatement.

How to I refer to the contents of the file as a varable, is the varable name $fieldnote

// get htm file to include at the top of the thread:
ob_start();
require("../fielddoc/1/1.htm");
$fieldnote = ob_get_contents();
ob_end_clean();

require("../fielddoc/1/".$threadid.".htm");

Graham

Hi Sorry to bump this already. I have found this code, and am going to try it. I know very little about PHP script. Does the blow script mean I need to create a ob_start for every possible file that could be called by the requirestatement.

How to I refer to the contents of the file as a varable, is the varable name $fieldnote

// get htm file to include at the top of the thread:
ob_start();
require("../fielddoc/1/1.htm");
$fieldnote = ob_get_contents();
ob_end_clean();

require("../fielddoc/1/".$threadid.".htm");


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