Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-08-2001 Last Update: Never Installs: 141
 
No support by the author.

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.
  • [high]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[/high]
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #222  
Old 03-08-2002, 07:05 PM
Dalius Dalius is offline
 
Join Date: Oct 2001
Location: Canada!
Posts: 255
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nvm, fixed
Reply With Quote
  #223  
Old 03-15-2002, 01:57 PM
cerebro's Avatar
cerebro cerebro is offline
 
Join Date: Dec 2001
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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

Reply With Quote
  #224  
Old 03-15-2002, 02:15 PM
cerebro's Avatar
cerebro cerebro is offline
 
Join Date: Dec 2001
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]
root/showthread.php

Step 1 of 2 FIND:


$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage");
Reply With Quote
  #225  
Old 03-15-2002, 08:19 PM
dxb's Avatar
dxb dxb is offline
 
Join Date: Oct 2001
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #226  
Old 03-16-2002, 02:23 PM
Arabian Arabian is offline
 
Join Date: Jan 2002
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wonderful Hack!!!

smooth installation on 2.2.4
Reply With Quote
  #227  
Old 03-23-2002, 06:01 AM
ZiRu$'s Avatar
ZiRu$ ZiRu$ is offline
 
Join Date: Jan 2002
Location: Manitoba, Canada
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i will try it out! Thanks alot!
Reply With Quote
  #228  
Old 03-25-2002, 06:25 AM
Figment Figment is offline
 
Join Date: Nov 2001
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #229  
Old 03-26-2002, 06:46 AM
Issvar Issvar is offline
 
Join Date: Mar 2002
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #230  
Old 03-29-2002, 05:12 AM
psx-dude's Avatar
psx-dude psx-dude is offline
 
Join Date: Oct 2001
Location: California
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have yet to get it the way we have here where the first thread is non-contracted in 2.2.4.
Reply With Quote
  #231  
Old 04-03-2002, 02:22 AM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pro hack, I wish I would have found it earlier.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04753 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete