View Full Version : The bit of code that updates a title??
GeorgeofCS
10-10-2002, 10:06 PM
Ok I'm having a slight problem, but what else is new :) I'm trying to find the exact line that updates a custom title for a hack I'm making. Can anyone help? It's the only bit that I can't find.
Xenon
10-11-2002, 10:16 AM
well you can find it for example in newreply.php:
// update user stuff
$dotitle="";
if ($bbuserinfo[userid]!=0)
{
if ($bbuserinfo[customtitle]==0 && $foruminfo[countposts])
{
$usergroup=$DB_site->query_first("SELECT usertitle FROM usergroup WHERE usergroupid='$bbuserinfo[usergroupid]'");
if ($usergroup[usertitle]=="") {
$gettitle=$DB_site->query_first("SELECT title FROM usertitle WHERE minposts<=$bbuserinfo[posts]".iif ($foruminfo['countposts'],"+1","")." ORDER BY minposts DESC LIMIT 1");
$usertitle=$gettitle[title];
} else {
$usertitle=$usergroup[usertitle];
}
$dotitle="usertitle='".addslashes($usertitle)."',";
}
$DB_site->query("UPDATE user SET
".iif ($foruminfo[countposts],"posts=posts+1,","")."
$dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");
}
GeorgeofCS
10-11-2002, 07:50 PM
my bad I meant the user title, the one in your profile :)
NTLDR
10-11-2002, 08:33 PM
The code Xenon posted is for the user title ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.