[DISC] DHTML Collapsible Forum Index MOD v1.1.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

[DISC] DHTML Collapsible Forum Index MOD v1.1.1

Post by markus_petrux »

IMPORTANT NOTICE:

Due to lack of time, I decided to officially discontinue further development of this MOD, including support.

One of the things that, at some point in time, delayed this MOD is I was waiting for CH210 to get released. When it was released, I had no time to spend here, and now... I do not have time to offer support either, to be honest.

I would be very happy, if anyone would like to take over the MOD. Just drop me a PM.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

MOD Title: DHTML Collapsible Forum Index MOD

MOD Version: 1.1.1

MOD Description: This MOD uses DHTML to replace the effect of the GET variable "c" on Forum Index (which requires to send a request to the server). So, it expands/collapses forum categories on the browser itself. It should work on latests versions of all major browsers, and is supposed to degrade correctly on non-supported browsers (ie: all categories remain open).

Notes: This MOD now includes two different implementations:
a) First one works for "standard" Forum Index.
b) Another one (in contrib folder) for Categories Hierarchy MOD 2.0.4.
Please, for further information, read Author Notes (MOD Header below).

...anyone planning to use this MOD with Categories Hierarchy MOD should be aware of this:
http://www.phpbb.com/phpBB/viewtopic.ph ... 44#1269044

ie. a new version of CH is comming :!:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Known Issues:

At this moment, this MOD does NOT support sub-forums! (see author notes in MOD header, below).

By sub-forums I mean forums attached to forums.

If you try to use this MOD with sub-forums, you'll figure soon why it doesn't work.

a) In forum index, they are rendered as forums rather than categories.
b) sub-forums generate several javascript errors.

As per this version, I'm afraid, it will not support sub-forums. As I still don't know how to deal with them.

Workaround:

Let's say you have this:
-Category 1
---Forum 1
-----Forum 2
-----Forum 3
---Forum 4
-----Forum 5
-----Forum 6

For ALL forums containing sub-forums (1 and 4 in the example):
1) Create a new category attached to its parent.
2) Attach ALL sub-forums to new category.

So, it should look like this:
-Category 1
---Forum 1
---New Category A
-----Forum 2
-----Forum 3
---Forum 4
---New Category B
-----Forum 5
-----Forum 6

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


MOD Headers:

Code: Select all

##############################################################
## MOD Title: DHTML Collapsible Forum Index
## MOD Author: markus_petrux < phpbb.mods@phpmix.com > (Markus) http://www.phpmix.com
## MOD Description: This MOD uses DHTML to replace the effect of the GET variable "c" on Forum Index (which requires to send
##     a request to the server). So, it expands/collapses forum categories on the browser itself. It should work on latests versions
##     of all major browsers, and is supposed to degrade correctly on non-supported browsers (ie: all categories remain open).
## MOD Version: 1.1.1
##
## Installation Level: (Easy)
## Installation Time: 10 Minutes
## Files To Edit: 5
##    index.php
##    language/lang_english/lang_main.php
##    includes/functions.php
##    templates/subSilver/subSilver.cfg
##    templates/subSilver/index_body.tpl
## Included Files: 5
##    templates/collapsible_forum_index.js
##    images/icon_up_arrow.gif
##    images/icon_down_arrow.gif
##    images/icon_sign_plus.gif
##    images/icon_sign_minus.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## phpBB related:
## - Tested with phpBB 2.0.10
## - It is highly recommened to use EasyMOD to install this MOD.
##
## MOD Script related:
## - This MOD Script has been written with EasyMOD in mind, so it tries to avoid conflicts with other
##   MODs that you may have previously installed against the same files modifies here.
## - That means it may be somehow complex to follow this MOD actions manually, so... I highly recommend
##   to use EasyMOD to install this MOD. :P
## - On the other hand, I have added several comments, aimed to help you if you can't use EasyMOD for
##   whatever reason. Anyway, think twice and take it easy ...also make backups, just in case. ;-)
##
## DHTML related:
## - It's based on the onclick event for TR tag and style.display attribute.
## - It should work on latests versions of all major browsers.
## - It has been tested and works on:
##   MSIE 6, Netscape 7.1, Mozilla 1.7.2, Firefox 0.9.3, Opera 7, Mozilla/Linux and Konqueror 3.x
##   No feedback on Mac browsers, yet, but probably works on IEMac 5 and Safari.
## - It has been tested and degardes gracefully on:
##   W3C Amaya, Hotjava 3, Netscape 4, Opera 5 and 6.
## - Degrading means its features are completely disabled, so users with legacy browsers or javascript disabled
##   will not notice this MOD is there, as Forum Index will behave as standard.
##
## Categories Hierarchy MOD (CH) related:
## - In the contrib folder, you'll find another version of this MOD that works with CH.
##   *** IMPORTANT *** It ONLY works with version 2.0.4 of Categories Hierarchy MOD !!!
## - Both MOD scripts shared the same Author Notes and MOD History sections.
##   Though, they have different names. The one on the contrib folder is suffixed by (CH).
## - For Categories Hierarchy MOD, it works when Index Packing is set to None or Medium.
##   However, it is disabled when it is set as Full. It also supports Split Categories on Index enabled or disabled.
##   *** WARNING ***
##   PROBLEM: It does NOT support sub-forums !!!
##   Problem with categories as sub-forums is they are rendered as forums. TBH, at this time, I don't know
##   how to deal with this layout (I mean, a reasonable approach). Maybe for next version. ;-)
##   WORKAROUND: you should create a new category and convert the current category/sub-forum as a plain forum
##   under (attached to) that category.
##
##############################################################
## MOD History:
##
## 2004/09/07 - 1.1.1
## - Fixed bug with CFI cookie names. Solves a problem with initial categories state for CH version.
##
## 2004/09/06 - 1.1.0
## - Added support for Categories Hierarchy MOD (CH v2.0.4). Please, read author notes (above).
## - Almost all javascript code has been re-written with a more Object Oriented approach.
## - Added CFI options panel, allows expand/collapse all, and save/restore additional state.
##
## 2004/08/22 - 1.0.3
## - Added check for display attribute support to the onload event.
## - Fixed management of the display queue.
##
## 2004/08/22 - 1.0.2
## - Added state persistence using cookies.
##   It will not collapse a category when expanding another one. And it will remind which categories are
##   expanded between sessions (using cookies). So, the end-user will be able to set the state of the
##   forum index exactly as he/she wishes.
##   The expand/collapse effect will work on all supported browsers and, for non-supported browsers,
##   degrade to standard behaviour. ie. all categories remain open and the GET var c=xx is not disabled.
##
## 2004/08/20 - 1.0.1
## - Fixed an issue with display='block'. Firefox failed to display correctly the row.
##   It now uses display=''. Works with IE, Firefox, Mozilla 1.7+
##   For browsers supporting display attribute, the GET var c=xx is disabled.
## - The display attribute is not supported by Opera(*) and legacy browsers. In such case,
##   the categories are initially opened ...and the GET var c=xx is enabled.
##   Note(*): Opera 5/6 has the display attribute, but can't be changed !!!
##
## 2004/08/20 - 1.0.0
## - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

Code: Select all

##############################################################
## MOD Title: DHTML Collapsible Forum Index (CH204)
## MOD Author: markus_petrux < phpbb.mods@phpmix.com > (Markus) http://www.phpmix.com
## MOD Description: This MOD uses DHTML to replace the effect of the GET variable "c" on Forum Index (which requires to send
##     a request to the server). So, it expands/collapses forum categories on the browser itself. It should work on latests versions
##     of all major browsers, and is supposed to degrade correctly on non-supported browsers (ie: all categories remain open).
## MOD Version: 1.1.1(ch204)
##
## Installation Level: (Intermediate)
## Installation Time: 15 Minutes
## Files To Edit: 7
##    index.php
##    language/lang_english/lang_main.php
##    includes/functions.php
##    includes/functions_categories_hierarchy.php
##    templates/subSilver/subSilver.cfg
##    templates/subSilver/index_body.tpl
##    templates/subSilver/index_box.tpl
## Included Files: 2
##    templates/collapsible_forum_index.js
##    images/icon_sign_plus.gif
##    images/icon_sign_minus.gif
##############################################################
Last edited by markus_petrux on Mon Feb 13, 2006 3:55 am, edited 23 times in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

Please, if you need to adapt this MOD to anything else, just ask.

This way I could include a contrib folder with such requests.


Thanks
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
User avatar
dinoman1989
Registered User
Posts: 21
Joined: Thu Jun 10, 2004 6:02 pm

Post by dinoman1989 »

OMFG man that kix0r ass0r!!
gj!!!!
Free Forum Hosting with phpBB, File Hosting at iFobos (ifobos.com)
Thanks :D


_________________


"Over the years, the United States has sent
many of its fine young men and women into great peril to fight for
freedom beyond our borders. The only amount of land we have ever asked
for in return is enough to bury those that did not return."--Colin Powell

Image
MIS-ONE
Registered User
Posts: 82
Joined: Tue Dec 24, 2002 9:21 pm

Post by MIS-ONE »

Any chance in making a vertical menu of some sorts? Looks very good!
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

Sorry, I made a mistake with the file name. Now, fixed.

MIS-ONE wrote: Any chance in making a vertical menu of some sorts? Looks very good!

What do you mean by "vertical menu" exactly?
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
A.I. BOT
Registered User
Posts: 1848
Joined: Thu Apr 17, 2003 11:43 pm
Location: Newfoundland, Canada
Contact:

Post by A.I. BOT »

vertical meaning stright up i guess

nice mod
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

It doesn't work correctly in FireFox. If I were you, I'd try out different settings for display in the style sheet to see what works best. I'm using 'show' in my Admin userlist MOD and it seems to work on all browsers.
Eric
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

ZIP updated to version 1.0.1 :!: :!: :!:

Fixed an issue with display='block'. Firefox failed to display correctly the row. It now uses display=''. Works with IE, Firefox, Mozilla 1.7+

For browsers supporting display attribute, the GET var c=xx is disabled.

The display attribute is not supported by Opera(*) and legacy browsers. In such case, the categories are initially opened ...and the GET var c=xx is enabled.

Note(*): Opera 5/6 has the display attribute, but can't be changed !!!
Opera7 solved this issue, I believe.
~~~~~~~~~~~~~~

Eric, your approach with admin_userlist fails with opera (and legacy browsers). Opera5/6 has the display attribute, but can't be changed. Other legacy browsers don't support the display attrib, so they can't change it.

Firefox supports the getElementById(obj).style.display attribute. Now, I have discovered using 'block' works if the row has one cell (I used this approach with the DHTML Slide Menu for ACP MOD), however, if the row has more cells, Firefox seems to be fooled. So, I decided to use an empty string, which defaults to visible.
Last edited by markus_petrux on Fri Aug 20, 2004 5:08 am, edited 1 time in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
theanimewizard
Registered User
Posts: 646
Joined: Tue Jul 08, 2003 9:24 pm
Contact:

Post by theanimewizard »

Is it the stuff under Site Navigation ?

If so, thats so freaking coooool!

Request: Option to close the expanded thing... cuz u cant open it but not close =[ u know like in vbulletin
Last edited by theanimewizard on Fri Aug 20, 2004 4:55 am, edited 1 time in total.
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

Now I have tested several browsers...

a) Disables the GET var c=xx AND expands/collapses Index Categories with:
IE, Firefox, Mozilla 1.7+

b) Enables the GET var c=xx AND does NOT expands/collapses Index Categories with:
Amaya, Hotjava, NS4, Opera5, Opera6.


Probably works as (a) Opera7 and Konkeror. Anyone can confirm this? Thanks ;)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

theanimewizard wrote: Is it the stuff under Site Navigation ?

Nope, that Menu was an experiment and is part of the portal, not exactly phpBB.

The Demo for this MOD is the forum index page:
http://www.phpmix.com/phpBB2/index.php

My apologies for the confusion. Now I have updated top post with correct URL. Sorry.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 »

I love this mod,but i have big request,if there a way to allow users to "define" settings,like what forums they want to be collasped or if they want dhtml forum index
Whos missing up my sig?
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

Shof515, that sounds reasonable. I'm going to think about an approach to achieve this. Maybe based on cookies and (very) easilly selectable.


.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
tm6tech
Registered User
Posts: 166
Joined: Mon Apr 14, 2003 1:51 pm

Post by tm6tech »

Excellent idea.

I will watch this one and install it later.
markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux »

Hi, all. I'm working now to add state persistence.

It will not collapse a category when expanding another one. And it will remind which categories are expanded between sessions (using cookies). So, the end-user will be able to set the state of the forum index exactly as he/she wishes.

The expand/collapse effect will work on all supported browsers and degrade to standard behaviour (all cats open and GET var c=xx enabled) for non-supported browsers.

Just a question, though...

I'm not sure if current name for this MOD is the best. So, I could change the MOD script accordingly before uploading the new stuff, if anyone could give some ideas on it. Suggestions are greatly appreciated. :)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)
Locked

Return to “[2.0.x] MODs in Development”