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

Mike11212 09-25-2002 11:17 AM

I would like to thank Bira for makeing a wonderful hack.

I am useing it proudly on my site now :)

Mike11212 09-25-2002 12:56 PM

I need help I don't know what I have done wrong.
It expands and collapses but it doesn't show anything just blank post except for the first one.

ANyone have any idea how to fix

http://www.hardwaregeeks.com/board

just go to any thread and collapse the post you will see what I mean

havefun 09-26-2002 02:30 PM

[QUOTE]Originally posted by Mike11212
I need help I don't know what I have done wrong.
It expands and collapses but it doesn't show anything just blank post except for the first one.

ANyone have any idea how to fix

http://www.hardwaregeeks.com/board

just go to any thread and collapse the post you will see what I mean

waddy 09-26-2002 11:18 PM

works fine with 2.2.8 :)

Mike11212 09-27-2002 04:07 AM

[QUOTE]Originally posted by havefun


everthing works fine! :classic:

this is because the others wrote no 'post subject:'! ;)

havefun 09-27-2002 09:32 AM

u have nothing made wrong..

that's only a prob with the members who wrote no subject.

i don't know - have the same prob.. :knockedout:
we have to make them clear to write a subject,
cause of contracted posts....

s. havefun

edit:
ok i've tested it here now & here u don't need to write a subject..
there is always shown anything!

so this is modif. by bulletin.org

could anybody help us????????????? :banana:

Lionel 09-28-2002 06:54 AM

I am an IE user and I have to say that I am really impressed with that new version of netscape. Unfortunately, this great hack here does not seem to display in that browser. No mention of the collapse links, no images to collapse threads. In fact on my browser the second part of a shrunk thread is not viewable at all.

How could that be possible? Are other hacks affected too?

Mike11212 09-28-2002 07:09 AM

It doesn't work with NS it says it in the read me :P

Mike11212 09-28-2002 07:09 AM

hmm 2 post in a row I sowwy

but can anyone tell us how vbulletin.org modified this hack?

groovesalad 10-01-2002 05:12 PM

Is there a way to default the option of having read posts collapsed to Yes instead of No for users? Where can I globally change this option for users on my message board?

Mike11212 10-01-2002 05:15 PM

there USER CP

groovesalad 10-01-2002 05:42 PM

One minor problem with this. When I view a thread and leave, then come back, the messages aren't collapsed. It doesn't recognize that I've already viewed that thread. I know this because I have a hack that tells me how many new posts vs. old posts are in the thread and the new posts number never changes. Any ideas?

groovesalad 10-01-2002 05:43 PM

[QUOTE]Originally posted by Mike11212
there USER CP

Mike11212 10-12-2002 07:40 PM

yeah i beleive so

groovesalad 10-12-2002 07:49 PM

I've been to boards where this setting is already set to Yes.

spazeman 11-25-2002 07:16 AM

[QUOTE]Originally posted by Mike11212


But people on this forum did not write subjects and when collapsed you see some text. How can i force there to be a subject

Natch 12-01-2002 10:27 PM

[QUOTE]Originally posted by LuBi


Thanks so much!

Now does anyone know how to make the [...] work like the plus sign and de-compress the post?

Natch 12-01-2002 11:49 PM

[QUOTE]Originally posted by dabean


As you requested in the thread for my forumhome hack I've attatched how I did "collapsed posts" hack that works across range of browsers, included are detailed changes to go from this hack to how I did it.
Browsers supported currently are Netscape 6/7, IE5+ windows and mac, Konq 2, Moz1.0+ and possibly Opera 7. :bunny:

Doing Netscape 4 support is simply painful when trying to support W3C semi compliant/compliant browsers. The problem is DIV's as generic block level containers are not allowed with Tables which are block level elements and NS4 doesn't allow direct visiblity manipulation of tables. :knockedout:

Also this modification means that browsers with no known DOM support won't see the collapsed table, this makes results in pre 4th generation browsers look better.

No support is provided for this alteration.

a43079 12-04-2002 11:14 PM

nice hack

Bison 12-11-2002 05:15 AM

Anyone got this working on v2.2.9?

If so, could you explain the changes you made to get this to work?

Icheb 12-22-2002 10:06 PM

You do not need to change anything, I just installed it on our board (2.2.9) and it works perfectly.

Pikok 12-28-2002 06:56 AM

erm the installer aint working :(

Icheb 12-28-2002 12:35 PM

What do you mean with "aint working"? I installed it on 2.2.9 and it's working perfectly. Maybe you can tell us which error messages you get?

heynurse 01-13-2003 09:08 AM

[QUOTE]Originally posted by havefun
u have nothing made wrong..

that's only a prob with the members who wrote no subject.

i don't know - have the same prob.. :knockedout:
we have to make them clear to write a subject,
cause of contracted posts....

s. havefun

edit:
ok i've tested it here now & here u don't need to write a subject..
there is always shown anything!

so this is modif. by bulletin.org

could anybody help us????????????? :banana:

Icheb 01-13-2003 09:17 AM

It's all explained in this thread, if you are too lazy to read the first pages I can't help you.

heynurse 01-13-2003 01:51 PM

[QUOTE]Originally posted by Icheb
It's all explained in this thread, if you are too lazy to read the first pages I can't help you.

saint_seiya 01-28-2003 06:49 PM

When my posts contract i dont see the text, what did i do wrong? :(

Icheb 01-28-2003 06:55 PM

Do those posts have a title? If not, there is a modification somewhere in this thread to have the first x chars of the actual post displayed, instead.
If they do have a title, make sure you correctly named the according variables in the template.

Drowned 03-19-2003 12:42 PM

I'm still having problems. The installation was great. Everything worked fine, but when I turn the option ON, it contracts EVERY post, even the ones I've never read :( Even after a day of not login in to my forum, all the new posts are still contracted when I login... anybody found a way to fix this problem?

M.C. 05-10-2003 10:11 PM

same problem! on my 2.3.0 post haven`t text what shoul be in $post[shortmsg] when i contract posts.... people says that it`s becose of 2.3.0

Need upgrate HACK!!! please!


All times are GMT. The time now is 02:23 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.01534 seconds
  • Memory Usage 1,819KB
  • 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
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

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

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