![]() |
My PHP code into vB...
Hi Everyone,
I have a php code that is used for just a regular php file. I want to make it show up vB's forum home. Here's the original code... Code:
<?PHP Code:
$p = parse_ini_file_quotes_safe("http://jabba.dynelabs.com/client/status.php"); Code:
if($p["maintenance-mode"]=="true"){ |
Use forumhome_start.
HTML Code:
<if condition="$p['maintenance-mode']"> To access arrays in templates, you cannot use " (and afaik, ' wont work either) around the array key, it needs to be blank like $array[key]. |
Quote:
The whole string is eval()d in double quotes, so "blah blah $var['key']" will generate a parse error, but "blah blah $var[key]" won't. This doesn't apply to conditions! Alternatively, you could use "blah blah {$var['key']}" |
Thanks for all the help guys, but I'm having some trouble with it...
I get this error when I try to save the template: Quote:
Here is my plugin using forumhome_start Code:
$p = parse_ini_file_quotes_safe("http://jabba.dynelabs.com/client/status.php"); Code:
<if condition="$p['maintenance-mode']"> |
Try replacing <font color=\" with <font color=" (all occurances)
Everything else looks fine to me. |
New version of the template
Code:
Server Status: <if condition="$p['maintenance-mode']"> Here's the full version of the template, if needed. Code:
<script type="text/javascript"> |
All times are GMT. The time now is 02:28 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|