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

Code:

$pagenav = getpagenav($totalposts,"showposts.php?s=$session[sessionhash]&threadid=$threadid&postuserid=$postuserid&perpage=$perpage");
Change to (addition marked in high):

Code:

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

Code:

getforumrules($forum,$getperms);
ABOVE that ADD:

PHP Code:

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

Code:

<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[backcolor]" 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>$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[backcolor]" 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] $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. ;)


All times are GMT. The time now is 04:52 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.02137 seconds
  • Memory Usage 1,760KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete