M4GN3T
08-10-2011, 09:46 PM
Hi guys,
I created a plugin/hook with the following code:
Product: vBulletin
Hook Location: global_start (also tried init_startup)
Subject: XPRank
Execution Order: 5
Plugin PHP code:
$gebruiker_id = 1;
$sql="SELECT `xp` FROM `rank` WHERE `userid` = '".$gebruiker_id."'";
$dataxp=mysql_query($sql)or die(mysql_error());
while($inhoud = mysql_fetch_array($dataxp)) {
$xprank = $inhoud['xp'];
}
In my header template i use the following:
{vb:raw xprank}
Result:
Doesn't work, even not when i create a variable like $phpecho="test echo"; and then use {vbraw: phpecho}. Nothing works. Does anyone has a idea how to fix this?
I created a plugin/hook with the following code:
Product: vBulletin
Hook Location: global_start (also tried init_startup)
Subject: XPRank
Execution Order: 5
Plugin PHP code:
$gebruiker_id = 1;
$sql="SELECT `xp` FROM `rank` WHERE `userid` = '".$gebruiker_id."'";
$dataxp=mysql_query($sql)or die(mysql_error());
while($inhoud = mysql_fetch_array($dataxp)) {
$xprank = $inhoud['xp'];
}
In my header template i use the following:
{vb:raw xprank}
Result:
Doesn't work, even not when i create a variable like $phpecho="test echo"; and then use {vbraw: phpecho}. Nothing works. Does anyone has a idea how to fix this?