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)

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 :

Code:


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

and change it to this

Code:


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

function expand(listID) {
and add above that:
Code:

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

<a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=show">
and replace that with
Code:

<a href="#" onclick="expandAll();return false;">
Then find also in the showthread_hideposts template
Code:

<a href="showthread.php?threadid=$thread[threadid]&s=$session[sessionhash]&perpage=$perpage&pagenumber=$pagenumber&display=none">
and replace that with
Code:

<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


All times are GMT. The time now is 09:37 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.01797 seconds
  • Memory Usage 1,738KB
  • 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
  • (8)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

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

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