![]() |
Template issues
I'm trying to add this into my template...
<?php echo file_get_contents("http://site.net/site/onlineplayers.php"); ?> there are [..] online</font></p> <br> but.. i get this. https://vborg.vbsupport.ru/external/2014/01/2.png It's not showing the text any way to do this? I'm trying to get the number from that page it works fine if i just add that code into a .php file. |
You can't add php code into a template. You can only run php code from a hook or from a php file.
|
Mind giving me an example?
|
How does that code work? I guess the number of players online is supposed to appear in place of [..], but I've never seen that before.
Anyway, in a plugin you'd do something like: Code:
$players_online = file_get_contents("http://site.net/site/onlineplayers.php"); then in your template you'd use something like: Code:
there are {vb:var players_online} online |
All times are GMT. The time now is 06:13 PM. |
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:
|