Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 12-16-2000 Last Update: Never Installs: 0
 
No support by the author.

We are working on trying to use the include for top 25 posters on our index.php page...and we keep getting an error. We managed to put the latest 12 posts on the index.php page but adding the top posters isn't working.

COuld someone post the perfect :lol: script here with simple instructions for me to follow?

I would sure appreciate it!

Thanks!
Kathy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-17-2000, 11:14 AM
Guest
 
Posts: n/a
Default

Okay....let's say that I Operate fwf.com and have a database called fwfdb and the username is fwfname and the password is fwfpass . My file looks like this:

<?php

mysql_connect($fwf.com, $fwfname, $fwfpass);
mysql_select_db($fwfdb);

$action = mysql_query("SELECT userid, username from user ORDER BY posts DESC LIMIT 1,25") or die("Error: ".mysql_error());

while(list($userid, $username) = mysql_fetch_row($action)){
echo "<a href=\"http://friendswithoutfaces.com/forums/member.php?action=getinfo&userid=$userid\">$userna me</a><br>";
}
?>
Reply With Quote
  #13  
Old 12-17-2000, 02:01 PM
Guest
 
Posts: n/a
Default

Nonono, they should be like this:

mysql_connect(fwf.com, fwfname, fwfpass);
mysql_select_db(fwfdb);

$ denotes a variable.
Reply With Quote
  #14  
Old 12-17-2000, 02:14 PM
Guest
 
Posts: n/a
Default

lol, yeah, don't make variables out of everything

if you don't want to get your head in a knot just add:

$my_user = "fwfname";
$my_pass = "fwfpass";
$dbase = "fwfdb";

above

my_host, $my_user, $my_pass);
mysql_select_db($dbase);
Reply With Quote
  #15  
Old 12-17-2000, 04:08 PM
Guest
 
Posts: n/a
Default

I have been trying to get this one for along time and have been very unsuccesful

If I use this

<?php
// Set this to the max number top posters to display
$num = 25;
$db=mysql_connect(tuffsports.com, username, password);
mysql_select_db(database);
$query = "SELECT * FROM user ORDER BY posts DESC LIMIT $num";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> °
<A HREF=\"http://tuffsports.com/forum/member.php3?action=getinfo&userid=$latest_array[userid]\">$latest_array[username]</A> ($latest_array[posts])</FONT><BR>";
}

?>

I am getting a parse error with line four
Reply With Quote
  #16  
Old 12-17-2000, 07:29 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Zecherieh
I have been trying to get this one for along time and have been very unsuccesful

If I use this


<?php
// Set this to the max number top posters to display
$num = 25;
$db=mysql_connect(tuffsports.com, username, password);
mysql_select_db(database);
$query = "SELECT * FROM user ORDER BY posts DESC LIMIT $num";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ?
<A HREF=\"http://tuffsports.com/forum/member.php3?action=getinfo&userid=$latest_array[userid]\">$latest_array[username]</A> ($latest_array[posts])</FONT><BR>";
}

?>

I am getting a parse error with line four
Try using quotes, ie:
Code:
$db=mysql_connect("tuffsports.com", "username", "password");
Hope that helps
Reply With Quote
  #17  
Old 12-17-2000, 08:18 PM
Guest
 
Posts: n/a
Default

Thanks Guys for your patience! It's working like a charm now!
Reply With Quote
  #18  
Old 12-18-2000, 09:55 AM
Guest
 
Posts: n/a
Default

which of the 5 versions are you using?
Reply With Quote
  #19  
Old 12-18-2000, 12:07 PM
Guest
 
Posts: n/a
Default

ROFL.....errrrrr....I think it may be a new version which is a conglomerate of all of them. <G>

<?php

mysql_connect(mydomain.com, myusername, mypassword);
mysql_select_db(mydatabasename);

$action = mysql_query("SELECT userid, username from user ORDER BY posts DESC LIMIT 1,25") or die("Error: ".mysql_error());

while(list($userid, $username) = mysql_fetch_row($action)){
echo "<a href=\"http://mydomain.com/forums/member.php?action=getinfo&userid=$userid\">$userna me</a><br>";
}
?>
Reply With Quote
  #20  
Old 12-18-2000, 12:36 PM
Guest
 
Posts: n/a
Default

good choise

it seems to be the least 'cluttered'
Reply With Quote
  #21  
Old 12-18-2000, 03:04 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Susan
ROFL.....errrrrr....I think it may be a new version which is a conglomerate of all of them. <G>

<?php

mysql_connect(mydomain.com, myusername, mypassword);
mysql_select_db(mydatabasename);

$action = mysql_query("SELECT userid, username from user ORDER BY posts DESC LIMIT 1,25") or die("Error: ".mysql_error());

while(list($userid, $username) = mysql_fetch_row($action)){
echo "<a href=\"http://mydomain.com/forums/member.php?action=getinfo&userid=$userid\">$userna me</a><br>";
}
?>


One small change

user ORDER BY posts DESC LIMIT 0,24")

with 1,25 it was starting with the number two poster, 0 brought it to the number one poster
Reply With Quote
Reply

Thread Tools

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 10:08 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.04583 seconds
  • Memory Usage 2,271KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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
  • 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