The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
I was wondering how I could use a vb template called quotereply_quotes instead of an external .txt file for the following code:
Code:
$quotefilepath = "quotes.txt";
function randomline($filename) {
$file = file($filename);
srand((double)microtime()*1000000);
while ($randomquote == "") {
$randomquote = ereg_replace("\n","",$file[rand(0,count($file))]);
}
return $randomquote;
}
$quote = randomline("$quotefilepath");
Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
you can't put codes in a template. all php codes have to go in php files.
|
|
#3
|
|||
|
|||
|
I know that, that's not what I'm asking, the code goes in newreply.php.
My question is how do I get my data from a template instead of an external ascii file (.txt file)? |
|
#4
|
|||
|
|||
|
PHP Code:
|
![]() |
|
|