Witam,
Na przykladzie tego forum, na stronie glownej po prawej jest menu, tam np facebook, najnowsze tematy itp, czy jest mozliwe, aby wstawic tam swoj wlasny kod PHP, ktory np odwoluje sie do serwera zewnetrznego, ktory sprawdz aktualny stan serwera Lineage2 i pokazuje ilosc graczy online (tak L2 prowadze serwer)?
Mam wgrany np E32 Custom Side bar blocks z IPS, jest tam mozliwosc
Enabled PHP mode?
If enabled, and above Raw Mode is disabled, entire block contents needs to be in PHP. You need to return the html to be displayed, and do not use echo, print, etc. And do not use open/closing php tags.
All standard IPB objects are available (registry, DB, memberData, cache, settings, request, etc).
Biore to na TAK,
i dalej wprowadzam w Enter Content to Display Below
HTML and BBCODE are OK!
Kod PHP np:
<?
$result = @file_get_contents("http://adres_parsera_servera gry", 1);
if ( (bool)$result ) file_put_contents('parser.game.cache', $result);
else $result = file_get_contents('parser.game.cache');
$parser = explode(" ", $result);
echo $parser[1];
?>
I daje OK, to dodaje mi kolume w menu ale czysto, bez kodu wysietlanego, dlaczego, czy moze cos innego zainstalowac?
ps. parser to takie cus, sobie zrobilem co przechowuje dane i pobiera co X minut, aby serwera gry nie obciazac..
Parser np dziala w iframe jak dodam na forum a tak nie chce ...