The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
define statements in php
Hey all,
Does vb reconise this type of statement in php files if not what would be the correct way to address this? somefile.php PHP Code:
PHP Code:
as mention just switched over from phpbb and need to convert some apps and their template engine is a lot differnt In the php file I had something like this PHP Code:
How would I convert these template to use VB's template engine/variables Thanks in advance! |
#2
|
|||
|
|||
The master coders here don't know this one?
So there's no way to get my old templates to reconize the data that's being pulled? eg Code:
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td align="left"><span class="nav"><a class="nav"<a href="list.php" class="nav">Song Index</a></span></td> </tr> </table> <table width="100%" cellspacing="1" cellpadding="3" border="0"> <tr> <td valign="top"> <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0"> <tr> <th class="thHead">Welcome to </span></td> </tr> </table> <br /> {PLAYER_FEATURES} </td> <td valign="top"> {PLAYER_STATS} </td> </tr> </table> $footer Where and how's it done? Is it set via the actaul php script or via the CP Var Replacement thing? Should {PLAYER_FEATURES} be changed to $PLAYER_FEATURES Using the above as an example- index template inside of a template it pulls a variable called {PLAYER_STATS} player stats is another template that contains html code and which get's it's data via sql So instead of having to place all the html codes etc inside of the index template I can just pull data and dynamicly create the index tables, cells etc on the fly Thanks |
#3
|
|||
|
|||
In you php you first assign the contents of 1 or sub templates to a variable, then use that variable in your main template. And yes it would be a normal php variable, so the name would be $PLAYER_FEATURES or similar.
|
#4
|
|||
|
|||
Thanks MarcoH,
Where are these defined- was poking around the files and can not seem to find them again $DB_site->query(" $DB_site->query_first( " |
#5
|
|||
|
|||
./includes/db_mysql.php
But no need to change anything to those. |
#6
|
|||
|
|||
Quote:
Was not going to re-write anything in there- Just need to figure out how to redo all my scripts that I have to match all this VB stuff. Probally easier for me to just hire someone to do it, I don;t have the time, nor the inclination at the moment to redo all my php mods that I want to port over. https://vborg.vbsupport.ru/showthread.php?t=92550 looks like everything in regards to this type of coding is going to have to be redone PHP Code:
what would be this best way to redo this so that I can get them in the templates PHP Code:
PHP Code:
PHP Code:
Code:
<td>$SONG_LENGTH</td> td>$ADDED_BY</td> |
#7
|
|||
|
|||
On the example above the variables you would be using if parsing a template inside the while loop, would look like '$row[column]'
|
#8
|
|||
|
|||
And the line:
PHP Code:
PHP Code:
Have a look at how other (standard vB) scripts are handling retrieving data. |
#9
|
|||
|
|||
Thanks Once again-
Maybe better if I just just hire someone to redo it. (take me 6 weeks just to figure out your permission systems much less the template engine) Once they get it done, I'll have a better grasp on VB / and the template parse due to I know how the mod works and what it does etc.. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|