Results 1 to 2 of 2

Thread: User rank on home page

  1. #1

    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.

  2. #2

    Default

    up

    how I do showing user rank on home page??

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •