Javascript Forum Menu Module
Posted by Joe Curia
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
javascript_forummenu_v1_04.zip | 10.6 KB | open | download | Joe Curia | 03/09/2007 | Read message |
February 21, 2007 10:30PM |
Registered: 15 years ago Posts: 1,301 |
EDIT - Now on version 1.04.
CMU Version [1.04]
This module will add a dropdown menu which can appear below or to the right of a chosen location and can appear when a visitor hovers over the location or when they click on it. These options can be set from the settings page. The default setting is to appear when a vistor hovers over the "Forum List" in the navigation menu.
Some menu coding is inspired by and borrowed from Maurice Makaay's Jumpmenu module. The dropdown javascript coding was developed by Ilya S. Lyubinskiy and can be found at [www.php-development.ru].
As always, requests for added/improved features are welcome, either email or post here (email included in readme).
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 13 time(s). Last edit at 03/09/2007 03:50PM by Azumandias.
CMU Version [1.04]
This module will add a dropdown menu which can appear below or to the right of a chosen location and can appear when a visitor hovers over the location or when they click on it. These options can be set from the settings page. The default setting is to appear when a vistor hovers over the "Forum List" in the navigation menu.
Some menu coding is inspired by and borrowed from Maurice Makaay's Jumpmenu module. The dropdown javascript coding was developed by Ilya S. Lyubinskiy and can be found at [www.php-development.ru].
As always, requests for added/improved features are welcome, either email or post here (email included in readme).
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 13 time(s). Last edit at 03/09/2007 03:50PM by Azumandias.
February 22, 2007 04:54AM |
Admin Registered: 17 years ago Posts: 8,532 |
This sounds like something that I wanted to add to the forum jumpmenu. On my site, I'm not using it, because of the MSIE bug which causes select boxes to always be drawn on top of everything. Since my site uses CSS drop down menu's, they would fall behind the select list :-( I'll check it out. Maybe I can use this one instead now. Thanks.
Edit:
BTW, I see this in the dropdown javascript code:
Are you sure you're allowed to ship the code with the module?
Edit:
I attached the Dutch translation for the mod.
Attachment is removed from this post. It's now part of the mod
Edit:
There's some stale code in the module:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Edited 6 time(s). Last edit at 02/28/2007 05:02PM by mmakaay.
Edit:
BTW, I see this in the dropdown javascript code:
// YOU MAY NOT // (1) Remove or modify this copyright notice. // (2) Distribute this code, any part or any modified version of it. // Instead, you can link to the homepage of this code: // [www.php-development.ru].
Are you sure you're allowed to ship the code with the module?
Edit:
I attached the Dutch translation for the mod.
Attachment is removed from this post. It's now part of the mod
Edit:
There's some stale code in the module:
$headtags = array();
$headtags = $PHORUM["DATA"]["HEAD_TAGS"];
Maurice Makaay
Phorum Development Team



Edited 6 time(s). Last edit at 02/28/2007 05:02PM by mmakaay.
February 22, 2007 09:38AM |
Registered: 15 years ago Posts: 1,301 |
By stale code do you mean that the line is not necessary? I am not familiar enough with php to know when something becomes obsolete, I have to rely on web searches to help me get where I want to go and sometimes I learn old code because of the age of the help I find. Can I remove that line then?
Thanks for the Dutch translation and the advice.
I kept the dropdown.js because of the further line:
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 1 time(s). Last edit at 02/22/2007 09:47AM by Azumandias.
Thanks for the Dutch translation and the advice.
I kept the dropdown.js because of the further line:
// (2) Use this code as a part of another product provided that // its main use is not creating javascript menus.And because this "product" is an enhancement of phorum and not a javascript product that can be used anywhere on any site, I feel it fits. I have emailed the author and am waiting for his opinion. I certainly don't want to trample on any feelings or copyrights.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 1 time(s). Last edit at 02/22/2007 09:47AM by Azumandias.
February 22, 2007 10:33AM |
Admin Registered: 17 years ago Posts: 8,532 |
Yes, you can remove the first line. As soon as you assign a new value to a PHP variable, the old one's data is lost. The first array will be created in the first line and deleted in the second line. It's safe to drop it.
I found the license a bit hard to understand, because it sounded ambiguous. If you're not allowed for some reason to use the library, then we could also use some code from the editor tools module for creating the popup. Probably not needed, but keep it in mind.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
I found the license a bit hard to understand, because it sounded ambiguous. If you're not allowed for some reason to use the library, then we could also use some code from the editor tools module for creating the popup. Probably not needed, but keep it in mind.
Maurice Makaay
Phorum Development Team



February 22, 2007 12:04PM |
Registered: 15 years ago Posts: 1,301 |
I have finished v1.01 with these changes:
- Changed name to Javascript Forum Menu Module from Title Forum Menu Module.
- Added ability to select the location where the menu appears.
- Changed default setting to appear when a vistor hovers over the "Forum List" in the navigation menu.
- Cleaned up the code per the suggestion from Maurice Makaay.
If there are any other locations where you would like the menu to be able to appear, please let me know and I will try to incorporate them.
The file above contains the latest version of this module.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 1 time(s). Last edit at 02/22/2007 12:19PM by Azumandias.
- Changed name to Javascript Forum Menu Module from Title Forum Menu Module.
- Added ability to select the location where the menu appears.
- Changed default setting to appear when a vistor hovers over the "Forum List" in the navigation menu.
- Cleaned up the code per the suggestion from Maurice Makaay.
If there are any other locations where you would like the menu to be able to appear, please let me know and I will try to incorporate them.
The file above contains the latest version of this module.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Edited 1 time(s). Last edit at 02/22/2007 12:19PM by Azumandias.
February 22, 2007 12:31PM |
Admin Registered: 17 years ago Posts: 8,532 |
Quote
If there are any other locations where you would like the menu to be able to appear, please let me know and I will try to incorporate them.
An idea: to be ultimately flexible, you could also allow for using an admin defined object id name to associate the menu with. So you can have some default options and one custom option, for which the admin can provide an id name. This can be put in a drop down menu, which shows all hard-coded options and one custom id option. Using some javascript, you can arrange for an extra form field for entering the object id to be displayed if the custom id option is selected.
I am working on some changes for the In Body Attachments module, where I present different "subforms" in the module settings, based on the selection in a drop down list. If you want to implement this and want a bit of example code, then let me know. I'll send you the settings.php example.
Maurice Makaay
Phorum Development Team



February 22, 2007 12:37PM |
Registered: 15 years ago Posts: 1,301 |
I would appreciate that settings.php example as that sound like a good idea.
My idea for allowing a custom location would ask the admin to choose "Custom Location" from the dropdown in the settings and type in a custom title, then ask them to add something like {PHORUM_MOD_JAVASCRIPT_FORUM_MENU_CUSTOM_LOCATION} anywhere in a template file that they would like the menu to appear. The menu would then use the custom title to display some text (Like "Forum Menu") wherever they put the variable (such as on the right side of the navigation bar).
BTW, you will need to update your dutch.php language file because I changed the name of the module. Sorry for the hassle.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
My idea for allowing a custom location would ask the admin to choose "Custom Location" from the dropdown in the settings and type in a custom title, then ask them to add something like {PHORUM_MOD_JAVASCRIPT_FORUM_MENU_CUSTOM_LOCATION} anywhere in a template file that they would like the menu to appear. The menu would then use the custom title to display some text (Like "Forum Menu") wherever they put the variable (such as on the right side of the navigation bar).
BTW, you will need to update your dutch.php language file because I changed the name of the module. Sorry for the hassle.
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
February 22, 2007 02:24PM |
Admin Registered: 17 years ago Posts: 8,532 |
Download the latest in body attachment module that you can find in my package archive. Look at the bottom of the settings.php for an example.
Another idea:
For the custom location, wouldn't it be easiest to not add anything to the output from the module? You can let the admin modify the template for it. AFAICS, all the admin would have to do to make it work is add an id="menu_parent" to the item in the page that has to be the menu parent. For me that would be all I'd need.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Another idea:
For the custom location, wouldn't it be easiest to not add anything to the output from the module? You can let the admin modify the template for it. AFAICS, all the admin would have to do to make it work is add an id="menu_parent" to the item in the page that has to be the menu parent. For me that would be all I'd need.
Maurice Makaay
Phorum Development Team



February 22, 2007 08:37PM |
Admin Registered: 17 years ago Posts: 8,532 |
Quote
As always, requests for added/improved features are welcome, either email or post here (email included in readme).
No problem ;-) I uploaded a new version of the mod to the first message in this thread (version 1.02). There's quite a list of changes in there. See the readme.txt for the exact changelog. I also added some points to the todo's.
For custom placement, I added a Custom option and a help text to the settings menu. IMO that is enough for allowing customized menu placement. I have used that to get the menu going on my website. The default options resulted in some weird problems because of the structure of my site. But with the new Custom option, I simply appointed the right id to one of the elements on my page and that was enough to get things going.
Maurice Makaay
Phorum Development Team



February 23, 2007 12:40AM |
Registered: 15 years ago Posts: 1,301 |
Quote
mmakaay
No problem ;-) I uploaded a new version of the mod to the first message in this thread (version 1.02). There's quite a list of changes in there. See the readme.txt for the exact changelog. I also added some points to the todo's.
For custom placement, I added a Custom option and a help text to the settings menu. IMO that is enough for allowing customized menu placement. I have used that to get the menu going on my website. The default options resulted in some weird problems because of the structure of my site. But with the new Custom option, I simply appointed the right id to one of the elements on my page and that was enough to get things going.
Thanks for all the work you've done to get this mod where it is. I will definitely be learning a thing or two from your code work.
The weird problems you were seeing might be related to the way my default works for now. It replaces all instances of {TITLE} with the id which can lead to more than one element with the same id. I will have to think on how to solve this for the default choices. It is of course not a problem with your custom id.
However I did run into a problem with your custom id. In the help you said to use 'id="javascript_forummenu"' but when I looked in your code you only had "forummenu". I have updated "forummenu" and "forummenu_child" to append "javascript_" to each in v1.02a above.
Also, in the readme you mentioned folders in a tree like structure. My code should do that. What it does is each folder has the square_bullet in front of it and each sub forum is indented. I also make it so the folders are not selectable (my personal preference) so that only forums can be linked. I can try to provide a demo if you'd like.
BTW, thank you also for the .htaccess work. I originally was including the dropdown.js but it would not work on my site. I did not know how to edit the .htaccess as it doesn't even appear when working from FrontPage (or should I not have admitted to using that program) :)
Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Sorry, only registered users may post in this forum.