Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

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

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

Hi all I'm trying to do the top 5 posters hack like on http://www.extremeforums.com. But have no idea how to do this.

Any help would be greatly apreciated.

JP

Show Your Support

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

Comments
  #12  
Old 09-13-2000, 03:08 PM
Guest
 
Posts: n/a
Default

that just displays the txt. What should it be surrounded with?
Reply With Quote
  #13  
Old 09-13-2000, 03:19 PM
Guest
 
Posts: n/a
Default

I don't think you can put php into the templates.

but you can try

<?php include("top3.php3") ?>
Reply With Quote
  #14  
Old 09-13-2000, 03:22 PM
Guest
 
Posts: n/a
Default

thanks but doe snot work. any idea what to do now?

I would lovethis feature.
JP
Reply With Quote
  #15  
Old 09-13-2000, 03:37 PM
Guest
 
Posts: n/a
Default

I just posted the include command like you wanted. I assumed you knew to put the opening and closing PHP tags there.

rangersfan had it right, but forgot the semicolon I think...c'mon JP, troubleshoot!

<?php include("top5.php3"); ?>

Make sure top5.php3 is in the same directory...if it's not, you'll have to include the relative path.
Reply With Quote
  #16  
Old 09-13-2000, 03:38 PM
Guest
 
Posts: n/a
Default

Well you can open index.php and place this code after require("global.php")

Code:
// Set this to the max number top posters to display 
$num = 5; 
$sql = "SELECT userid,username FROM user ORDER BY posts DESC LIMIT $num"; 
$results = $DB_site->query($sql);
while ($result = $DB_site->fetch_array($results))
{ 
  $top5 .= "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;° 
   <A HREF=\"member.php?action=getinfo&userid=$result[userid]\">$result[username]</A></FONT><BR>"; 
}
OR

put this in a file called top5.php
Code:
<?php
// Set this to the max number top posters to display
$num = 5;
$sql = "SELECT userid,username FROM user ORDER BY posts DESC LIMIT $num";
$results = $DB_site->query($sql);
while ($result = $DB_site->fetch_array($results))
{
  $top5 .= "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;°
   <A HREF=\"member.php?action=getinfo&userid=$result[userid]\">$result[username]</A></FONT><BR>";
}
?>
and then put require("top5.php"); after require("global.php");

then for either way you put $top5 in your forumhome template where you want the results to show up.

[Edited by rangersfan on 09-13-2000 at 12:58 PM]
Reply With Quote
  #17  
Old 09-13-2000, 03:39 PM
Guest
 
Posts: n/a
Default

TWT nah it would work without the semi-colon if there is only one command.
Reply With Quote
  #18  
Old 09-13-2000, 03:50 PM
Guest
 
Posts: n/a
Default

sorry guys, as i'm sure you've guessed my strength is not coding.

rangersfan, the latter did not work.

is it because of the several double quotes?
Reply With Quote
  #19  
Old 09-13-2000, 03:56 PM
Guest
 
Posts: n/a
Default

Try it now, both ways work for me now.
Reply With Quote
  #20  
Old 09-13-2000, 04:01 PM
Guest
 
Posts: n/a
Default

once again thanks, but not working.

1/ I have top.php in the admin folder

[quote]
<?php
require("global.php");
// Set this to the max number top posters to display
$num = 5;
$sql = "SELECT userid,username FROM user ORDER BY posts DESC LIMIT $num";
$results = $DB_site->query($sql);
while ($result = $DB_site->fetch_array($results))
{
$top5 .= "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;°
<A HREF=\"member.php?action=getinfo&userid=$result[userid]\">$result[username]</A></FONT><BR>";
}
?>
[quote]

I also have edited index.php and added $top5 into forumhome template.....help......
JP
Reply With Quote
  #21  
Old 09-13-2000, 04:09 PM
Guest
 
Posts: n/a
Default

Put top5.php in the forums folder, not the admin folder. Remove the require("global.php"); from the top5.php so that it matches what I told you to do.
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 04:30 AM.


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.04949 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
  • (2)bbcode_code
  • (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