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)

Hooper 12-11-2001 12:53 AM

I'm trying to determine why I have no problems with the registration? What exactly is fluppered with the registration? Can you even get to the main registration screen? I'm not encountering such problems and am curios myself.

Also for Bira,

I had no problems with the first integration between scripts but the second has me a bit confused. I'm not sure I understand if the whole code red and blue need to be applied to a template or what have you. I appreciate the detail you went into on how your hack works I do, but I just don't understand the reference you made to the second integration.

SirSteve 12-11-2001 04:22 AM

Very interesting hack but it looks like A LOT of work to do (I too have a lot of hacks already installed)...

bira 12-11-2001 09:51 AM

[QUOTE]Originally posted by Hooper
I'm trying to determine why I have no problems with the registration? What exactly is fluppered with the registration? Can you even get to the main registration screen? I'm not encountering such problems and am curios myself.

mp3playa 12-11-2001 07:04 PM

Great Hack Bria. I have a question though, is it possible to not have attachments load that are in posts that are shrunk ? This would decrease bandwidth a lot I think. Thanks for the thoughts :)

Admin 12-13-2001 06:58 AM

Ok I installed this here due to popular demand. :D

Works very fine as far as I can see.
I had to play with the postbit template a bit though, since ours is difference. :)

Good one bira.

James Cridland 12-13-2001 08:06 AM

What would be nicer is a quick reminder of the message...

So, the real message is...

I think that Firefly has too much time on his hands because he seems to install every hack going

...and the shrunk message is...

I think Firefly has t...

This would make this hack quite cool, I think. Shouldn't be too difficult to do...

Admin 12-13-2001 08:13 AM

[QUOTE]Originally posted by James Cridland
I think that Firefly has too much time on his hands because he seems to install every hack going

Frank 12-13-2001 09:58 AM

Okay I still have an error in register.php, and I downloaded the zip yesterday and applied the patch for this:

Database error in vBulletin 2.2.1:

Invalid SQL: INSERT INTO userfield (userid,field1,field2,field3,field4) VALUES (,'','','','') mysql error: You have an error in your SQL syntax near ''','','','')' at line 1

mysql error number: 1064

Date: Thursday 13th of December 2001 04:56:52 AM
Script: http://www.frankw.net/network/nthell...b/register.php
Referer: http://www.frankw.net/network/nthell...b/register.php

-----
Database error in vBulletin 2.2.1:

Invalid SQL: INSERT INTO userfield (userid,field1,field2,field3,field4) VALUES (,'nice','warks','singing','singer')
mysql error: You have an error in your SQL syntax near ''nice','warks','singing','singer')' at line 1

mysql error number: 1064

Date: Thursday 13th of December 2001 09:24:17 AM
Script: http://www.frankw.net/network/nthell...b/register.php
Referer: http://www.frankw.net/network/nthell...b/register.php
----

etc etc

Frank 12-13-2001 01:45 PM

Okay a new user registers, fills in the reg form and then clicks submit. They get the screen:
---
There seems to have been a slight problem with the nthellworld User Forum database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.
---

The new username is shown on the front page of the forum as the most recently registered. Clicking on the link shows a profile of the user, and it is possible to request the password and receive it.

However, the user DOES NOT SHOW UP in the control panel, either by clicking show most recent registrations or searching for the username.

I am baffled, and I've had to disable registrations for the time being :(

Help please!

Admin 12-13-2001 02:02 PM

[QUOTE]Originally posted by James Cridland
What would be nicer is a quick reminder of the message...

LuBi 12-13-2001 03:19 PM

Great hack, thanks!

Frank 12-13-2001 03:57 PM

[QUOTE]Originally posted by LuBi
Great hack, thanks!

LuBi 12-13-2001 04:00 PM

[QUOTE]Originally posted by Frank

Yeah fantastic hack, except I have had to disable registrations

Frank 12-13-2001 06:19 PM

Read further up the page, post 48 and 49

LuBi 12-13-2001 06:25 PM

Wow, well mine worked.. sorry guys.

bira 12-13-2001 06:40 PM

Frank,

You have an error in your SQL INSERT query syntax. But that query isn't altered in this hack, so I don't know what you did wrong.

If you like, you can e-mail me register.php to goren@atlasf1.com and I'll have a look.

Cheers,

Bira

bira 12-13-2001 07:28 PM

Frank,

I looked at your register.php file. You have an extra dot (period) on line 444:

Code:

'".addslashes(htmlspecialchars($email))."',".$newstyleval."'".[high].[/high]addslashes(htmlspecialchars($parentemail))."','$coppauser'
REMOVE the highlighted dot :)

rawnet 12-13-2001 07:31 PM

Hello Bira,

This hack is simply amazing - I saw it first on Atlas F1 forums. It's a great idea, but I've had problems installing it on my site. I'm sure I must have made a wrong step somewhere as everybody else is okay, but as I didn't test it until it was installed I'm not sure where the error is.

It's basically showing the title of the post as a row - eg. http://www.servicepals.com/forums/sh...=&threadid=181 (please ignore the content - long story!!)

I was just wondering if anyone could see where the problem is as, frankly, I haven't got a bloody clue. Would be really grateful for any help on the matter!!

All the best,

Ross

bira 12-13-2001 07:41 PM

Hi Ross,

I looked at the source code of that link you gave us. You simply don't have the display set (show/hide).

Looks to me like you skipped the part of editing admin/functions.php (or maybe forgot to upload it, or maybe uploaded it to the wrong dir?).

Open admin/functions.php and Find:

Code:

        if ($post[dateline]>$bbuserinfo[lastvisit]) {
                $post[foldericon]="<img src=\"{imagesfolder}/posticonnew.gif\" border=\"0\" alt=\"New Post\">";
        } else {
                $post[foldericon]="<img src=\"{imagesfolder}/posticon.gif\" border=\"0\" alt=\"Old Post\">";
        }

REPLACE that with:

PHP Code:

// Contract Old Posts in Thread (v1.0)
    
global $display$HTTP_USER_AGENT;

    if (
$post[dateline]>$bbuserinfo[lastvisit]) {
        
$post[foldericon]="<img src=\"{imagesfolder}/posticonnew.gif\" border=\"0\" alt=\"New Post\">";
        if (!
$display) {
            
$pe "show";
            
$ph "none";
        }
    } else {
        
$post[foldericon]="<img src=\"{imagesfolder}/posticon.gif\" border=\"0\" alt=\"Old Post\">";
        if (!
$display) {
            if (
$bbuserinfo[hideposts]=="1") {
                
$pe "none";
                
$ph "show";
            } else {
                
$pe "show";
                
$ph "none";
            }    
        }
    }
    
    if (
$display=="none") {
        
$pe "none";
        
$ph "show";
    } elseif (
$display=="show") {
        
$pe "show";
        
$ph "none";
    }
    
    if (
strstr($HTTP_USER_AGENT,"MSIE")) {
        eval(
"\$plusimg = \"".gettemplate("postbit_plusimg")."\";");
        eval(
"\$minusimg = \"".gettemplate("postbit_minusimg")."\";"); 
    } else {
        
$plusimg "";
        
$minusimg "";
    }
// Contract Old Posts in Thread (v1.0) 

Let us know if it worked out.

Cheers,

Bira

rawnet 12-13-2001 07:54 PM

Bira, that is truly fantastic!

Thankyou!!

Is all working okay now - don't know how that happened - must be getting sloppy in my old age.

Is there any way to implement a Collapse All / Expand All link at the top of the threads page as well? I'm probably being guilty, but it might be good.

Cheers for now,

Ross

bira 12-13-2001 08:02 PM

Ross I'm not sure I understand your question.

There is "Expland All | Contract All" links at the top of every thread.

If you mean putting a similar link on the forumdisplay page - where the list of all threads in a forum - then I don't really see the point for it: that's what you have the option to select the default action in your user's profile Edit Options page.

Frank 12-13-2001 08:11 PM

Still doesn't work Bira, I looked for that error and simply don't have it.

Line 444 is:

// Contract Old Posts in Thread (v1.0)
$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield." parentemail,coppauser,homepage ,icq,aim,yahoo,signature,adminemail,showemail,invi sible,usertitle,joindate,cooki euser,daysprune,lastvisit,lastactivity,usergroupid ,timezoneoffset,emailnotificat ion,receivepm,emailonpm,options,birthday,maxposts, startofweek,ipaddress,pmpopup, referrerid,nosessionhash,avatarid,hideposts) VALUES (NULL,'".addslashes(htmlspecialchars($username))." ','".addslashes(md5($password) )."','".addslashes(htmlspecialchars($email))."',". $newstyleval."'".addslashes(ht mlspecialchars($parentemail))."','$coppauser','".a ddslashes(htmlspecialchars($ho mepage))."','".addslashes(htmlspecialchars($icq)). "','".addslashes(htmlspecialch ars($aim))."','".addslashes(htmlspecialchars($yaho o))."','".addslashes($signatur e)."','$adminemail','$showemail','$invisible','".a ddslashes($usertitle)."','".ti me()."','$cookieuser','".addslashes($prunedays)."' ,'".time()."','".time()."','$n ewusergroupid','".addslashes($timezoneoffset)."',' $emailnotification','$receivep m','$emailonpm','$options','".addslashes($birthday )."','".addslashes($umaxposts) ."','".addslashes($startofweek)."','".addslashes($ ipaddress)."','$pmpopup','".ad dslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid','$hideposts')" );
// Contract Old Posts in Thread (v1.0)

bira 12-13-2001 08:21 PM

Frank, there was an extra dot in the file you sent me :)

Anyhow, I looked at it again and I think I see the problem (maybe).

You seem to have deleted an extra line too much.

Right under the line you pasted, should appear:

Code:

  $userid=$DB_site->insert_id();
But in your file it's missing.

That would explain the error you pasted in the earlier posts - there was simply a missing userid!

So paste this line back, right under the "insert", and you should be fine.

Frank 12-13-2001 09:42 PM

Thank you kindly Bira, that has fixed the problem completely :D :D

nafae 12-14-2001 12:01 AM

Hey bira, nice hack. It all works except for the fact that when i shrink the posts, they shrink about 5% larger than my forum size. any ideas? :confused:

nafae 12-14-2001 12:11 AM

eep and i get a parse error when i click the register button. Do you have a .txt file with the updates so I can go back and make sure i installed it right? or do I have to go through the entire table creation etc process again..?

fineclicks 12-14-2001 01:51 AM

Anyone know why I would get a blank white page when trying to run the install_contractposts.php file?

rawnet 12-14-2001 06:29 AM

Hi Bira,

Unless I'm being a total blind muppet, I can't see any Expand / Contract links on my forums. Eg. http://www.servicepals.com/forums/sh...=&threadid=190

Can you give me any pointers where I should put this link in my templates?

Ross

bira 12-14-2001 11:06 AM

Ross, I looked at your forums. I found at least two changes you didn't make. Coupled with the previous question you asked, I can only conclude that you rushed through installing this hack, skipped several steps, and are now wondering why some stuff isn't working.

That's really not the way to go, and it is completely unfair to myself as well. I cann't install hacks for you. I cannot make sure you do it right. I can only offer very detailed and accurate instructions.

So either you follow them fully or you don't - that's up to you. But I won't be giving support to a half-baked hack installation.

Please go over the installation again, step by step.

bira 12-14-2001 11:07 AM

[QUOTE]Originally posted by fineclicks
Anyone know why I would get a blank white page when trying to run the install_contractposts.php file?

bira 12-14-2001 11:12 AM

nafae,

It's a design issue. You need to design both parts in bostbit (the first div and the second div) to be the same width.

As for the register.php error - I just visited your site and had no problems

rawnet 12-14-2001 12:08 PM

Bloody hell!!

Haven't been spoken to like that since my undergraduate days!!

:(

Fair enough though - you have been fantastic, and your support is great. Wouldn't blame you in any way - I'm grateful for the effort you've put in - I suspect the errors are due to problems I had uploading the changes whereby old files overwrote the changed files. Your instructions are very clear - although a few jokes and doctored images of Ralf Schumacher's girlfriend wouldn't go amiss.

Will go over the scripts again now,

Cheers,

Ross

fineclicks 12-14-2001 02:00 PM

[QUOTE]Originally posted by bira


I'm guessing you're not running it in your forum's /admin/ dir.

Bedhead 12-14-2001 03:11 PM

Once again a great hack!

Thanks Bira!

nafae 12-14-2001 06:09 PM

I removed it after I found it didnt work, I didnt want people to see my bad hack install :) I will try again tonight.

Bedhead 12-14-2001 08:23 PM

Hello,

First off I would like to say Bira you are the man.

Everything works great except for the member.php3.
I'm assuming that this is the problem.
I get the following error message when trying to use the member.php for logging out, usercp, or anything for that matter.
I have ran through all instructions numerous times and still a no go.

Here is the error:

Parse error: parse error in D:\Inetpub\users\dssheadquarters\forum\member.php3 on line 752

Any ideas Buddy?

bira 12-14-2001 08:27 PM

Bedhead, send me your member.php3 file, to goren@atlasf1.com so I can have a look at it

Bedhead 12-14-2001 08:32 PM

Thanks for taking the time.

You have mail.

nafae 12-14-2001 08:45 PM

bira a fresh install got it working just fine. Thanks for the hack, it is vewwy useful :D

bira 12-14-2001 09:36 PM

Bedhead,

1) You had an error in one location of pasting the code. The instructions said find

PHP Code:

    $newemailaddress=0;
  } 

And AFTER THAT paste a code. Instead, you pasted the code BEFORE the }

2) On three different locations, you have pasted the hack code on the same line as an existing code, which meant you were in effect COMMENTING OUT the existing code. Example:

your code:

Code:

  // Contract Old Posts in Thread (v1.0)
  if ($bbuserinfo[hideposts]) {
    $hidepostschecked="checked";
    $hidepostsnotchecked="";
  } else {
    $hidepostschecked="";
    $hidepostsnotchecked="checked";
  }
// Contract Old Posts in Thread (v1.0)if ($bbuserinfo[receivepm]) {
    $receivepmchecked="checked";
    $receivepmnotchecked="";
  } else {
    $receivepmchecked="";
    $receivepmnotchecked="checked";
  }

SHOULD BE:

Code:

  // Contract Old Posts in Thread (v1.0)
  if ($bbuserinfo[hideposts]) {
    $hidepostschecked="checked";
    $hidepostsnotchecked="";
  } else {
    $hidepostschecked="";
    $hidepostsnotchecked="checked";
  }
// Contract Old Posts in Thread (v1.0)

if ($bbuserinfo[receivepm]) {

    $receivepmchecked="checked";
    $receivepmnotchecked="";
  } else {
    $receivepmchecked="";
    $receivepmnotchecked="checked";
  }

I have edited your file and corrected your mistakes and will now e-mail it back to you.

However, I cannot stress enough to you and others - please follow installation instructions accurately or your scripts may be rendered useless.

Cheers,

Bira


All times are GMT. The time now is 08:25 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.01674 seconds
  • Memory Usage 1,847KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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