Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2011, 08:45 AM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Retrive The Field Info

Hello I Need To Show The Highest Top Members In Reputation In Header

Or The Highest Member In Reputation In Header

--------------- Added [DATE]1296733658[/DATE] at [TIME]1296733658[/TIME] ---------------

Edit

Lets Say This is Show The Reputation Of You

{vb:raw bbuserinfo.field5}

Whats The Code To Show Highest User In This Field ?

--------------- Added [DATE]1296761452[/DATE] at [TIME]1296761452[/TIME] ---------------

Edit 2

SELECT COUNT( * ) AS `Rows` , `field5`
FROM `userfield`
GROUP BY `field5`
ORDER BY `field5`
LIMIT 0 , 30

I Found The Table That I Was Searching For.

Is There Anyone Who Can Help Me To Show It Up In Forums Templates
Reply With Quote
  #2  
Old 02-04-2011, 07:53 PM
al3bed's Avatar
al3bed al3bed is offline
 
Join Date: Sep 2006
Location: Bahrain
Posts: 190
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to use plugin for your code, save result in variable, then insert it in a template
Reply With Quote
  #3  
Old 02-05-2011, 07:34 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by al3bed View Post
you need to use plugin for your code, save result in variable, then insert it in a template
Welcome Ya Man Sa3eed El3twee Told Me That

Can You Do That Coz I Tried And Faild Really
Reply With Quote
  #4  
Old 02-23-2011, 04:28 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you trying to show the person with the highest reputation, or the person with the highest number in field5? userfield.field5 is not the reputation, unless you have set it up to be that way?
Reply With Quote
  #5  
Old 02-23-2011, 08:15 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Are you trying to show the person with the highest reputation, or the person with the highest number in field5? userfield.field5 is not the reputation, unless you have set it up to be that way?
Look On This Mod In Attachment

It Show Highest Reputation

I Tried To Edit It To Make Get The Highest Number In Field 8

The Original Code

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY reputation DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['reputation']."), ";
}
My Edit

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
Thats What I Need

The Highest Number In X Field
Reply With Quote
  #6  
Old 02-23-2011, 08:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And what is the result of your edit? Isn't it working? What is the output - can we see it?
Reply With Quote
  #7  
Old 02-23-2011, 08:27 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(nothing), (nothing), (nothing)

But When I Make It Like That

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['posts']."), ";
}
The Posts Appears Instead Of Reputation And Everything Going Fine

Now Why It Cant Import Data From The userfield Table

Is There's Somethign Wrong In This Code ?

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
Reply With Quote
  #8  
Old 02-23-2011, 09:18 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 3amalah View Post
(nothing), (nothing), (nothing)

But When I Make It Like That

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['posts']."), ";
}
The Posts Appears Instead Of Reputation And Everything Going Fine

Now Why It Cant Import Data From The userfield Table

Is There's Somethign Wrong In This Code ?

Code:
$getrepx = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "userfield ORDER BY field8 DESC LIMIT 0, $adet");
while ($getrep = $db->fetch_array($getrepx))
{ 
$sonuclaryaz .= "<a href=\"member.php?u=".$getrep['userid']."\">".$getrep['username']."</a> (".$getrep['field8']."), ";
}
Take a not taht you have to join user table to get username.
Also LIMIT 0 is not necessary.
And what is $adet?
Reply With Quote
  #9  
Old 02-23-2011, 10:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What Adrian said about $adet - what is it? And, userfield only has userinformation, not username, so that isn't going to spit out (you need to JOIN with the user table). But, you should have gotten something to spit out. You didn't even get the "(" and ")" to spit out? If not, then you aren't outputting it correctly. What are you doing to output the variable $sonuclaryaz? We really do need to see the whole thing or else we can't tell where you are going wrong.
Reply With Quote
  #10  
Old 02-23-2011, 10:45 PM
3amalah 3amalah is offline
 
Join Date: Nov 2010
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats A Product From vBulletin Iam Not The Programmer I Put It As Example Coz Its Show What I Need Exactly

Can You Give Me The Right PHP Code To Get Userfied Information Or Can U Do A Plugin Doing This I Think You Are Understood My Needs Now

I Need To Retrieve The Userfield Information From Userfield Table From X Field

And Show It In Forumhome

If You Can't Just Give Me The Way On How To Start

A Small Plugin Like The One I Posted Show Highest Member In X Field

And I Appreciate Your help Really

--------------- Added [DATE]1298508413[/DATE] at [TIME]1298508413[/TIME] ---------------

Quote:
Originally Posted by ForumsMods View Post
Take a not taht you have to join user table to get username.
Also LIMIT 0 is not necessary.
And what is $adet?
See My Post Here Plz Sir Adrian

https://vborg.vbsupport.ru/showpost....7&postcount=10

Can You Edit This Product For Me To Satisfy My Need And Make It Show The Highest Members In Field X Instead Of Reputation

--------------- Added [DATE]1298509744[/DATE] at [TIME]1298509744[/TIME] ---------------

Iam Going To Sleep Now I Ask You Plz To Subscribe To Thread Plz So I Can Reach You

And Thanks SO Much For Your Help You Are Gentlemen
Reply With Quote
Reply


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


All times are GMT. The time now is 08:48 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.04614 seconds
  • Memory Usage 2,262KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete