vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help!!! (https://vborg.vbsupport.ru/showthread.php?t=35478)

sleepbirdcyp 02-26-2002 09:52 PM

Help!!!
 
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


PHP Code:

// 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

PHP Code:

// 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=$topposter s[userid]\"><b>$topposters[username]</b></a>($topposters[posts])
| Top poster: <a href="member.php?&action=getinfo&userid=$toptstart er[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.


All times are GMT. The time now is 05:24 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.01041 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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