PDA

View Full Version : Help!!!


sleepbirdcyp
02-26-2002, 09:52 PM
PLZ Help ME
I just install a Hack called Topposter on my forum!

just add those code to my root/index.php
// Top poster
$topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1");

// Top Threads starter
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");

under
// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);

but when i go to my forum it says
Parse error: parse error, expecting `']'' in /home/sleepbir/public_html/forum/vbb/index.php(526) : eval()'d code on line 52

What's problem?
I use my backup files to overwrite my index.php

but still got this problem

HELP!!!!!!!!!!!!!!!

TECK
02-26-2002, 10:40 PM
post the line

sleepbirdcyp
02-26-2002, 10:45 PM
what you mean?

sleepbirdcyp
02-26-2002, 10:50 PM
Here's the hack

edit index.php
find



// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=number_format($countposts['posts']);

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=number_format($countthreads['threads']);



under it add


// Top poster
$topposters=$DB_site->query_first("SELECT username,posts,userid FROM user ORDER BY posts desc LIMIT 1");

// Top Threads starter
$toptstarter=$DB_site->query_first("SELECT COUNT(*) AS count,postuserid,postusername FROM thread GROUP BY postuserid ORDER BY count DESC LIMIT 1");




2.go to forumhome Template
add:
<br>
Top Threads starter : <a href="member.php?&action=getinfo&userid=$topposters[userid]\"><b>$topposters[username]</b></a>($topposters[posts])
| Top poster: <a href="member.php?&action=getinfo&userid=$toptstarter[postuserid]"><b>$toptstarter[postusername]</b></a>($toptstarter[count])
<br>


3. Lesane

TECK
02-26-2002, 11:03 PM
post line 52 only. and what version of VB you use? post a link please.

sleepbirdcyp
02-26-2002, 11:09 PM
OK

My forum http://www.forum.sleepbird.com/forum/vbb/index.php

vB 2. 0. 1

line52 is in index.php??

TECK
02-26-2002, 11:13 PM
sorry. you must ask for someone else. my knowledge is related only to 222. i apologise. maybe you should upgrade to 222. there were several security issues fixed between 2.0.0 and 2.2.0

and yes the error is in index.php, line 52

sleepbirdcyp
02-26-2002, 11:14 PM
Thank you

TECK
02-27-2002, 05:26 AM
i remember seeing somwhere else (other forum) those ON/OFF buttons. where did you get them from? is it a graphic site? let me know.