vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v3.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-19-2011, 05:11 AM
lddnsk lddnsk is offline
Stoner...
 
Join Date: Mar 2007
Posts: 6
Default User rank on home page

I modifed a news module and now it showing latest post of thread and poster user name, status and more info from "user" table.
But I need fetch ranks from "ranks" table of this user with specified ID.
How make this query and how fetch result?

My current query if needed:
Code:
$getnews = $db->query_read("
	SELECT $ratingsql user.*, userfield.field11 AS gender, usergroup.opentag, usergroup.closetag, thread.threadid, post.title, thread.replycount, thread.lastposter AS postusername, postuserid, thread.lastpost AS postdateline, sticky, thread.attach, thread.lastpostid, thread.lastposter, thread.lastpost, IF(views<=thread.replycount, thread.replycount+1, views) AS views, thread.forumid, post.postid, pagetext
	$vba_news_fields
	FROM " . TABLE_PREFIX . "thread AS thread
	LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.lastpostid)
	LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = post.userid)
	LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (userfield.userid = post.userid)
	LEFT JOIN " . TABLE_PREFIX . "usergroup AS usergroup ON (usergroup.usergroupid = user.displaygroupid)
	$vba_news_join
	WHERE thread.threadid IN(" . implode(',', $newstids) . ")
	" . iif(!$threadsqueried AND $mod_options['portal_news_cutoffdate'], 'AND thread.lastpost > ' . (TIMENOW - ($mod_options['portal_news_cutoffdate'] * 86400))) . "
	" . iif($ignusers, 'AND thread.postuserid NOT IN(' . $ignusers . ')') . "
	" . iif($mod_options['portal_applypermissions'], $forumperms_query) . "
	ORDER BY " . iif($mod_options['portal_news_sticky'], 'sticky DESC, ') . $mod_options['portal_news_orderby'] . " $mod_options[portal_news_direction]
	" . iif($limitapplied, 'LIMIT ' . ($mod_options['portal_news_maxposts'] + $mod_options['portal_news_enablearchive']), $newslimit) . "
");

Last edited by lddnsk; 07-19-2011 at 05:24 AM.
Reply With Quote
  #2  
Old 07-20-2011, 05:09 AM
lddnsk lddnsk is offline
Stoner...
 
Join Date: Mar 2007
Posts: 6
Default

up

how I do showing user rank on home page??
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New user need help with the home page pest_one "How Do I..." Questions 1 04-28-2009 11:26 AM
how make popup page what shows on user going to home page avitor Troubleshooting & Problems 1 11-05-2008 04:22 AM
User Rank Images jlaine Bugs From 2.0 RC2 8 09-20-2007 05:48 PM
Cannot log in from CMPS home page for one user only usertr Troubleshooting & Problems 3 07-11-2007 10:29 AM
User Rank Manager ok, but images not shown properly in threads wacnstac Troubleshooting / "How do I..." Questions 24 01-02-2005 09:22 PM


All times are GMT -4. The time now is 09:04 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.