vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Shrink Old Posts in Thread (https://vborg.vbsupport.ru/showthread.php?t=33060)

bira 12-10-2001 12:21 PM

[QUOTE]Originally posted by Baratator
greaaaaaaaaaaaaaaaaaaaaaat hack !!!!

jsut one thing... can you make it not srhink the fist post ?

I mean generally there is one post and a lot of replys and when you wiew it all the read replys are skunk but the riginal post too... the first one if you see what i mean...

thx this is a really useful hack !!

YoMama 12-10-2001 04:53 PM

Erm...

After installing this hack noone is able to register anymore. According to the vBulletin Database error email sent to me, the problem exists in register.php.

The email sez:
Code:

Database error in vBulletin 2.2.1:

Invalid SQL: INSERT INTO user (userid,username,password,email,styleid,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid) VALUES (NULL,'Spankmaster C','9b1dd17445f20c234b44bccb0c611848','someemail@somedomain.com','1','','0','http://','','','','','1','0','0','Junior Member','1008002875','1','-1','1008002875','1008002875','3','+1','1','1','0','15','0000--','-1','2','213.84.221.150','1','0','1','0','0')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Monday 10th of December 2001 05:47:55 PM
Script: http://games.xs4all.nl/forums/forums/register.php
Referer: http://games.xs4all.nl/forums/register.php

I've added my register.php (zipped). I hope someone knows a quick fix for this, otherwise i'm... wel... in trouble ;-)

Regards,

Ronald

bira 12-10-2001 04:57 PM

hi Yomama,

Please don't post entire scripts.

I will post the correction for you, but I must know - what vBulletin version are you using?

Thanks.

bira 12-10-2001 05:03 PM

OK, open your register.php and go to line 444

Replace it with:

Code:

  $DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid,[high]hideposts[/high]) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm','$options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid','$hideposts')");
(I highlighted the bit that is missing).

Cheers,

Bira

YoMama 12-10-2001 05:21 PM

Bira,

Sorry for posting the entire script. I'm kind of a PHP newbie, and was unaware of forum rules.

Thanks a million for solving my problem... and thanks for the brilliant hack!

Regards,

Ronald

bira 12-10-2001 05:24 PM

YoMama, the problem was mine, not yours - it was a mistake in my installer :)

Anyways, glad it works for you and that you like it :)

Baratator 12-10-2001 06:44 PM

I've got te same problem with the new registrations...

and i added what you told me to add
but it always contract the fisrt post :(

bira 12-10-2001 06:59 PM

baratator,

Try adding, in admin/functions.php, the highlighted bit below:

Code:

// Contract Old Posts in Thread (v1.0)
        global $display, [high]$post[countpost],[/high] $HTTP_USER_AGENT;

        if ($post[dateline]>$bbuserinfo[lastvisit] and $post[countpost]=="0") {

See if this works. (cos it might be that $post[countpost] needs to be declared as global first).

Princeton 12-10-2001 07:27 PM

[QUOTE]Originally posted by bira
baratator,

Try adding, in admin/functions.php, the highlighted bit below:

Code:

// Contract Old Posts in Thread (v1.0)
        global $display, [high]$post[countpost],[/high] $HTTP_USER_AGENT;

        if ($post[dateline]>$bbuserinfo[lastvisit] and $post[countpost]=="0") {

See if this works. (cos it might be that $post[countpost] needs to be declared as global first).

Baratator 12-10-2001 09:03 PM

same problem, same error message
juste on coma :p


All times are GMT. The time now is 08:30 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.01327 seconds
  • Memory Usage 1,743KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete