PDA

View Full Version : Shrink Old Posts in Thread


Pages : [1] 2

bira
12-08-2001, 10:00 PM
Hi all,

This is a brand new addition to my own BB, so I don't even know how my own users will react to it, let alone how you guys would :)

Hack Description:


Posts you have already read in a thread, will show up with their header only (a row that includes the username, post subject and date only). New posts only will appear in full.
This is user selectable via the 'Edit Options' page: each user can decide if he wants this option on or not. (By default all existing and new users will have this turned Off).
A link at the top of the thread offers to "expand all" posts or "contact all" posts.
by clicking on the + sign on a shruk post, it will expand without the page reloading. By clicking on the - sign on an expanded post, it will shrink without the page reloading.
this option is available for your IE users only! Netscape users will see no difference and will not be affected anyway at all by the change

How to install:


Please download the attached zipfile.
Upload plus.gif and minus.gif to your images directory
Upload install_contractposts.php to your admin directory and run that script.

Note: there are quite a few changes to make (primarily additions, not replacements) to the vb scripts and templates. The process should take you several minutes, so I recommend you close your Bulletin Board while installing the hack.

Demo:

You are welcome to visit my Bulletin Board, at http://www.atlasf1.com , to see what the additions look like. To test it in full (ie, the option of old posts being shrunk by default), you will have to register and modify your options after you have received your password.

Cheers,

Bira

bira
12-09-2001, 02:25 AM
here's a screen capture of what it would look like if a user selected to contract old posts:

http://www.atlasf1.com/personal/bira/capture-contractposts.gif

(This is on a clean, default vBulletin style/design. My BB has a slightly different style, which is why I am also including this image above)

Hooper
12-09-2001, 02:27 AM
Wow Bira. Your going to town on these hacks lately. :D

Going to install tonight!

Hooper
12-09-2001, 02:31 AM
All I can say is that it works and looks wonderful on your site.

Thank You. :D

bira
12-09-2001, 02:34 AM
that's cool, thanks :)

FWC
12-09-2001, 02:54 AM
Bira, I registered on your site to see how it worked. Very cool!! :D

bira
12-09-2001, 05:44 AM
ok, if you installed this hack on 2.2.1 there's a small change.

If you haven't installed this hack, or installed it on 2.0.3, ignore this post.

In root/register.php

find this:


// Contract Old Posts in Thread (v1.0)
$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,avata rid,hideposts) 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')");
// Contract Old Posts in Thread (v1.0)


And add to it the code highlighted in the above line.

Sorry about this - I initially tested this on 2.0.3, and having tested it now on 2.2.1 as well - I noticed the ',avatarid' md5()and ".'$avatarid'" are missing from this query :)

Crinos
12-09-2001, 09:06 AM
Hmmm, I'm getting this error when I try to run install_contractposts.php:

Parse error: parse error in /home/username/public_html/forums/admin/install_contractposts.php on line 278

bira
12-09-2001, 09:14 AM
Sorry about that Crinos. Please download the zip file again - I corrected that mistake (forgot to espace the ' in that line :/)

Crinos
12-09-2001, 09:55 AM
Thanks bira ...

I just finished installing it on my test board, but now I get this error when I try to click a thread from forumdisplay.php:
Parse error: parse error in /home/username/public_html/forums/showthread.php on line 401
I looked for that line, and this is what it contained (lines 398-408)
$counter=0;
$countposts = ($pagenumber-1)*$perpage;
while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage) {
if ($postdoneery(st[postid]]) {
$counter--;
continue;
} else {
$postdone[$post[postid]]=1;
}
$postbits .= getpostbit($post);
}Any idea what I did wrong on this one? Thanks in advance :)

bira
12-09-2001, 10:02 AM
Crinos,

This has nothing to do with my hack, which changes nothing in these lines.

However, looking at the code you posted, it looks like like 401 in your showthread.php has gone completely awry.

The correct (original) line should be:


if ($postdone[$post[postid]]) {

Crinos
12-09-2001, 10:09 AM
duh! I didn't know what the hell happened to that code right there, but it was pretty whacked out ... thanks for the fix ...

The hack works great! Excellent work ... my users are gonna like this, hehe ... I'll install it on my main board tomorrow night ... you're right, this hack takes some time to install.

Great work, as usual :)

bira
12-09-2001, 10:16 AM
Thanks :)

Hooper
12-09-2001, 10:18 AM
My installation didn't work. I think I'm going to have to go back through this whole thing.

It doesn't expand and contract and the images are not showing up at all. :(

I have such a hacked up site it's hard to find the code to edit.

bira
12-09-2001, 10:23 AM
Hooper,

1) Make sure you follow the instructions in the installer to a T

2) Remember that this will only work on IE. If you are viewing your forums with Netscape or any other browser than IE, you won't see any difference at all.

Cheers,

Bira

bira
12-09-2001, 03:42 PM
Hooper,

E-mail me at goren@atlasf1.com the following files, and I'll make sure the hack is installed correctly and return them to you.

1) member.php
2) register.php
3) showthread.php
4) admin/functions.php

5) txt file of your postbit template
6) txt file of your showthread template

Cheers,

Bira

Modshack
12-09-2001, 05:39 PM
Installed and working fine on my forumz :) thanks Bira.

Justa thought but this would be realy kewl if the threads autocollapsed if the thread was older than maybe 30 days or so.

Anyhow just a note to say ta

HM

Hooper
12-09-2001, 08:46 PM
Hi Bira,

You offer is very kind and I decided to take you up on it. The files are sent. I went over the hack installation briefly yesturday evening and found that within the showthread.php there is a bit of your hack code that is installed right below a portion of a news type hack I have installed. This may be posing a problem but I'm not sure. At this point I have a minimum of 10-12 hacks installed and a couple of the files such as functions and showthread are getting interesting when trying to install another hack. Heh, you almost have to be a hack writer yourself when you get to this point.

Regardless, I appreciate you taking a look to see if it is something on the simple end or if I have a clash in code between hacks or between the several javascript apps I have installed. Most likely I just missed something somewhere.

Thank You,
Rick

Hooper
12-09-2001, 10:36 PM
[QUOTE]Originally posted by Modshack
Installed and working fine on my forumz :) thanks Bira.

Justa thought but this would be realy kewl if the threads autocollapsed if the thread was older than maybe 30 days or so.

Anyhow just a note to say ta

HM

bira
12-10-2001, 01:29 AM
Hi Rick,

Did you send it? I didn't receive it (I just woke up, heh).

goren@atlasf1.com - just to be sure.

Cheers,

Bira

Hooper
12-10-2001, 01:53 AM
Hi Bira,

Yes I sent it. I also went ahead and just sent it again. Darn email. :D I've always wondered where half the email goes when not received. Does it like just set out in cyberspace between deminsions..Lol.

bira
12-10-2001, 01:57 AM
I got it. Will look into it now right away :)

Hooper
12-10-2001, 02:07 AM
[QUOTE]Originally posted by bira
I got it. Will look into it now right away :)

bira
12-10-2001, 02:26 AM
Hooper - sent you the stuff edited back :)

Hooper
12-10-2001, 03:19 AM
*Hooper goes and crawls under rock after the talented Bira shows Hooper that he left code out of the templates thus creating buggies. :o *

I really should sleep more. Everything seems to be super duper.

Thanks Bira,
Much Appreciated.
Rick

bira
12-10-2001, 03:27 AM
My pleasure. Glad it works :)

Hooper
12-10-2001, 03:28 AM
And that it does. :)

Thanks again for sharing your work.

Rick

Baratator
12-10-2001, 11:09 AM
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 !!

bira
12-10-2001, 11:30 AM
ok, I was asked about two other hacks I wrote, and how to integrate
them with this hack, so here goes:

1) The
"
Who Posted" enhancement (https://vborg.vbsupport.ru/showthread.php?s=&threadid=32784) hack ('showposts').

If you installed my hack variation - of using a separate,
showposts.php file (rather than hacking showthread.php) - you will
need to do two small changes to showposts.php:

a) Find


$pagenav = getpagenav($totalposts,"showposts.php?s=$session[sessionhash]&threadid=$threadid&postuserid=$postuserid&perpage=$perpage");


Change to (addition marked in high):


$pagenav = getpagenav($totalposts,"showposts.php?s=$session[sessionhash]&threadid=$threadid&postuserid=$postuserid&perpage=$perpage&display=$display");


b) Find


getforumrules($forum,$getperms);


ABOVE that ADD:


// Contract Old Posts in Thread (v1.0)
if (strstr($HTTP_USER_AGENT,"MSIE")) {
eval("\$hideposts = \"".gettemplate("showthread_hideposts")."\";");
} else {
$hideposts = "";
}
// Contract Old Posts in Thread (v1.0)


That's it. Save and upload file.

2) The
P
ost Count & Direct Link (https://vborg.vbsupport.ru/showthread.php?s=&threadid=22083) hack ("post #xxx");

This is more a design explanation than an actual hack integration.

I will explain to you what changed in the postbit template. That will
assist you in integrating any post you want, not just the count post
hack.

The "Contract Old Posts" hack changes bpostbit only in that it
adds a division (<div></div>) and defines the traditional postbit as a
division. So the new postbit looks like:


<table bgcolor="{ pagebgcolor }" width="{ tablewidth }" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{ imagesfolder }/space.gif" alt=""></td><td width="100%"><!-- spacer -->

<table cellpadding="{ tableouterborderwidth }" cellspacing="0" border="0" bgcolor="{ tablebordercolor }" { tableouterextra } width="{ contenttablewidth }" align="center"><tr><td>

<DIV id="p$post[postid]h" style="display:$ph">
<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" { tableinnerextra } width="100%">
<tr>
<td bgcolor="$post" width="175" valign="top" nowrap>$plusimg <normalfont><b>$post[username]</b></normalfont></td>
<td bgcolor="$post[backcolor]" width="100%" valign="top">
<table width="100% cellspacing="0" cellpadding="0" border="0">
<tr>
<td><smallfont>$post[icon] <b>$post[title]</b></smallfont></td>
<td align="right" nowrap><smallfont>[b]$onlinestatus $post[foldericon] $post[postdate] <font color="{ timecolor }">$post[posttime]</font></smallfont></td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>

<DIV id="p$post[postid]e" style="display:$pe">
<table cellpadding="4" cellspacing="{ tableinnerborderwidth }" border="0" { tableinnerextra } width="100%">
<tr>
<td bgcolor="$post" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert] $minusimg
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[postcount]/$post[posts]</smallfont></td>

<td bgcolor="$post[backcolor]" width="100%" valign="top">
<smallfont>$post[icon] <b>$post[title]</b></smallfont>
<p><normalfont>$post[message]</normalfont></p>
$post[attachment]
<p>$post[signature]</p>
<p>$post[editedby]</p>
<p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>
</td>
</tr>
<tr>
<td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$post[postcount] [b]$onlinestatus $post[foldericon]
$post[postdate] <font color="{ timecolor }">$post[posttime]</font></smallfont></td>

<td bgcolor="$post[backcolor]" width="100%" valign="middle" height="16">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td><smallfont>
$post[profile] $post[pmlink] $post[useremail] $post[homepage] $post[search] $post[buddy]
<!-- $ post[icqicon] --> <!-- $ post[aimicon] --> <!-- $ post[yahooicon] -->
</smallfont></td>
<td align="right" nowrap><smallfont>
<a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="{ imagesfolder }/edit.gif" border="0" alt="Edit/Delete Message"></a>
<a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="{ imagesfolder }/quote.gif" border="0" alt="Reply w/Quote"></a>
</smallfont></td>
</tr>
</table>
</td>
</tr>
</table>
</DIV>

</td></tr></table>

<!-- spacer --></td><td width="10"><img width="10" height="1" src="{ imagesfolder }/space.gif" alt=""></td></tr></table>


The BLUE part is the old, traditional postbit --
this is what the post looks like when it's expanded.

The RED part is the newly added division -- this is
what the post looks like when it's contracted (shrunk).

Therefore, if you want an element to show in both situations - when
the post is expanded or contracted - that element must be placed in
BOTH divisions (the red and the blue).

For example, you can notice that in both the RED and the BLUE
divisions, I have placed $onlinestatus, $post[foldericon],
$post[postdate] and [b]$post[posttime] -- these elements will show
whether a post is extracted or contracted.

Therefore, likewise, if you have $post[postcount] in the BLUE
divisions (expanded post) and you also want it to appear in the
contracted post, then you need to place $post[postcount] in the RED
division -- wherever suits your design.

Hope this explanation helps.

Cheers,

Bira

p.s.

some people may have $countpost instead of $post[postcount], depending
on how you installed this hack. They are, however, the same.

Hooper
12-10-2001, 12:09 PM
Someone must be trying to do what I am. Thanks for posting this information. Glad they asked for it. ;)

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:

Database error in vBulletin 2.2.1:

Invalid SQL: INSERT INTO user (userid,username,password,email,styleid,parentemai l,coppauser,homepage,icq,aim,yahoo,signature,admin email,showemail,invisible,usertitle,joindate,cooki euser,daysprune,lastvisit,lastactivity,usergroupid ,timezoneoffset,emailnotification,receivepm,emailo npm,options,birthday,maxposts,startofweek,ipaddres s,pmpopup,referrerid,nosessionhash,avatarid) VALUES (NULL,'Spankmaster C','9b1dd17445f20c234b44bccb0c611848','someemail@s omedomain.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:


$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,avata rid,hideposts) 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:


// Contract Old Posts in Thread (v1.0)
global $display, $post[countpost], $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:


// Contract Old Posts in Thread (v1.0)
global $display, $post[countpost], $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

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/nthellworld/vbb/network/nthellworld/vbb/register.php
Referer: http://www.frankw.net/network/nthellworld/vbb/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/nthellworld/vbb/network/nthellworld/vbb/register.php
Referer: http://www.frankw.net/network/nthellworld/vbb/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:


'".addslashes(htmlspecialchars($email))."',".$newstyleval."'"..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/showthread.php?s=&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:


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:


// 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','".addslashes(htmlspecialchars($ho mepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialch ars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signatur e)."','$adminemail','$showemail','$invisible','".addslashes($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:


$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/showthread.php?s=&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


$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:


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


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

Bedhead
12-14-2001, 09:52 PM
Thank you very much.

I learned something new.
Whenever something is said to be put in fornt, I have been butting it directly in front. OOPS.

Once again thanks.

You contribute very much to vBulletin.

SirSteve
12-15-2001, 02:54 AM
Excellent hack Bira! And a huge thanks for the help!

bira
12-15-2001, 02:58 AM
Glad you got it sorted, SirSteve :)

FWC
12-15-2001, 04:37 AM
I installed this on my test board tonight. I got the postbit how I wanted it and moved it to the real board. It's fabulous. Another great one, Bira!! :)

bira
12-15-2001, 04:45 AM
Thank you :)

FWC
12-15-2001, 06:02 AM
This is too funny. I'm getting two reactions from the community:

"Dude, you're a genius, you rock. This is incredible."

"Hey, why didn't you have this turned on the whole time?"

I have explained that I am not the one that rocks and that the hack is new. :)

george_proost
12-15-2001, 08:40 AM
I'm now using the little + and - in a different way as well.

This <DIV> thing is new to me .... I have hundreds of categories..
Sooooo I put the script in the Header and made some more changes...

see here (http://www.mainframeforum.com/f3/s)

What I've done is allow for the contraction of subforums as well.

Thx BIRA.... great hack ( I just need to exclude the Netscrape stuff :( )


five start hack this one ............

inetd
12-16-2001, 11:15 PM
How to make, that for extended and new users this option it was ON by default?

Nam
12-16-2001, 11:25 PM
[QUOTE]Originally posted by inetd
How to make, that for extended and new users this option it was ON by default?

inetd
12-16-2001, 11:29 PM
[QUOTE]Originally posted by Nam


Change the value in registeradult template to yes.

Frank
12-16-2001, 11:32 PM
[QUOTE]Originally posted by inetd

extended and new users

inetd
12-16-2001, 11:40 PM
yes, existing

bira
12-17-2001, 12:20 AM
inetd,

you'll have to run an query: UPDATE user SET hideposts='1'. That will switch it to 'yes' for all existing users.



Frank,

I don't know how FireFly did it, he may have an easier way than me.

I used my Post Counter (https://vborg.vbsupport.ru/showthread.php?s=&threadid=22083) hack for it.

If you installed it (it's a VERY easy hack to install), you can do the following to make sure the 1st post is always expanded:

In showthread.php, find this code:

$post[postcount] = ++$postcount;
$postbits .= getpostbit($post);


Change it to (addition marked in "high"):


$post[postcount] = ++$postcount;
if ($post[postcount]=="1") {
$thispost = "1";
} else {
$thispost = "";
}
$postbits .= getpostbit($post);


Open admin/functions.php, find:


global $display, $HTTP_USER_AGENT;

if ($post[dateline]>$bbuserinfo[lastvisit]) {


change it to (additions marked in high):


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

if ($post[dateline]>$bbuserinfo[lastvisit] || $thispost=="1") {


That's it.

Again, like I said, maybe there's a way of doing it that I'm ignoring and FireFly can help, but I just used my count posts hack for it and it works. *shrug*

FWC
12-17-2001, 12:37 AM
[QUOTE]Originally posted by bira

Open admin/functions.php, find:


global $display, $HTTP_USER_AGENT;

if ($post[dateline]>$bbuserinfo[lastvisit]) {


change it to (additions marked in high):


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

if ($post[dateline]>$bbuserinfo[lastvisit] || $thispost=="1") {


That's it.

Again, like I said, maybe there's a way of doing it that I'm ignoring and FireFly can help, but I just used my count posts hack for it and it works. *shrug*

bira
12-17-2001, 12:40 AM
hrmmm... I think I tried it and it didn't work for me, because $post[countpost] was not global

Frank
12-17-2001, 12:42 AM
Ah excellent that works now, cheers Bira :D

bira
12-17-2001, 12:48 AM
by the way,

I have a very important warning for those of you who want to turn it on for all existing users: DON'T DO THAT!

If you switch it on for ALL users, people logging on your Bulletin Board with Netscape WILL NOT BE ABLE TO EXPAND THE POSTS.

They will be stuck with entire threads contracted, and with absolutely no way to expand any post at all.

So don't turn it ON by default for all users. Let them make the choice.

FWC
12-17-2001, 12:49 AM
[QUOTE]Originally posted by bira
hrmmm... I think I tried it and it didn't work for me, because $post[countpost] was not global

bira
12-17-2001, 12:52 AM
hrmmm... maybe I was drunk the night I tried it :D

I'll try again now :)

bira
12-17-2001, 12:53 AM
yup, you're right FWC. Thanks :)

FWC
12-17-2001, 12:53 AM
[QUOTE]Originally posted by bira
If you switch it on for ALL users, people logging on your Bulletin Board with Netscape WILL NOT BE ABLE TO EXPAND THE POSTS.

They will be stuck with entire threads contracted, and with absolutely no way to expand any post at all.

FWC
12-17-2001, 12:55 AM
[QUOTE]Originally posted by bira
yup, you're right FWC. Thanks :)

inetd
12-17-2001, 12:56 AM
When the message is minimized, number of the message and the first line from the message is not shown. What to do make?

bira
12-17-2001, 12:59 AM
FWC the expand all/contract all will work, because it reloads the page and changes the display setting to show/none. What WON'T work is the javascript function to change between show/none without loading the page.

Theoretically, I could write a more complex hack so that non-IE users could also use the +/-, whereby the page reloads on every click and changes the display setting for that specific post. But it will be a much bigger hack, and I don't think it's very convenient - having to reload the page every time you want to expand or contract a post.

I would also add that there is a way in javascript to write an expand/contract function for Netscape as well, using layers. It will, however, add a lot more code to the page (and therefore more bandwidth) and since the behaviour of layers is very different to dhtml, it will also mean heavily editing the templates, if not creating two template sets.

Since I abhore Netscape with all my heart, I decided quite consciously not to put that effort. 90% of my users are IE users. All I can do for the remaining 10% is make sure they don't get hurt or disabled. That's all

FWC
12-17-2001, 01:01 AM
[QUOTE]Originally posted by inetd
When the message is minimized, number of the message and the first line from the message is not shown. What to do make?

bira
12-17-2001, 01:02 AM
[QUOTE]Originally posted by inetd
When the message is minimized, number of the message and the first line from the message is not shown. What to do make?

FWC
12-17-2001, 01:03 AM
[QUOTE]Originally posted by bira
Since I abhore Netscape with all my heart, I decided quite consciously not to put that effort. 90% of my users are IE users. All I can do for the remaining 10% is make sure they don't get hurt or disabled. That's all

inetd
12-17-2001, 01:06 AM
[QUOTE]Originally posted by FireFly

After you do this, place $post[shortmsg] in the posbit template. :)

bira
12-17-2001, 01:11 AM
inetd, place it in the first <div></div> -- exact place is wherever you want it to be

FWC
12-17-2001, 01:13 AM
[QUOTE]Originally posted by inetd
Where exactly it is necessary to insert $post [shortmsg]?

OGieBear
12-17-2001, 11:47 AM
Great Hack, but I have a Bug. The Images Plusimg and minimg don't see

http://members.tripod.de/OGieBears/Bild3.gif

ciao

eva2000
12-17-2001, 03:55 PM
awesome hack Bira!!! ... haven't installed it yet since i'm still on a modified 2.2.0 version files for now..

bira
12-17-2001, 04:14 PM
OGieBear - you'll need to open those images in an image editor, like PSP or Photoshop, and invert them or change the colours to something light.

eva2000 - thanks :D

OGieBear
12-17-2001, 05:18 PM
*autsch*

thx...

the hack is Kewl ....

great works..

dxb
12-17-2001, 10:12 PM
I'm using vb2.03 and I noticed in your install instruction in the register.php files a small difference and i think thats because it's more compatibale with 2.2.1

and this is the code


// Contract Old Posts in Thread (v1.0)
$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,avata rid,hideposts) 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')");
// Contract Old Posts in Thread (v1.0)


I changed it to this



// Contract Old Posts in Thread (v1.0)
$DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signa ture,adminemail,showemail,invisible,usertitle,join date,cookieuser,daysprune,lastvisit,lastactivity,u sergroupid,timezoneoffset,emailnotification,receiv epm,emailonpm,options,birthday,maxposts,startofwee k,ipaddress,pmpopup,referrerid,nosessionhash,hidep osts) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes($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','$hideposts')");
// Contract Old Posts in Thread (v1.0)



it's working fine for me I just wanted to make sure that all what I did is right

and thank you for this lovely hack :)

bira
12-17-2001, 10:21 PM
that looks correct to me, dxb :)

FWC
12-17-2001, 10:27 PM
I love the way you can contract a post that has code in it and shrink the rest of the page down to size once you've read that message. :)

bira
12-17-2001, 10:35 PM
something was annoying me about this hack, and I finally figured out what it is :D

If you don't put <a name="post$post[postid]"></a> in the first <div></div>, then you can't jumpt to a post directly if that post is contracted.

I now added it to my first <div></div> (it's already placed in the second one) and order is restored.

The funny thing is, I love Parker Clark's preview thread hack. And today I realized that with the preview hack and the contracted posts - I am finally able to go through all new threads/posts in my bb without losing my senses :D

inetd
12-17-2001, 10:52 PM
Bira the best!

FWC
12-17-2001, 11:17 PM
[QUOTE]Originally posted by bira
something was annoying me about this hack, and I finally figured out what it is :D

If you don't put <a name="post$post[postid]"></a> in the first <div></div>, then you can't jumpt to a post directly if that post is contracted.

I now added it to my first <div></div> (it's already placed in the second one) and order is restored.

VirtueTech
12-18-2001, 01:40 AM
Does this hack cause a large increase of server resources for a large forum?

bira
12-18-2001, 01:43 AM
VirtueTech, the actual expand/contract is javascript. Therefore, it's client side. So I can't see how it will increase load.

In any event, if my board is anything to go by, it made no difference. And I think my board is relatively large.

VirtueTech
12-18-2001, 01:54 AM
I checked the option on this board to contract all read posts....and it contracts all posts in every thread...even those I have not read.

However your post here was not contracted. Any ideas why?

bira
12-18-2001, 02:08 AM
VirtueTech, it works based on what is considered "unread" by vBulletin. If you leave now and come back in 20 minutes, only posts made in the last 20 minutes or so will be expanded - because that's what is considered by vBulletin to be 'new/unread posts'.

VirtueTech
12-18-2001, 02:25 AM
Gotcha.

That is the best way I guess to save on queries. Would be more efficient if it was traked better. Not your fault...just saying.

Thanks for this hack bira...I can't wait to install it.

Sadie Frost
12-18-2001, 11:19 AM
Hi! I cannot find this line in showthread.php:

Step 2 of 2 FIND:

getforumrules($forum,$getperms);

As no one else has had this problem, I have to think it's something I'm doing wrong. Anyone have any suggestions? Thanks so much! (And awesome hack bira, can't wait to get it working :))

I have v 2.2.1

bira
12-18-2001, 07:43 PM
Hi Sadie,

You should find getforumrules($forum,$getperms); at the very end of the script.

The original 2.2.1 showthread.php looks like this at the end:


getforumrules($forum,$getperms);

updateuserforum($thread['forumid']);

eval("dooutput(\"".gettemplate("showthread")."\");");

?>

inetd
12-18-2001, 08:31 PM
I have overlooked to insert the code in register_adult when have installed hack. You could not remind it?

bira
12-18-2001, 08:35 PM
inetd, run the installer from the first post in your admin directory. Select 'UPGRADE' -- you'll get all the info you need there.

VirtueTech
12-18-2001, 09:48 PM
Does this hack add any considerable load to a server.

It seems to have on my system.

Sadie Frost
12-18-2001, 10:24 PM
[QUOTE]Originally posted by bira
You should find getforumrules($forum,$getperms); at the very end of the script. [/code]

bira
12-18-2001, 10:29 PM
VirtueTech,

I wanted to check what you're saying, so I ran &explain=1 on a thread with 29 posts, on a limited resources server. First I did it on an "out of the box" vb 2.2.1:


Page generated in 1.5668079614639 seconds with 19 queries,
spending 0.098392963409424 doing MySQL queries and 1.4684149980545 doing PHP things.


The I did with with only this hack added:


Page generated in 1.57904504776 seconds with 19 queries,
spending 0.098688006401062 doing MySQL queries and 1.4803570413589 doing PHP things.


I am the only user on this server, so it's pretty much "lab tested".

Also, the load average on my server right now is 0.66, 0.73, 0.75 with ~80% CPU idle and 334 processes.

There are currently 67 members on my BB. I don't know how many guests (my who's online page doesn't seem to count guests, always saying 0 for that :/)

So from my own standpoint, I haven't noticed a change in load. But I really don't know much about this stuff so I'm all ears if you have suggestions.

Thanks,

Bira

VirtueTech
12-18-2001, 11:02 PM
I think your correct. I do know that is causes a slight bandwidth increase...thus possiblity of a smaller load increase for the web server...but I don't know off hand.

LuBi
12-18-2001, 11:04 PM
Well it's a picture, that should make a difference..

Twig Deez
12-19-2001, 02:13 AM
very excellent indeed. :D

Lionel
12-19-2001, 08:05 PM
I think that this hack is one of the best, if not the best.

GameZilla
12-20-2001, 07:54 PM
for some reason my yes or no thing always is on NO i tried click it a ton of times but it switch back to no after i like modify :mad:

any idea y?

Lionel
12-20-2001, 08:29 PM
On your forum if there is no title you show the first few words. On mine it is blank. How do you set this up?
thanks

bira
12-20-2001, 08:36 PM
Lionel, look for FireFly's instructions, in post #50 of this thread.

GameZilla - sounds like the selection is not stored in the database. Check to see if you edited member.php fully and whether you ran the installer as requested.

GameZilla
12-20-2001, 08:37 PM
i checked it all
can u e-mail the mysql stuff it need i think my sever does not let the script make the tables it self :confused:

e-mail me the tables i need to gamezilla@socal.rr.com

bira
12-20-2001, 08:41 PM
GameZilla, download the installer from the first post. Everything you need is there.

Lionel
12-20-2001, 08:44 PM
$post[shortmsg]
where in template to put?

bira
12-20-2001, 08:47 PM
wherever you want within the first <div></div>

(for more explanation about the two DIVs in postbit, look at post #29 on this thread)

Lionel
12-20-2001, 09:03 PM
I got it. I appreciate the help, specially the fast answer

GameZilla
12-20-2001, 09:51 PM
[QUOTE]Originally posted by bira
GameZilla, download the installer from the first post. Everything you need is there.

GameZilla
12-20-2001, 10:00 PM
i reinstall it :/ and nothing works still its the same prob

if u want go to http://www.otakuforums.com/ and test it

GameZilla
12-21-2001, 06:14 PM
isn't anyone gonna help ? :confused:

Sadie Frost
12-23-2001, 01:12 AM
GameZilla, did you get it to work? Cause I took at look at your forums and they seemed to be working fine.

:)

GameZilla
12-23-2001, 04:05 AM
that thing works the problem is that the contract post if it is already been viewed part does not work

AntiOnline
12-27-2001, 01:11 AM
Greetings:

Same problem. Old replies aren't closed automatically. Looks like the database entry for this user option isn't updating when a user updates their site options.

DelusionalMind
12-27-2001, 08:11 AM
Ummmmmm

I installed it and everything but it won't automatically collapse the read threads

Do you have to do this manually?

My test board is at http://www.splitviews.com/blindhope

Thanks :)

bira
12-27-2001, 12:47 PM
it sounds like you either did not make the necessary changes in the member.php file.

Run the installer again selecting UPGRADE and move to the changes needed section. Check EACH AND EVERY CHANGE was made extremely accurately.

Every single person to so far complain of a problem of this nature, which I asked to send me his/her files, forgot one step or didn't follow instructions accurately.

If you follow them accurately it will work just fine.

exodus
12-27-2001, 03:20 PM
very sweet.

why is this post so wide?

DelusionalMind
12-29-2001, 01:52 AM
[QUOTE]Originally posted by bira
it sounds like you either did not make the necessary changes in the member.php file.

Run the installer again selecting UPGRADE and move to the changes needed section. Check EACH AND EVERY CHANGE was made extremely accurately.

Every single person to so far complain of a problem of this nature, which I asked to send me his/her files, forgot one step or didn't follow instructions accurately.

If you follow them accurately it will work just fine.

Chrysalis
12-30-2001, 11:12 PM
I am running 2.2.1

and I installed this hack unintalled then reinstalled and I got the same problem both times, The collapse/expand links are there but they dont do anything and also I can see what looks like 1 template on top of another each post has 2 titles. From what I can tell all extras are working like in register.php etc. but its just showthread template or showthread.php is wrong.

Bira are the installation instructions fine for 2.2.1 users?

Lionel
12-30-2001, 11:17 PM
I installed on 2.21 no problem.

bira
12-30-2001, 11:27 PM
This is most certainly not an *easy* hack to install - it demands a bit of time, concentration and following details in the instructions very accurately.

But I can guarantee that doing that will always result the same: the hack works.

It's one thing finding a bug in a hack and then fixing it. But what you are describing can ONLY come from an error in the installation.

If you want, send me all the necessary files and templates (placed in a templatename.txt file) and I will find your error. But do that only after you checked EACH AND EVERY SINGLE DOT IN THE INSTRUCTIONS WAS FOLLOWED BY YOU.

:)

Martin CX
12-30-2001, 11:38 PM
Yes the hacks work brilliantly. :up:

Nonetheless I've (temporarily) shut it down... I'm trying to figure out a way to make it work without the posts being contained in tables.

You see, I'm developing an extremely 'less is more'-ish board and I really am trying to avoid the tables inside tables inside tables syndrome. My 'showthread' template - including postbits, but excluding exterior control panels is one big table with no interior tables inside it... my goal is to make it render incrementally as it loads, but unfortunately none of the major browsers does this very well.

Nonetheless, if there is a way to make the display bit control whether a table ROW is displayed or not instead of controlling whether the TABLE is displayed or not, you would really make my day. :)

Chrysalis
12-31-2001, 01:25 AM
ok ill give this another shot when i have more free time probably next weekend

MalaK_3araby
01-01-2002, 08:17 AM
Nice .. Clean and Ez.

i luv it .. thanks for such an wsome idea and work.

DelusionalMind
01-02-2002, 01:58 AM
Hmm....I follow it EXACTLY. I copy the ENTIRE "find" thing and then I get the result and then I add the appropriate line/s under/above it

I have installed many hacks with no problems, both on VBB and UBB

Hmmm....I'll give it one more shot on my beta board.....if it doesn't work, can I ICQ you over the files? :)

bira
01-02-2002, 04:01 AM
I don't have ICQ, but you can e-mail me at goren@atlasf1.com

Lionel
01-02-2002, 12:28 PM
I get post count only when contracted :stupid:

FWC
01-02-2002, 04:58 PM
[QUOTE]Originally posted by Lionel
I get post count only when contracted :stupid:

Lionel
01-02-2002, 05:02 PM
yup, I realized that. I just cannot get them to display at the same location, so I placed the lower part on the same line with favicon. Does not look too bad.

exodus
01-10-2002, 02:02 AM
this has to be one of the sweetest hacks i've seen yet..

i love this.. good work bira!!!

Jawelin
01-11-2002, 12:54 PM
Thanks, Bira.
I was searching this hack after having seen it applied here on vb.org... finally found! :D

Just a question: as I have a very hacked v2.2.1 board, and listing the installer I saw some 'low-level' code like deleting template, and so on...
It could be possible to have a txt - as usual - with the sequence of the operations, without letting the code doing them itself without any control ?

Otherwise, if you say it's safe even on hacked boards, I'll run it immediately ! ;)

Thanks again

pHaez
01-11-2002, 08:06 PM
did the install 3 times, and i have the same problem as the others, it wont collapse the posts automatically. I installed a hack that expanded and contracted the actual threads, maybe that had something to do with it? Either that, or because im using internet explorer 6.0.

Erwin
01-13-2002, 01:46 AM
Great hack! I love it! Really helps to clean up my forums. Works well on my heavily hacked forums.

Just a note to potential installers with other hacks like the gender hack - make sure when you make changes to your members.php that you don't erase the $gender variables - don't replace one code for another - just add the hidepost and $hideposts variables.

Thanks Bira!

Moonwolf
01-14-2002, 02:14 PM
One of the users on a board we installed this hack on went and checked which Linux Mandrake browsers it would work on, his post is here (www.underlight.com/VBB/showthread.php?postid=50436#post50436), in case anyone's interested.

Kathi

StarBuG
01-14-2002, 08:42 PM
First of all the Hack works great for me!

And after finding FireFlys add-on I was so happy cause that is what I´m looking for BUT:

For all the replys it works perfekt but for the first post of the thread the topic titel is gone!
It´s just empty!

Any suggestions???

Plz Help!

Greetings

StarBuG

WebMasterAJ
01-18-2002, 12:11 AM
I have a quick question...

I may of done something wrong, but for some reason, my boards aren't displaying the "Expand All" and "Collapse All" feature.

As of right now, where those words are supposed to be, it simply shows "hideposts" .

I don't even know where to begin, can someone point me in the right direction as to where I can find out why this is happening and how to solve it?

Thanks, any help is appreciated!
Andrew

Shenlong
01-18-2002, 01:43 AM
can someone do the functions.php part for me cause for somereason my file ALWAYS ****s up, attached is my functions.php file THANX.

Shenlong
01-18-2002, 10:28 AM
plz guys, for some reason when I edit functions.php all these space signs appear, I just need some help because I want this hack to work ;)

StarBuG
01-18-2002, 03:21 PM
I would suggest use a good TextEditor (like UltraEdit) Hehe!

Here is your edited fuctions.php ;)

Greetings

StarBuG

WebMasterAJ
01-18-2002, 03:29 PM
Does anyone know where I can look so I can fix the script to display the Expand/Collapse All Feature?

StarBuG
01-18-2002, 05:08 PM
Maybe you forgot to make the template:

showthread_hideposts

??

Check that ;)

Greetings

StarBuG

WebMasterAJ
01-18-2002, 05:19 PM
Thanks for the reply, but I do have that template. :confused:


It reads:
[QUOTE]
&nbsp;&nbsp; <a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=show"><smallfont color="#EEEEFF" class="thtcolor"><b>Expand all</b></smallfont></a> <smallfont color="#EEEEFF" class="thtcolor"><b>|</b></font> <a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=none"><smallfont color="#EEEEFF" class="thtcolor"><b>Contract all</b></smallfont></a>

FWC
01-18-2002, 05:22 PM
Did you add $hideposts to your showthread template in the right place?

WebMasterAJ
01-18-2002, 05:30 PM
You know, its always the simple things... LMAO... when I looked in showthread template, it said hideposts instead of $hideposts... duh!

Thanks for the help... !! :D

Shenlong
01-18-2002, 06:09 PM
kick butt, it works, thanx so much bira and all who supported me (editing my functions.php). FWC u rule, btw i got ultraedit and it works great, better then using the non-ascii MS frontpage 2k2, anyway this is pretty coo, cya

FWC
01-18-2002, 07:48 PM
[QUOTE]Originally posted by WebMasterAJ
You know, its always the simple things... LMAO... when I looked in showthread template, it said hideposts instead of $hideposts... duh!

Thanks for the help... !! :D

69-FLy-gUy
01-19-2002, 10:26 AM
This is a good hack! Thanks Bira
One problem though.,.

This is what my postbit looks like.. lol (like the colours :) )

When i click on expand/contract nothing happens.. same thign that you see here. can you help me? thanks

Ciao

69

Sparkz
01-19-2002, 12:26 PM
you might want to include white images too, for ppl with dark styles.
I know it is something that is easily fixed by the user, but if you add it to the zip, it'd save some time.

Adding what group to find the templates that need editing to the installer would save a bit of time too, when you don't sleep with a Vb bible under your pillow (which I am convinced some of the hackers here do)

Other than that, the hack worked great :)

StarBuG
01-19-2002, 01:00 PM
Hi! Maybe someone can help me! (FireFly??? :D)

After finding FireFlys add-on I was so happy cause that is what I?m looking for BUT:

For all the replys it works perfekt but for the first post of the thread the topic titel is gone!
It?s just empty!
Do I have forgott something??
Is in the code something missing???

Any suggestions???

PLZ Help

StarBuG

69-FLy-gUy
01-19-2002, 01:03 PM
What is firefly's add on?

Ciao

StarBuG
01-19-2002, 02:25 PM
You can find FireFly?s "Add-On" it in Post #50 (https://vborg.vbsupport.ru/showthread.php?postid=206627#post206627)

Greetings

StarBuG

69-FLy-gUy
01-19-2002, 03:04 PM
Thanks. but does anyone know the answer to my problem?

Thanks

69

cyrus
01-19-2002, 04:49 PM
[QUOTE]Originally posted by StarBuG
Hi! Maybe someone can help me! (FireFly??? :D)

After finding FireFlys add-on I was so happy cause that is what I?m looking for BUT:

For all the replys it works perfekt but for the first post of the thread the topic titel is gone!
It?s just empty!
Do I have forgott something??
Is in the code something missing???

Any suggestions???

PLZ Help

StarBuG

StarBuG
01-19-2002, 05:13 PM
Hehe!

I?m so stupid!
I don?t forgot to put it in the postbit Template but by putting it in the right place i deleted: $post[title] Muahaha (Dooooh)

For anyone who wants to know:

In Template postbit find (around line 10):

<td><smallfont>$post[icon] <b>$post[title]</b></smallfont></td>


and replace it with:

<td><smallfont>$post[icon] $post[shortmsg] <b>$post[title]</b></smallfont></td>


Thx for that hack ;)

Greetings

StarBuG

cyrus
01-19-2002, 05:19 PM
thanks starbug ! :)

69-FLy-gUy
01-20-2002, 07:15 AM
Anyone?

Ciao

StarBuG
01-20-2002, 01:05 PM
Check the hack again! It works

Check also if java scripting is enabled ;)

Greetings

StarBuG

69-FLy-gUy
01-20-2002, 09:12 PM
I will try. thanks

Ciao

Xelation
01-23-2002, 11:12 PM
I installed it but it isn't working correctly... It's showing the contracted posts and the expanded posts at the same time.... look at this http://www.xelation.com/personal/help7.jpg Can anyone help me please?

Ifrani
01-24-2002, 06:42 AM
[QUOTE]Originally posted by StarBuG
Hi! Maybe someone can help me! (FireFly??? :D)...

69-FLy-gUy
01-25-2002, 01:15 AM
Xelation.. That is the same problem taht I am havingt also...

Ciao

Let me know if you find the fix for it...

Xelation
01-25-2002, 01:41 AM
Hey 69-FLy-gUy.... I e-mailed Bira about this problem, I don't have a clue where shes been... it's been more than 10 days since shes been on... I hope he comes on soon.

FWC
01-25-2002, 01:51 AM
[QUOTE]Originally posted by Xelation
Hey 69-FLy-gUy.... I e-mailed Bira about this problem, I don't have a clue where hes been... it's been more than 10 days since hes been on... I hope he comes on soon.

69-FLy-gUy
01-25-2002, 02:47 PM
Yea. I am hoping that she comes on soon!! lol
Let me know if you figure it out....

Ciao

69-FLy-gUy
01-26-2002, 10:31 PM
Has anyone figured out the problem that me and Xelation are having?

Ciao

cihangir
01-27-2002, 12:19 PM
just installed this hack :) but i need to translate the text used by this hack such as "expand all" or "Contract posts you already read? This will hide the message body of posts you already read, displaying only the post header."

i could not find where they are stored.

snyx
01-30-2002, 05:42 AM
how in depth would it be to work an ignore user like system into the same concept as this? where if you have selected to ignore a user, his/her posts no matter the thread would be automatically shunk? just a thought.

LuBi
02-02-2002, 02:51 AM
I have a problem, I installed it correctly and I don't know why when minimized without a reply title it doesn't give a short of the body of the reply. On here it does show text without a title so why doesn't mine???

FWC
02-02-2002, 03:38 AM
[QUOTE]Originally posted by LuBi
I have a problem, I installed it correctly and I don't know why when minimized without a reply title it doesn't give a short of the body of the reply. On here it does show text without a title so why doesn't mine???

LuBi
02-02-2002, 04:03 AM
[QUOTE]Originally posted by FWC
You have to add an addition FireFly made. It's in the first couple of pages of this thread.

Frank
02-07-2002, 12:37 PM
[QUOTE]Originally posted by 69-FLy-gUy
Xelation.. That is the same problem taht I am havingt also...

Ciao

Let me know if you find the fix for it...

Erwin
02-07-2002, 05:47 PM
After upgrading, just run the install script and choose upgrade to reapply the templates - no need to do any modding of the templates or php files.

This hack is still one of THE best ones around! My members love it!!!

heynurse
02-11-2002, 07:44 AM
bira,

Thanks for all your work, this hack is awesome!

marocnl
02-20-2002, 09:11 AM
Hi,

I installed this hack, it works great (thanx) But when i view the forums in Netscape (4.79) it doenst show the messages at all, it only shows the header.

http://community.marokko.nl/forums/

I dont see what i did wrong, can someone help me :(

Marocnl

Omero
02-20-2002, 10:30 AM
I have a problem.... when i "shrink" the thread by clickin on the minus sign, the cell of the table with username, title, etc... isn't aligned with the normal unshrinked ones.

Check it out here: http://forum.ngx.sm/index.php

Any thread is just right, have a look.

Surely its a HTML bug, can someone help me out?

mADmAX`
02-21-2002, 05:33 PM
I just want to say that this is a great hack but...

It all works fine except for the old post are not being contracted. Every post is always expanded no matter what. I can expand all and contract all but for some reason the old post are not contracted. I get no errors, seems to work fine except for this. I am running 2.2.2....

Does anyone know what the cause could be, I followed each step to a T

Recon_Boy
02-24-2002, 03:26 PM
[QUOTE]Originally posted by inetd
Where exactly it is necessary to insert $post [shortmsg]?

Recon_Boy
02-24-2002, 03:28 PM
[QUOTE]Originally posted by mADmAX`
I just want to say that this is a great hack but...

It all works fine except for the old post are not being contracted. Every post is always expanded no matter what. I can expand all and contract all but for some reason the old post are not contracted. I get no errors, seems to work fine except for this. I am running 2.2.2....

Does anyone know what the cause could be, I followed each step to a T

pran
02-25-2002, 02:37 AM
I got this error after installing the hack:

Fatal error: Call to undefined function: updateuserforum() in /usr/local/www/virtual/www.kuro.ph/docs/forums/forumdisplay.php on line 62

kmoo
03-03-2002, 06:36 PM
FOr some reason I can not get mine to work. I know that it is me. I have reinstalled it several; times and started over from top to bottom several times....No Dice,,,,,

Update
===========
I added the files that I use to make mine go. I know without a doubt that it will be something I am doing but I can not fig out whjat it is. Please help

kidney
03-06-2002, 02:27 AM
One word "GENIUS" that all I can say...... Works great. :D

Figment
03-07-2002, 09:46 AM
Is there a way of toggling this option on/off in a users profile via the Admin CP? Cant see a setting for it in there

cihangir
03-08-2002, 10:31 AM
i try to reinstall it on 2.2.3 but i can not find this code in new showthread.php

[QUOTE]root/showthread.php

Step 1 of 2 FIND:


$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");

Dalius
03-08-2002, 06:59 PM
[QUOTE]Originally posted by FireFly

In functions.php, find:
$plusimg = "";
$minusimg = "";
}
and right after it add this:
if ($post[title]=='') {
$msgpos=strpos($post[pagetext],"\n");
if ($msgpos>50 or $msgpos<2 or $msgpos===false)
$msgpos=50;
$post[shortmsg]=substr($post[pagetext],0,$msgpos)." [...]";
}
You can reset 50 to your own number of first N chars to show.
It will show first line if it's shorter than 50 chars, or the first 50 chars in the line.

After you do this, place $post[shortmsg] in the posbit template. :)

Dalius
03-08-2002, 07:05 PM
Nvm, fixed

cerebro
03-15-2002, 01:57 PM
[QUOTE]Originally posted by cihangir
i try to reinstall it on 2.2.3 but i can not find this code in new showthread.php

cerebro
03-15-2002, 02:15 PM
[QUOTE]
root/showthread.php

Step 1 of 2 FIND:


$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");

dxb
03-15-2002, 08:19 PM
works like a charm with 2.2.4 :)

anyway cihangir

just find this code :



$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage".iif(isset($highlight), "&highlight=$highlight", ""));



and change it to this



// Contract Old Posts in Thread (v1.0)
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display".iif(isset($highlight), "&highlight=$highlight", ""));
// Contract Old Posts in Thread (v1.0)



hope it works for you :)

Arabian
03-16-2002, 02:23 PM
Wonderful Hack!!!

smooth installation on 2.2.4

ZiRu$
03-23-2002, 06:01 AM
i will try it out! Thanks alot!

Figment
03-25-2002, 06:25 AM
Query reposted:

Is there a way of toggling this option on/off in a users profile via the Admin CP? Cant see a setting for it in there

Issvar
03-26-2002, 06:46 AM
To make the expand all and contract all links not require reloading do the following:

In the showthread template find
function expand(listID) { and add above that:
function contractAll() {
var aDivs=document.body.getElementsByTagName("div");
for (x=0;x<aDivs.length;x++) {
if (/^p[0-9]{1,8}h$/.test(aDivs[x].id)) {
aDivs[x].style.display="";
} else if (/^p[0-9]{1,8}e$/.test(aDivs[x].id)) {
aDivs[x].style.display="none";
}
}
window.event.cancelBubble=true;
}
function expandAll() {
var aDivs=document.getElementsByTagName("div");
for (x=0;x<aDivs.length;x++) {
if (/^p[0-9]{1,8}e$/.test(aDivs[x].id)) {
aDivs[x].style.display="";
} else if (/^p[0-9]{1,8}h$/.test(aDivs[x].id)) {
aDivs[x].style.display="none";
}
}
window.event.cancelBubble=true;
}

Then in the showthread_hideposts template find <a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=show">and replace that with <a href="#" onclick="expandAll();return false;">

Then find also in the showthread_hideposts template <a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=none">and replace that with <a href="#" onclick="contractAll();return false;">

And for Bira, feel free to use this in an update to the full hack if you find it worthwhile.

psx-dude
03-29-2002, 05:12 AM
I have yet to get it the way we have here where the first thread is non-contracted in 2.2.4.

Velocd
04-03-2002, 02:22 AM
Pro hack, I wish I would have found it earlier. :p

Dalius
04-04-2002, 08:33 PM
Is their a vbhacker version of this?

GuruXL
04-10-2002, 12:56 AM
In showthread.php i cannot find $pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage"); I'm running v2.2.4, and my showthread.php has been modified before for other hacks. Someone help?

Hwulex
04-10-2002, 01:29 AM
Great hack, installed fine.

1 question
On your board (and here infact), when you collapse a post, you get:
"blah blah blah..."

When I collapse a post on mine, unless the post has a subject, nothing is displayed. Why is this?

I've added FireFly's hack from post #50 and still no joy.
My forum can be found here: http://www.hwulex.co.uk/vB/

Cheers.

Apok2002
04-11-2002, 03:47 AM
I was going to ask the same thing Hwulex.

opus
04-16-2002, 04:21 PM
since adding this hack i've been getting this error

Fatal error: Call to undefined function: unindexpost() in /home/virtual/site11/fst/var/www/html/thebored/editpost.php on line 258

sub
04-22-2002, 08:07 AM
Love the hack! Works great with 2.2.5 :cheeky:

PeterNRG
04-23-2002, 10:16 AM
[QUOTE]Originally posted by GuruXL
In showthread.php i cannot find $pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage"); I'm running v2.2.4, and my showthread.php has been modified before for other hacks. Someone help?

Soma
04-26-2002, 11:35 PM
exact same thing over here, I'm just going to go for it. I'll tell ya how it goes.
Actually, when You look at the changes that the hack does.
it adds the variable display w/ &display=$display
I'm just going to add that in the nessacary place. Wish me luck

Soma
04-29-2002, 08:11 PM
ok, it works.

Soma
04-29-2002, 08:13 PM
Ok, Now I just need to find out how to that thing they have set-up here.
Where it substrings the post if a topic was not given on the post. Anyone know how?

Crazy Mofo
04-30-2002, 03:49 AM
@bira man u working overtime here hehe g/j anyways good too see u aint lost ya cool yet i woulda :D

tzlvazrael
04-30-2002, 09:24 PM
Stupid question alert!!!

Will this work on 2.2.5?

Thanks in advance
Rick

FWC
05-01-2002, 03:17 AM
[QUOTE]Originally posted by tzlvazrael
Will this work on 2.2.5?

tzlvazrael
05-01-2002, 05:02 AM
Thanks much for the reply...

Time to install.. :)

Boofo
05-01-2002, 11:50 AM
We installed the expand and contract hack and it works great except that we are having a problem now when we contract the posts that if the user doesn't put in a post subject, the message doesn't show anything when it's contracted except the name on the left and the time of day on the right. We notice in here that if there's not a post subject it pulls part of the message out when it's contracted. Does anyone know how we can fix this so it will work like it does on here? Thanks in advance!

FWC
05-01-2002, 03:51 PM
It's in this post:

https://vborg.vbsupport.ru/showthread.php?postid=206627#post206627

It'salways a good idea to read the whole thread before installing a hack. :)

Boofo
05-01-2002, 04:56 PM
I thought I had read everything that I needed at the time (Sorry about that). I guess I should have re-read it a little closer. Thanks for pointing it out to me. I have one last question though. Where in the postbit template do I put $post[shortmsg]? I can't find a place that just has $post in it to replace it (or did I miss something else in the thread that I should have read?) Thank you in advance.

Erwin
05-02-2002, 02:56 AM
I am curious to know if there is any way that when a post is collapsed that we can prevent all the images files including the avatars, smilies etc. from being downloaded - and make these images only download when a post is expanded. This way, a lot of bandwidth can be saved if collapsed posts do not have the image files downloaded, only expanded posts. (At the moment, everything is downloaded whether the post is contracted or expanded, which is good because when you hit the plus image you see all the images, but does waste server bandwidth if the person doesn't expand the post).

FWC
05-02-2002, 04:23 AM
[QUOTE]Originally posted by Boofo
I thought I had read everything that I needed at the time (Sorry about that). I guess I should have re-read it a little closer. Thanks for pointing it out to me. I have one last question though. Where in the postbit template do I put $post[shortmsg]? I can't find a place that just has $post in it to replace it (or did I miss something else in the thread that I should have read?) Thank you in advance.

Boofo
05-02-2002, 06:55 AM
Worked great, thank you!