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)

Sho 09-04-2002 06:45 AM

I found this and it works with MoZilla (and, therefore, with Netscape 6/7). Could anyone combine this technique with bira's hack, so we get a version working with IE *and* Netscape?

cybrcyfr 09-04-2002 06:56 AM

Yeah, using the getElementByID() works in Netscape 6, but not 4.

I was planning on getting around to modifying the hack to do it all client side and work in IE, Netscape and Opera. on my todo list.

Check this site out, good stuff [http]http://www.xs4all.nl/~ppk/js/index.html?/~ppk/js/intro.html[/http]

Sho 09-04-2002 07:01 AM

Hm, looks like an interesting read. Thanks! :)

[high]* Sho is back in "learning by doing" mode ...[/high]

Sho 09-04-2002 08:55 AM

Well, with the information on the page you recommended, cybrcyfr, I did the following:

Code:

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--

var supported = (document.getElementById || document.all);

if (supported)
{
        document.write("<STYLE TYPE='text/css'>");
        document.write(".postbit_regular {display: block}");
        document.write(".postbit_hidden {display: none}");
        document.write("</STYLE>");

        var max = 7;
        var data_regular = new Array();
        for (var i=1;i<=max;i++)
        {
                data_regular[i+1] = false;
        }
       
        var max = 7;
        var data_hidden = new Array();
        for (var i=1;i<=max;i++)
        {
                data_hidden[i+1] = false;
        }       

}

function contract(i)
{
        if (!supported)
        {
                alert('This link does not work in your browser.');
                return;
        }
        data_regular[i] = (data_regular[i]) ? false : true;
        current = (data_regular[i]) ? 'none' : 'block';
        if (document.getElementById)
        {
                document.getElementById('postbit_regular'+i).style.display = current;       
        }
        else if (document.all)
        {
                document.all['postbit_regular'+i].style.display = current;
        }
}

function expand(i)
{
        if (!supported)
        {
                alert('This link does not work in your browser.');
                return;
        }
        data_hidden[i] = (data_hidden[i]) ? false : true;
        current = (data_hidden[i]) ? 'block' : 'none';
        if (document.getElementById)
        {
                document.getElementById('postbit_hidden'+i).style.display = current;       
        }
        else if (document.all)
        {
                document.all['postbit_hidden'+i].style.display = current;
        }
}

// -->
</SCRIPT>

... and two <divs> in the "postbit" template as containers, using those CSS classes and IDs. This expands/contracts in both browsers. Note that I have never used JavaScript before, so this might be a piece of s***.

dabean 09-04-2002 10:36 PM

[QUOTE]Originally posted by Sho
Well, with the information on the page you recommended, cybrcyfr, I did the following:

*snipped interesting javascript*

... and two <divs> in the "postbit" template as containers, using those CSS classes and IDs. This expands/contracts in both browsers. Note that I have never used JavaScript before, so this might be a piece of s***.

NeoGT 09-05-2002 04:22 AM

Installed the hack, but none of the post quotes (except from the first post) appear on the contracted view. Plus there are these weird squares which have appeared to the left of everyone's name.

Okay I see what those are for now, they're just blank and they don't do anything.

Sho 09-05-2002 05:05 AM

Too late! ;)

Just finished rewriting bira's hack to fit my needs: completely client-side, working with IE, MoZilla & Netscape 6/7 (=>Gecko). Thanks again to cybrcyfr for linking to his interesting website!

Looking forward to Opera 7 and its improved DOM support, btw. :)

NeoGT 09-05-2002 07:38 PM

Can anyone help? What's happening is that it only displays the post subjects while in contracted form instead of the first line of the post, like it does at this site. If there is no subject then all I get is a blank line for that post.

havefun 09-19-2002 07:31 PM

really cool hack!

like it & had no probs.. :banana:

lg, havefun

havefun 09-21-2002 07:05 PM

when you have chosen in the user CP 'yes' by contract posts:

you enter a link to a special post# th. you will not go to the right position in browser window or only find conracted posts ...

[you only have the prob when you allready have read the post|s.]


do you have any idea? :D
--> after following a post link to find it opened ...

thx 4 your time!
haveFUN
[i love this hack!]


All times are GMT. The time now is 11:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01327 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)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