The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Loop through text files.
I want to make a "template" set (outside of vB), where the HTML is stored in text files and evaluated thereafter.
However, I have no idea how to go about looping through the text file. Can anyone suggest any ideas? Possibly Xenon since you're the only PHP expert online? Dave. |
#2
|
||||
|
||||
Err no, xenon isn't the only PHP expert around here: just check out all the hack makers, and you'll get a rough idea of who the "PHP experts" really are
Some quick instructions on how to go about doing this: Place your text files in a database (you can use phpMyAdmin to insert the text files, just take a look at how vBulletin templates are). Take a look at how the function gettemplate is. (/forum/admin/functions.php) That's what vB uses to get the templates from the database. You can copy and paste from PHP Code:
if you want, and see how that works out (be sure to change the table/column names to wherever your templates are stored.) Then, find in functions.php PHP Code:
Then, in the actual PHP page where you want to echo the text files, type something like: PHP Code:
|
#3
|
|||
|
|||
I have only one word to say.
Quote:
|
#4
|
||||
|
||||
If you don't understand it, then I suggest you start with something a little more simpler first
|
#5
|
|||
|
|||
Dude in the dooutput function it seems to show another function called dovars, which completely looses me.
Besides. At what part of dooutput does it loop through the text file to get the lines of HTML needed to insert into the DB, which as the function gettemplate shows, it selects the template from the DB. Where's the "inserting it into the DB"? Dave. |
#6
|
||||
|
||||
Quote:
Insert template title name in title, and the actual template in template. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|