vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Retrive The Field Info (https://vborg.vbsupport.ru/showthread.php?t=258270)

3amalah 02-03-2011 08:45 AM

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

al3bed 02-04-2011 07:53 PM

you need to use plugin for your code, save result in variable, then insert it in a template

3amalah 02-05-2011 07:34 PM

Quote:

Originally Posted by al3bed (Post 2158824)
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

Lynne 02-23-2011 04:28 PM

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?

3amalah 02-23-2011 08:15 PM

Quote:

Originally Posted by Lynne (Post 2165865)
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

Lynne 02-23-2011 08:22 PM

And what is the result of your edit? Isn't it working? What is the output - can we see it?

3amalah 02-23-2011 08:27 PM

(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']."), ";
}


ForumsMods 02-23-2011 09:18 PM

Quote:

Originally Posted by 3amalah (Post 2165971)
(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?

Lynne 02-23-2011 10:07 PM

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.

3amalah 02-23-2011 10:45 PM

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 (Post 2165999)
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

Lynne 02-23-2011 11:13 PM

Try a query more like:
PHP Code:

$getrepx $db->query_read("SELECT userfield.field8, user.userid, user.username 
FROM " 
TABLE_PREFIX "userfield 
LEFT JOIN " 
TABLE_PREFIX "user
ON (user.userid = userfield.userid)
ORDER BY userfield.field8 DESC LIMIT 10"
); 

Not knowing how you are putting this into the page though doesn't help us figure out why nothing is displaying. You really need to post the part where you add it to the template - both the php page and what is in the template.

3amalah 02-24-2011 06:23 AM

Quote:

Originally Posted by Lynne (Post 2166038)
Try a query more like:
PHP Code:

$getrepx $db->query_read("SELECT userfield.field8, user.userid, user.username 
FROM " 
TABLE_PREFIX "userfield 
LEFT JOIN " 
TABLE_PREFIX "user
ON (user.userid = userfield.userid)
ORDER BY userfield.field8 DESC LIMIT 10"
); 

Not knowing how you are putting this into the page though doesn't help us figure out why nothing is displaying. You really need to post the part where you add it to the template - both the php page and what is in the template.

Hello Lynne Thanks So Much For Your Answer Look

https://vborg.vbsupport.ru/attachmen...1&d=1298535707

Thats The Product

I Edited It With The Code You Provided Me

All I Need It To Do Is Just Show The Highest Member In Field 8

I Dont Need More Features Or Anything

Or Just Write Me The Php Code And I Will try For It

And Special Thanks For You

Lynne 02-24-2011 02:22 PM

I don't want to know what the original looks like, I am only interested in what you are doing with the code for your site. You need to post about *your* product.

3amalah 02-24-2011 04:14 PM

Quote:

Originally Posted by Lynne (Post 2166291)
I don't want to know what the original looks like, I am only interested in what you are doing with the code for your site. You need to post about *your* product.

Ok Lynne I Made Field Show Every User Level

Everyone Has A Level

I Need The Top Users In Field X That Show Levels In Forumhome

To Become Like That

Lynne : Level 10
3amalah : Level 5
xxx : Level 2

Lynne 02-24-2011 04:54 PM

I understand what you *want*. I want to see all your current code. Please post your plugin, telling us the hook location, and put code tags around it. And post any template, giving us the template name, and put code tags around it. If you insert something into an existing template, tell us what template and give us about 10 lines from it. We cannot help if we cannot see what your code currently looks like.

3amalah 02-24-2011 05:02 PM

Quote:

Originally Posted by Lynne (Post 2166383)
I understand what you *want*. I want to see all your current code. Please post your plugin, telling us the hook location, and put code tags around it. And post any template, giving us the template name, and put code tags around it. If you insert something into an existing template, tell us what template and give us about 10 lines from it. We cannot help if we cannot see what your code currently looks like.

Iam Sorry I Dont Have A Code Right Now I Just Was Installing The Top Rep Product

And I Found It The Same Idea That Iam Searching For

So I posted It But Iam Currently Dont Have A Code

I Just Need To Show This Data In Forumhome Template

The Field Number Is Field 8

Lynne 02-24-2011 06:48 PM

If you aren't writing any code for this, then I would suggest hiring someone to do it. We are trying to help you write it here, but if you aren't actually trying to write it, then we can't help you.

3amalah 02-24-2011 08:02 PM

Quote:

Originally Posted by Lynne (Post 2166430)
If you aren't writing any code for this, then I would suggest hiring someone to do it. We are trying to help you write it here, but if you aren't actually trying to write it, then we can't help you.

Ok Lynne One Last Question

I WIll Do The Same As The Product I Showed You

Could You Provided Me With The Code That Get The Data From Database

From Userfield ---> Field X

And I Will make The Variable And Plugin

And Thanks So Much

Lynne 02-24-2011 09:18 PM

I already provided you with the query to get the data from the database on the last page.

3amalah 02-25-2011 10:58 AM

Quote:

Originally Posted by Lynne (Post 2166489)
I already provided you with the query to get the data from the database on the last page.

Aha I Saw It Now Thank You Lynne I Will Try It Myself With Your Code

And Thanks For Your Help

And Sorry For Wasting Your Time :)

Lynne 02-25-2011 04:39 PM

You aren't wasting my time at all. Please don't feel that you are.

3amalah 02-28-2011 05:24 AM

Thanks Lynne Iam Almost Made The Product I Will Show You After Finish Ok


All times are GMT. The time now is 08:02 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.02031 seconds
  • Memory Usage 1,800KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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