Ich wusste jetzt nicht, wie es im Titel dieses Beitrag besser schreiben sollte :)
Also wenn man eine Ankündigung erstellt, staht die ja in jedem Forum ganz oben und da steht ( Erstellt von: ) z.B. Smoker und gleich darunter Admin !
Gibt es eine möglichkeit das der Usertitel auch bei normalen beiträge unter dem Namen steht ?
Aber NUR bei Admin´s und Mod´s ?
Bei User nicht !
bye
Smoker
ja kannst du, und es ist eigentlich ganz einfach, das problem ist, das du eine weitere table joinen must, was nicht unbedingt zu empfehlen ist aus performancegründen (wenn du viel besucher/members online hast)
principiell gehts so:
öffne forumdisplay.php und finde das:
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
lastposter,thread.dateline,views,thread.iconid,notes,thread.visible,sticky,votetotal,attach
FROM thread
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids
ORDER BY sticky DESC, $sortfield $sqlsortorder
");
ersetzte es mit dem da:
SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')."
thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postuserid,
lastposter,thread.dateline,views,thread.iconid,notes,thread.visible,sticky,votetotal,attach,user.use rtitle,user.customtitle,user.usergroupid
FROM thread
LEFT JOIN user ON (user.userid=thread.postuserid)
".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')."
$dotjoin
WHERE $threadids
ORDER BY sticky DESC, $sortfield $sqlsortorder
");
dann füge unter dieser zeile :while ($thread=$DB_site->fetch_array($threads)) { // and $counter++<$perpage) {
einfach noch das ein:
$thread[authortitle]=""
if(in_array($thread[usergroupid], array(5,6,7))) {
if ($thread[customtitle]==2) {
$thread[authortitle]=htmlspecialchars($thread[usertitle]);
} else {
$thread[authortitle]=$thread[usertitle];
}
}
und dann kannst du in den threadbits $thread[authortitle] verwenden :)
Danke, werde das mal testen !
Thxx
Smoker
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.