The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Where is $forum[lastposter] called from ?
Ive found out that $forum[lastposter] (template "forumdisplaybit" and "forumhome_lastpostby" ) calls up the username to the person that replied last in that thread. But I cant find out where it get called from.
Can anyone help me and tell what file its called from. So that I find the main code bit for this.? Reason I need it is cause Im adding it so admin/mod etc got theyr "color" everywhere theyr name comes on the forum so people easier can see what position the guy/girl that posted have. Thanks |
#2
|
||||
|
||||
... root/index.php and forumdisplay.php
|
#3
|
|||
|
|||
Thats where I looked too, but when I search there for $forum[lastposter] I cant find it.
|
#4
|
||||
|
||||
lastposter would be in a query and $forum would be what's used to call that array.
|
#5
|
||||
|
||||
Yep, $forum is an array that contains the lastposter field. Do a search for $forum and you'll most likely find the query that calls it up.
|
#6
|
|||
|
|||
hehe yea, I dont know what I was thinking as I didnt look there
Thanks for replying that fast and getting me on the right track again guys. I got one more question: Ive gotten it to work now, but I had to add another query (and ofcause I want as few as possible of those) I had to add this $lastreply=$DB_site->query_first("SELECT usergroupid FROM user WHERE userid=".$thread['lastposterid']); Is it possible to add this into the main "thread" query ? I have already added one in there which get me the usergroupid on the guy that posted the tread. So what Im wondering on is if its possible for me someway to add another usergroupid into there someway ? Here is my "threads" query $threads=$DB_site->query(" SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')." thread.threadid,thread.title,thread.lastpost, forumid,pollid,open,replycount,postusername,postus erid, lastposter,lastposterid,user.usergroupid,thread.da teline,views,thread.iconid,notes,thread.visible,st icky,votetotal,attach FROM thread ".iif($foruminfo[allowicons],'LEFT JOIN icon ON (icon.iconid = thread.iconid)','')." $dotjoin LEFT JOIN user ON (thread.postuserid = user.userid) WHERE $threadids ORDER BY sticky DESC, $sortfield $sqlsortorder Thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|