Results 1 to 15 of 44
Page 1 of 3
FirstFirst 1 2 3 ... LastLast

Thread: [RELEASE v2] Top Posters

Threaded View

  1. #1
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647

    Please read!

    To all my loyal "fans" and others:
    I am sorry to withdraw this hack. However there are so many problems with it it's just not worth putting you guys through it. Therefore I am ceasing work on it and will no longer be able to support it.

    To remove the hack, run the following query from phpMyAdmin or Telnet:
    Code:
    DELETE FROM template WHERE title='toppostall' OR title='toppost24' OR title='topposttoday'
    then "un-make" the changes you made to index.php and admin/functions.php. These are:

    Remove from index.php
    Code:
    if ($loadtoppost==1) {
    $today = mktime(0,0,0); $yesterday = $today-86400;
    
    $toptemp = gettemplate('toppost24',0,0);
    $top24 = explode("|||",$toptemp);
    if ($top24[0] != $yesterday and $top24[1] != $today) {
    	gettop24();
    	$top24 = gettemplate('toppost24',0,0);
    	$top24 = explode("|||",$top24);
    }
    $ttopthreadname = $top24[2]; $ttopthreadnum = $top24[3]; $ttoppostname = $top24[4]; $ttoppostnum = $top24[5];
    $tttu = $top24[6]; $ttpu = $top24[7];
    
    gettoptoday();
    $toptoday = gettemplate('topposttoday',0,0);
    $toptoday = explode("|||",$toptoday);
    $tttopthreadname = $toptoday[0]; $tttopthreadnum = $toptoday[1]; $ttttu = $toptoday[2];
    $tttoppostname = $toptoday[3]; $tttoppostnum = $toptoday[4]; $tttpu = $toptoday[5];
    
    $topatemp = gettemplate('toppostall',0,0);
    $topall = explode("|||",$topatemp);
    if ($topall[0] != $today) {
    	gettopall();
    	$topall = gettemplate('toppostall',0,0);
    	$topall = explode("|||",$topall);
    }
    $topthreadname = $topall[1]; $topthreadnum = $topall[2]; $toppostname = $topall[3]; $toppostnum = $topall[4];
    $topthreaddate = date($dateformat,$topall[5]); $toppostdate = date($dateformat,$topall[6]);
    $ttu = $topall[7]; $tpu = $topall[8];
    eval("\$topposterinfo = \"".gettemplate('topposters')."\";");
    }
    Code:
    $templatesused.=",topposters";
    Code:
    $loadtoppost=1;
    From admin/functions.php, change
    Code:
      global $templatecache,$DB_site,$templatesetid,$loadmaxusers,$loadbirthdays,$loadtoppost;
    to
    Code:
      global $templatecache,$DB_site,$templatesetid,$loadmaxusers,$loadbirthdays;
    Then remove
    Code:
    						  ".iif ($loadtoppost,"OR (title = 'toppostall')","")."
    						  ".iif ($loadtoppost,"OR (title = 'toppost24')","")."
    						  ".iif ($loadtoppost,"OR (title = 'topposttoday')","")."
    Code:
    // ###################### Start gettoptoday #######################
    function gettoptoday() {
    	global $DB_site;
    	$today = mktime(0,0,0); $tommorrow = $today+86400;
    	$ttopt = $DB_site->query_first("SELECT userid,COUNT(*) AS threads,username FROM thread,user WHERE dateline>=$today AND dateline<=$tommorrow AND postuserid>0 AND postuserid=userid GROUP BY postusername ORDER BY threads DESC");
    	$ttopp = $DB_site->query_first("SELECT user.username AS uuname,COUNT(*) AS posts,user.userid AS uuid FROM post,user WHERE dateline>=$today AND dateline<=$tommorrow AND post.userid>0 AND user.userid=post.userid GROUP BY post.username ORDER BY posts DESC");
    	$sep = "|||";
    	if ($ttopt[username] == "") {
    		$ttopt[username] = "No one yet";
    		$ttopt[userid] = 0;
    		$ttopt[threads] = 0;
    	}
    	if ($ttopp[uuname] == "") {
    		$ttopp[uuname] = "No one yet";
    		$ttopp[uuid] = 0;
    		$ttopp[posts] = 0;
    	}
    	$template = "$ttopt[username]$sep$ttopt[threads]$sep$ttopt[userid]$sep$ttopp[uuname]$sep$ttopp[posts]$sep$ttopp[uuid]";
    	$DB_site->query("UPDATE template SET template='".addslashes($template)."' WHERE title='topposttoday'");
    }
    
    // ###################### Start gettop24 #######################
    function gettop24() {
    	global $DB_site;
    	$today = mktime(0,0,0); $yesterday = $today-86400;
    	$ttopt = $DB_site->query_first("SELECT username,COUNT(*) AS threads,userid FROM thread,user WHERE dateline<=$today AND dateline>=$yesterday AND postuserid>0 AND postuserid=userid GROUP BY postusername ORDER BY threads DESC");
    	$ttopp = $DB_site->query_first("SELECT user.username AS uuname,COUNT(*) AS posts,user.userid AS uuid FROM post,user WHERE dateline<=$today AND dateline>=$yesterday AND post.userid>0 AND user.userid=post.userid GROUP BY post.username ORDER BY posts DESC");
    	$sep = "|||";
    	$template = "$yesterday$sep$today$sep$ttopt[username]$sep$ttopt[threads]$sep$ttopp[uuname]$sep$ttopp[posts]$sep$ttopt[userid]$sep$ttopp[uuid]";
    	$DB_site->query("UPDATE template SET template='".addslashes($template)."' WHERE title='toppost24'");
    }
    
    // ###################### Start gettopall #######################
    function gettopall() {
    	global $DB_site, $topall;
    	$today = mktime(0,0,0); $yesterday = $today-86400;
    	$topt = $DB_site->query_first("SELECT username,COUNT(*) AS threads,userid FROM thread,user WHERE dateline<=$today AND dateline>=$yesterday AND postuserid>0 AND postuserid=userid GROUP BY postusername ORDER BY threads DESC");
    	$topp = $DB_site->query_first("SELECT user.username AS uuname,COUNT(*) AS posts,user.userid AS uuid FROM post,user WHERE dateline<=$today AND dateline>=$yesterday AND post.userid>0 AND user.userid=post.userid GROUP BY post.username ORDER BY posts DESC");
    	$topalle = explode("|||",$topall);
    	if ($topalle[4] < $topp[posts]) {
    		$toppb = $topp[posts]; $toppa = $topp[uuname];
    		$toppd = $yesterday; $toppc = $topp[uuid];
    	} else {
    		$toppb = $topalle[4]; $toppa = $topalle[3];
    		$toppd = $topalle[6]; $toppc = $topalle[8];
    	}
    	if ($topalle[2] < $topt[threads]) {
    		$toptb = $topt[threads]; $topta = $topt[username];
    		$toptd = $yesterday; $toptc = $topt[userid];
    	} else {
    		$toptb = $topalle[2]; $topta = $topalle[1];
    		$toptd = $topalle[5]; $toptc = $topalle[7];
    	}
    	$sep = "|||";
    	$template = "$today$sep$topta$sep$toptb$sep$toppa$sep$toppb$sep$toptd$sep$toppd$sep$toptc$sep$toppc";
    	$DB_site->query("UPDATE template SET template='".addslashes($template)."' WHERE title='toppostall'");
    }
    Finally, remove the custom template topposters.

    This should remove the hack completely from your vBulletin installation.
    Last edited by tubedogg; Sun 13th May '01 at 11:36pm.
     

  2. #2
    Senior Member BradC is on a distinguished road
    Join Date
    May 2001
    Location
    Indianapolis, IN
    Age
    29
    Posts
    510
    That is great...! thanks

    can't wait to get out of my C++ class and try this out

    is there a way.. to have a Member of the Month or Week hack...? I seen it in UBB.. just curious
     

  3. #3
    Senior Member ztsky is on a distinguished road
    Join Date
    Mar 2001
    Age
    36
    Posts
    151
    Parse error: parse error in ./admin/functions.php on line 49

    Fatal error: Call to undefined function: getuserinfo() in ./admin/sessions.php on line 300

    Warning: Unable to call doshutdown() - function does not exist in ./admin/sessions.php on line 300
     

  4. #4
    New Member AS_Eagle_1 is on a distinguished road
    Join Date
    May 2001
    Location
    Germany
    Posts
    10
    Hello Kevin,
    I'm a fan of your Hacks
    but this one makes some troubles.
    i run the topinstall.php in my browser and come directly to the page where the instructons are. the script doesn't modify my DB.
    when i upload the modified index.php and functions.php i'll get a parse error.
    Code:
    Parse error: parse error in url/board/admin/functions.php on line 49
    
    Fatal error: Call to undefined function: getuserinfo() in url/board/admin/sessions.php on line 300
    can you help me?


    *sorry for my bad english i hope u can understand me*
    Last edited by AS_Eagle_1; Wed 9th May '01 at 6:30pm.
     

  5. #5
    Senior Member Sarge is on a distinguished road
    Join Date
    Oct 2000
    Posts
    282
    will this work on beta 3?
    Thanks
    Chris
     

  6. #6
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    I have hopefully fixed all of the problems listed and then some with v0.5, released in the first post in this thread. I apologize again to this who previously tried to install this.

    If you did previously install this, please start again with fresh copies of index.php and admin/functions.php. Same directions: upload topinstall.php to your admin directory and follow the instructions in it.
     

  7. #7
    Senior Member jojo85 is on a distinguished road
    Join Date
    Jan 2001
    Location
    FRANCE
    Age
    24
    Posts
    916
    Ohhh very nice
    will add it on my site tonight,thx very much guy
    Best Regards,
    Geoffrey 'G3oW0RK' BALDET.
     

  8. #8
    Member Blue2000 is on a distinguished road
    Join Date
    Feb 2001
    Posts
    87
    very nice hack mate


    works well too.
     

  9. #9
    Senior Member jojo85 is on a distinguished road
    Join Date
    Jan 2001
    Location
    FRANCE
    Age
    24
    Posts
    916
    it is possible to add this hack to a non-vbpage ?
    if yes,how?
    Best Regards,
    Geoffrey 'G3oW0RK' BALDET.
     

  10. #10
    Member furious is on a distinguished road
    Join Date
    Apr 2001
    Posts
    30
    i follow all the steps but nothing change on my forum
    what can i do?
    Last edited by furious; Thu 10th May '01 at 9:33pm.
     

  11. #11
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    Nothing changes...do you mean it doesn't appear on your front page? If that's the case, make sure you edited the forumhome template (make sure, if you have multiple template sets, you edited the template set you are using on your site!). Can you be a little more specific?
     

  12. #12
    Member furious is on a distinguished road
    Join Date
    Apr 2001
    Posts
    30
    i follow all the steps, i make all the modifications including the forumhome template but there is nothing new, no top poster
    it doesnt appear
    and i havent multiple template set
     

  13. #13
    Senior Member chrispadfield is on a distinguished road chrispadfield's Avatar
    Join Date
    Aug 2000
    Location
    London, UK
    Age
    28
    Posts
    5,368
    another cool hack cheers.
     

  14. #14
    Member furious is on a distinguished road
    Join Date
    Apr 2001
    Posts
    30
    wow i need some sleep (its 2.46am here)
    i'm sorry its working fine
    i forgot $loadtoppost=1; in index.php, i put twice $loadmaxusers=1; instead

    very nice hack
     

  15. #15
    Senior Member tubedogg has disabled reputation tubedogg's Avatar
    Join Date
    Feb 2001
    Location
    Medina, OH
    Age
    28
    Posts
    13,647
    Chris: Thanks

    Furious: I'm glad you found it...I couldn't figure out for the life of me why it wouldn't show!
     

Page 1 of 3
FirstFirst 1 2 3 ... LastLast

Similar Threads

  1. [RELEASE v2] Top XX Posters
    By tubedogg in forum Releases: Version 2.x
    Replies: 91
    Last Post: Mon 15th Oct '01, 6:49pm
  2. [RELEASE v2] 0-Posters, active posters, inactive posters display hack.
    By DEMOLiTiON in forum Releases: Version 2.x
    Replies: 14
    Last Post: Sun 14th Oct '01, 5:41pm
  3. [RELEASE v2] Top XX Posters
    By Pie'oh'pah in forum Releases: Version 2.x
    Replies: 0
    Last Post: Mon 23rd Jul '01, 8:57pm
  4. Cont.: [RELEASE v2] Top Posters
    By NickyNet in forum Releases: Version 2.x
    Replies: 6
    Last Post: Tue 5th Jun '01, 12:16am

Bookmarks

Posting Permissions

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