View Full Version : Post view template/ avatar area ???
Murtific
07-26-2011, 02:17 AM
Where is the template that shows you the posts in a thread... I want to add a bit of line near the avatar.. I've searched all over for the right template, but cant find =[... is it php coded like the newpost.php and showthread.php????
HMBeaty
07-26-2011, 02:19 AM
postbit / postbit_legacy
Murtific
07-26-2011, 03:12 AM
Made a plugin that uses parse_templates hook and pulls database data. I pointed a preregister to postbit_legacy template variable. and in the postbit / postbit_legacy template i made a var called {vb:raw corp} just for anybody that doesn't know how.
//$connection is in another file to connect to the db...
if(!$connection) {
die("Database connection failed plugin:: connection: " . mysql_error());
}
$db_pluginselect2 = mysql_select_db("yoFrigginDB", $connection);
if (!$db_pluginselect) {
die("Database selection failed to pluginselect2: " . mysql_error());
}
$usernamefield1 = $vbulletin->userinfo['username'];
$corpname= mysql_query("SELECT * FROM members WHERE username = '$usernamefield1' ", $connection);
if (!$corpname)
{
die("Database selection plugin failedquery:corp: " . mysql_error());
}
while ($row = mysql_fetch_array($corpname))
{
$corp = $row["corporation"];
}
if(!$connection) {
die("Database connection failed plugin:: connection: " . mysql_error());
}
$db_pluginselect2 = mysql_select_db("YoFrigginDB", $connection);
if (!$db_pluginselect) {
die("Database selection failed to pluginselect2: " . mysql_error());
}
$usernamefield1 = $vbulletin->userinfo['username'];
$corpname= mysql_query("SELECT * FROM members WHERE username = '$usernamefield1' ", $connection);
if (!$corpname)
{
die("Database selection plugin failedquery:corp: " . mysql_error());
}
while ($row = mysql_fetch_array($corpname))
{
$corp = $row["corporation"];
}
$templater = vB_Template::create('postbit_legacy');
vB_Template::preRegister('postbit_legacy',array('c orp' => $corp));
If anybody can improve upon this please do.....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.