vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Where is $forum[lastposter] called from ? (https://vborg.vbsupport.ru/showthread.php?t=50039)

The Red Devil 03-12-2003 05:53 PM

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

Kars10 03-12-2003 06:26 PM

... root/index.php and forumdisplay.php :)

The Red Devil 03-12-2003 07:02 PM

Thats where I looked too, but when I search there for $forum[lastposter] I cant find it.

Tigga 03-12-2003 07:11 PM

lastposter would be in a query and $forum would be what's used to call that array. ;)

Link14716 03-12-2003 08:17 PM

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.

The Red Devil 03-12-2003 09:27 PM

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


All times are GMT. The time now is 01:45 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01401 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete