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: 1.00, by dabean dabean is offline
Developer Last Online: Dec 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-08-2002 Last Update: Never Installs: 122
 
No support by the author.

This hack adds expansion and contraction support to the forum home page (index.php). The current version of this hack has been tested on vBulletin 2.3.2

Only supported browsers gain the ability to expand and collapse forum groups, non supported browsers do not gain anything, but no errors will be displayed.
Each users preference is saved to the database, additionally admins can select which forums are to be collapsed by default.

  • Browsers supported
  • Netscape6+/Mozilla0.6+
  • MS IE5+
  • Konqueror
  • Opera 7 support is included
  • Browsers unsupported
  • MS IE4 or earlier
  • Netscape 4 or earlier
  • Opera (version 6 and earlier)

Note: PHP 4.1.x or 4.2.x is required, PHP 4.0.x is now unsupported.

Instructions inside attachment.
Updated 4:18 PM 1/12/2002
- Packaged Post, Thread template Addon

Updated 7:53 PM 1/11/2002
- corrected installer

Updated 4:23 PM 1/11/2002
- Added DB support
- Added Per forum Collapsed Pref to admin cp

Updated 01/10/02 01:39am.
- Fixed missing line.

Updated 04/06/02 01:30am.
- Version 1.2
- PHP 4.1.x, 4.2.x support with or without register globals off.
- Performance tweeked javascript

Updated 06/06/02 11:20pm.
- Corrected templatecache bug

Updated 06/25/02
- Corrected formatting errors in readme

Updated 09/01/02
- vB 2.2.7 compatiblity statement, updated readme.

Updated 30/08/03
- vB 2.2.x and 2.3.x compatiblity statement, added new automatic testing script.

FAQ
Q: what exactly is Template_Option.txt?
A: Basically that exention was provided as a request to cover sites with the template modification that adds a "header" to each grouping.

Q: How do I show a forum depth greater than 2?
A: Open vB Admin cp set forum depth to your required level. Then create the additional templates. For template examples see https://vborg.vbsupport.ru/showthrea...465#post250465

Q: Can sub-forums be collapsed?
A: Yes. See the above answer for example templates.

Q: XYZ doesn't work help.
A: Check that all the template changes required have been made, 99% of problems are due to incorrect template alteration. Also use the cx_test.php to automatically check your installation!

Show Your Support

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

Comments
  #272  
Old 09-01-2002, 06:18 PM
herby herby is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.

I've pretty much followe the instructions to the letter, but no joy on the collapsing.

>> http://iafma.org/gm/forums/

Where are the obvious places to look under the hood?

Thanks,

Herby
Reply With Quote
  #273  
Old 09-01-2002, 07:20 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by herby
Thanks.

I've pretty much followe the instructions to the letter, but no joy on the collapsing.

>> http://iafma.org/gm/forums/

Where are the obvious places to look under the hood?

Thanks,

Herby
define more clearly what's wrong with the collapsing?

1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?

Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.

I would look at your site but the registration system requiring multiple accounts put me off.
Reply With Quote
  #274  
Old 09-01-2002, 07:40 PM
herby herby is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. No + - icons?

All solution steps checked.

I've just PMed a temp username/pass

Many thanks,

Herby

Quote:
Originally posted by dabean


define more clearly what's wrong with the collapsing?

1. No + - icons?
2. The icons exist but groups don't collapse?
3. Collapsed state is not remebered?

Solutions
1. Sounds very much like your missing a template check that
forumhome_expandcontract exists and that
forumhome_forumbit_level1_nopost contains "$expandcontract"
2. Check the template "forumhome_expandjscript" exists and "forumhome" contains $expandcontractscript.
3. Check "updateindex.php" is in your forums directory.

I would look at your site but the registration system requiring multiple accounts put me off.
Reply With Quote
  #275  
Old 09-01-2002, 08:10 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by herby
1. No + - icons?

All solution steps checked.

Many thanks,

Herby

Okay all required templates seem to exist on the defualt template set. So I'd now suggest that a code modification hasn't been made.
Firstly what PHP version?

Secondly does
PHP Code:
// expand collapse hack
require('./admin/getbrowser.php');
require(
'./admin/getforumview.php');
$BrowserDOM=GetBrowserDOM2();
$templatesused.=',forumhome_expandcontract,forumhome_expandjscript';
// end expand collapse hack 
Exist?

now does
PHP Code:
global $BrowserDOM$collapsedstate
Exist?

does
PHP Code:
if ($BrowserDOM==True) {
  eval(
"\$expandcontractscript = \"".gettemplate('forumhome_expandjscript')."\";");

Exist?

Is getbrowser.php in your admin directory?

What is the output of phpinfo.php (included in the vBulletin archive)?
If you don't want to post the output of phpinfo then PMing it is fine.
Reply With Quote
  #276  
Old 09-01-2002, 09:29 PM
herby herby is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops!

Running PHP Version 4.0.6

Will get that upgraded and see what happens.

Thanks,

Herby
Reply With Quote
  #277  
Old 09-01-2002, 09:36 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by herby
Oops!

Running PHP Version 4.0.6

Will get that upgraded and see what happens.

Thanks,

Herby
Open getbrowser.php change
PHP Code:
 function GetBrowserDOM2() {
  if (isset(
$_SERVER['HTTP_USER_AGENT'])) {
     
$htuagent trim($_SERVER['HTTP_USER_AGENT']); 
into
PHP Code:
 function GetBrowserDOM2() {
  global 
$HTTP_SERVER_VARS;
  if (isset(
$HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
     
$htuagent trim($HTTP_SERVER_VARS['HTTP_USER_AGENT']); 
Which should make it work.
Reply With Quote
  #278  
Old 09-01-2002, 09:53 PM
herby herby is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect. That did the trick.

I assume that after upgrading to the latest version PHP, I have to reverse the above again?

Cheers,

Herby

PS How can I make the forums collapsed by default?
Reply With Quote
  #279  
Old 09-01-2002, 10:42 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by herby
Perfect. That did the trick.

I assume that after upgrading to the latest version PHP, I have to reverse the above again?

Cheers,

Herby

PS How can I make the forums collapsed by default?
No, you don't need to undo the change $HTTP_SERVER_VARS is still supported on 4.1.x and 4.2.x. The reason I choose use $_server was to encourage upgrading to 4.1.x or newer.

Collapsing forums by default can be done in your admin cp by selected "collapsed" for the parent forum. Currently forums can't be collapsed based on usergroups.
Reply With Quote
  #280  
Old 09-01-2002, 10:58 PM
herby herby is offline
 
Join Date: May 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was getting the mysql 1054 error when navigating the forums.

Running the following seems to have cured that.

ALTER TABLE user ADD forumviewset varchar(250) NOT NULL default ':'


However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'

mysql error number: 1054
Reply With Quote
  #281  
Old 09-01-2002, 11:03 PM
dabean dabean is offline
 
Join Date: Oct 2001
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by herby
I was getting the mysql 1054 error when navigating the forums.
However. when setting the "collapsed" option in the parent forum via the CP, I'm getting this...

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: UPDATE forum
SET
styleid='1', title='iAfma.org Manifesto', description='',
active='1', displayorder='5', parentid='-1', parentlist='69,-1',
allowposting='0', cancontainthreads='0', daysprune='30',
newpostemail='forums@iafma.org', newthreademail='forums@iafma.org',
moderatenew='1', allowhtml='0', allowbbcode='1',
allowimages='0', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='1', countposts='1',
moderateattach='1', collapsed='1'
WHERE forumid='69'
mysql error: Unknown column 'collapsed' in 'field list'

mysql error number: 1054
The installer is designed for php 4.1.x or newer to.

You need to run "ALTER TABLE forum ADD collapsed SMALLINT DEFAULT '0' NOT NULL" to add the additional field to the database.
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:04 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.04508 seconds
  • Memory Usage 2,329KB
  • 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
  • (5)bbcode_php
  • (6)bbcode_quote
  • (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