The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Load content from file
Hi,
I'm trying to create a simple command line to load the content of a txt file into a template. The idea is host a lot of txt files in the server that are named as the id of each forum (255.txt, 235.txt...) and when a user, for example, enters http://forum.forum.com/forumdisplay.php?f=221 this command will insert the content of the 221.txt file somewhere in the template. Any ideas? =) Thanks. |
#2
|
|||
|
|||
<a href="http://www.vbulletin.com/docs/html/main/templates_externalfiles" target="_blank">Including External Files</a>
|
#3
|
|||
|
|||
Thank you Marco, I tried this simple plugin, hooked it to "global_start", execution order 5:
$incluirads = implode('', file('images/{$foruminfo[forumid]}.txt')); In the hope that when activated the plugin could get the $foruminfo[forumid] number from the forum from which it was been loaded and complete the command line like: $incluirads = implode('', file('images/{221.txt')); And, load the 221.txt file for that forum. But, I just could make it works without the $foruminfo[forumid] variable, which is essential to me. Is there a way to put the $foruminfo[forumid] variable in the plugin, so it load the correct txt file for each forum? Thanks |
#4
|
|||
|
|||
I don't think global_start is the correct hook location to use. It is executed on each page, even if no forum info available.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|