- This topic has 40 replies, 4 voices, and was last updated 15 years, 10 months ago by imported_Ryan.
-
AuthorPosts
-
December 29, 2008 at 6:54 pm #506malcalevakModerator
It’s me again. I had some free time, so I asked Ryan to send me a copy of his latest beta. I’ve integrated a lot of changes I’d made previously, as well as several new options.
As with any beta, or heck, any plugin, use this at your own risk. I’ll try and help out if you’ve got a problem, but I make no guarantees.
I’ve attached a copy of the file here (since when was file posting turned on?), but you may also download it <a href="http://www.transientmonkey.com/multi-level-navigation-plugin/multi-level-navigation-plugin-v1.3.3.zip">here</a>.
A brief summary of the changes are as follows:
Maintained Usage of WP_PLUGIN_URL (from 1.3.2 beta) and added handling for pre-2.6 WP
Addition of options for JS created sub-menu arrows and dropshadows.
Initialization code for suckerfish menu moved to suckerfish_init.js.php – uses php so we can pull the speed ,arrows,and shadows options, might this recreate a similar style.php glitch?
Initialization code for tabber moved to tabber-init.js
add_options_page returns $page variable that we can utilize with admin_print_scripts hook to minimize extraneous javascript loads on unnecessary pages.
All frontpage JS enqueued and hooked with wp_print_scripts
All admin JS enqueued and hooked with admin_print_scripts-{page_hook} where {page_hook} is value returned by add_options_page
tabber CSS moved into example.css and renamed admin.css
Moved declaration of menuitem and css to top of page.
archivesmonthsdropdown() and archivesyearsdropdown() utilize additional current_page_item class to highlight in dropdown
pagesdropdown() theoretically adds class "has_children" to elements with sub-menus, needs further testing
pagesdropdown2() manually inserts ">" when sub-menus found.
suckerfish class added to suckerfishnav for use with superfish.js, sf-menu class retained for ease of transition from current CSS
Utilizes rewritten keyboard navigation script requiring jQuery.I am running WP 2.7, but I believe the plugin should work with WP 2.2+. If it doesn’t, let me know what version of WP you’re running, and as much useful information you can provide as possible.
There may be problems with the "has_children" class and my new keyboard navigation script, so please let me know if these don’t work for you.
For a demonstration of the current beta in action you can check out my blog at <a href="http://www.transientmonkey.com">TransientMonkey.com</a> though visibly I don’t think you should notice much of an appearance change if you saw my last beta.
Hope you enjoy it.
December 29, 2008 at 11:08 pm #4421imported_RyanMemberThanks malcalevak ” title=”Smiley” />
[quote:2cyculn6]since when was file posting turned on?[/quote:2cyculn6]
December 29, 2008 at 11:53 pm #4422imported_RyanMemberThe keyboard script isn’t working [s:hay8w5z6]and it isn't much use as it requires jQuery to work unfortunately [/s:hay8w5z6] [i:hay8w5z6]EDIT: I changed my mind, it isn’t that critical that the keyboard navigation script works without jQuery[/i:hay8w5z6]
I’ve tried the keyboard script with both animations on and off but had no luck.
Yikes, even the suckerfish script is missing. We can’t rely on jQuery to power everything, it adds way too much load to pages and isn’t compatible with a lot of other scripts.
The plugin doesn’t work in IE6, IE5.5 or WinIE5 if you don’t have the Superfish or keyboard script running.
I’ll get to work on a new plugin and see if I can implement the arrow functionality into it.
December 29, 2008 at 11:55 pm #4423imported_RyanMemberI see you have registered all the scripts properly now too! Thanks ” title=”Smiley” />
December 30, 2008 at 12:21 am #4424imported_RyanMemberHere is a demo of the keyboard script not working … https://geek.hellyer.kiwi/demo/test/wordpress/
December 30, 2008 at 12:38 am #4425imported_RyanMemberUnfortunately the changes you made to the superfish script will trigger the same bug seen in the style.php file. We can get around that by just creating a bunch of extra scripts and pulling them in one by one instead of generating them on the fly. I think it will probably run a little quicker too as it won’t need to call the wp-blog-header.php file an extra time.
December 30, 2008 at 1:15 am #4426imported_RyanMemberThe has_children class works really nicely on the Pages dropdowns, but it doesn’t work with categories. However it seems that one of the newer versions of WordPress has started supporting a class of ‘children’ anyway, so I’ll change the script to use that class instead so that it is consistent between the two and I’ll add it to the Pages option as well.
December 30, 2008 at 4:41 am #4427imported_RyanMemberI’m confused about this stuff:
[code:2xg5cdc6]function categoriesdropdown() {if (is_category()) {$suckerfish_class=’ class="current_page_parent current_page_item"’;} echo ‘<li’.$suckerfish_class.’><a href="">’ . get_option(‘suckerfish_categoriestitle’) . ‘</a><ul>’ , implode("></a>n<ul",explode("</a>n<ul",str_replace("t",”,wp_list_categories(‘title_li=&exclude=’. get_option(‘suckerfish_excludecategories’).’&echo=0′)))) , "</ul></li>n";}[/code:2xg5cdc6]What do the /n and /t codes do?
December 30, 2008 at 5:18 am #4428yohaneswMemberHi there, i’ve downloaded v1.33 and try it in my site, apparently this new beta 1.33 doesn’t work at all in IE6 at my test site: http://www.yohaneswahyudi.com/test
It is working before with the old version v1.07. any idea how to fix this?
December 30, 2008 at 7:06 am #4429imported_RyanMember[quote:18wuidiq]It is working before with the old version v1.07. any idea how to fix this[/quote:18wuidiq]
There is no suckerfish script in this plugin. You will need to manually add it to your theme for it to work or you could try turning on animations or keyboard navigation.
I’m working on a new version will fixes all of this stuff and includes some extra new features. It’s quite buggy right now though.
December 30, 2008 at 1:46 pm #4430malcalevakModeratorHeh, it seems I introduced far more bugs then I’d expected…gonna need to work on that.
I’m also reminded of why I so hate IE..stupid inability to follow standards…
I’ll see what I can do.
December 30, 2008 at 4:21 pm #4431malcalevakModeratorOk, I’ve had a bit of time to look over everything brought up so far, and here are some thoughts. Feedback/ideas are of course welcome.
@yohanesw: I just checked your site in IE6, I assume the reason it was working was because you were running 1.07?The rest is mostly @Ryan, but others feel free to jump in:
I like using jQuery, it’s ridiculously easy to write for, gives you a huge amount of capability, and is pretty small. Of course pretty small is relative, if you’re already using jQuery for something (K2 uses it, as do numerous other plugins, themes, etc) then not using it is pretty silly. Of course, if you don’t fall into that category, taking on an extra 31kb is a bit much for certain things. If you’re able to enable gzipping for JS files this is actually cut down to 15kb. Depending on who you talk to 31kb could be nothing or a lot, the same with 15kb.The old keyboard navigation for me crapped out after it got maybe 2 levels deep, which is why I rewrote it, and jQuery made that a lot easier. And guess what? It works on your site too! You just need to change your CSS from sfhover to sfHover….sorry, forgot to mention that. I’m somewhat relieved it was that simple to fix. If you’re wondering why I made the change, I believe it was because the superfish plugin used it, and I figured a simple character change in the CSS was easier then changing the superfish code.
In regards to the style.php and superfish_init.js.php bugs, I’ll have to look into this some more, creating "a bunch of extra scripts" seems too cumbersome, and we’d need a lot to cover all the current settings. I doubt calling wp-blog-header.php is anything more than negligable, it’s ridiculously tiny and doesn’t appear to involve much processing. I’ll look into alternatives, but have you been able to discover more about the cause of the problem?
And with the has_children class, I can’t seem to figure out categories either, though I have some thoughts on how to rewrite that section. Can you elaborate on the ‘children’ class newer versions of WP supposedly support? I saw in mine that categories did have a <ul> assigned a ‘children’ class if they had children, but I’m not sure I see how that is especially useful for assigning CSS to it’s parent <li>, it also doesn’t appear for pages (or am I missing something?). Or are you talking about something else entirely?
n is a linebreak, t is a tab. I removed them initially to make it easier to process the code, and then I reinserted a few to try and make the html more readable. I suspect I failed on the readable part, but it worked at forcing in a ">" if it found children. I didn’t realize I’d left in the code for categories that did that.
I seem to have forgotten that dropdowns in <IE7 needed JS to work, and since I’ve been concentrating so much on the nice flowing dropdown I forgot to accomodate for just a plain old basic dropdown. Whoops. I do find it a bit odd that (assuming it’s working) the keyboard navigation plugin seems to cover for this, but since that needs jQuery…
I’ll see if I can come up with an alternative that doesn’t use jQuery for simple keyboard navigation and basic suckerfish.
December 31, 2008 at 3:00 am #4432imported_RyanMember[quote:1gtfs9na]I like using jQuery, it’s ridiculously easy to write for, gives you a huge amount of capability, and is pretty small. Of course pretty small is relative, if you’re already using jQuery for something (K2 uses it, as do numerous other plugins, themes, etc) then not using it is pretty silly.[/quote:1gtfs9na]
Not everyone wants to use a javascript framework at all though. Many sites don’t need it and the extra overhead becomes pointless. The son of suckerfish script is a lot smaller than the Superfish script too, so there isn’t much point using it when you can just use a regular old suckerfish anyway.
[quote:1gtfs9na]The old keyboard navigation for me crapped out after it got maybe 2 levels deep, which is why I rewrote it, and jQuery made that a lot easier. And guess what? It works on your site too! You just need to change your CSS from sfhover to sfHover….sorry, forgot to mention that. I’m somewhat relieved it was that simple to fix. If you’re wondering why I made the change, I believe it was because the superfish plugin used it, and I figured a simple character change in the CSS was easier then changing the superfish code.[/quote:1gtfs9na]
[quote:1gtfs9na]I’ll see if I can come up with an alternative that doesn’t use jQuery for simple keyboard navigation and basic suckerfish.[/quote:1gtfs9na]
Definitely don’t worry about the ‘basic suckerfish’. That has been done to death by others. The son of suckerfish technique is what the current plugin uses.
I don’t think it matters too much if the keyboard navigation requires jQuery. Those looking to keep the pages as small as possible probably wouldn’t be using it anyway. I can’t get it to work at all though, jQuery or no jQuery.
Since you’ve put so much effort into this I figured I’d better pull my finger out and actually start adding in all the extra features I’ve been saying I would for ages. I’ve said numerous times that I’d have a new version released before 2009 …. that gives me a grand total of eight hours so I’d better get to work! I’ve got most of the core work done so far including a massive rewrite of the admin panel, it’s looking a lot more professional now.
I’ll answer your other questions once I’ve got the new version posted for download … I can’t remember the details of the how wp_list_categories handles children but I’ll look it up.
December 31, 2008 at 3:14 am #4433imported_RyanMember[quote:keqxcz9c]Heh, it seems I introduced far more bugs then I’d expected…gonna need to work on that.[/quote:keqxcz9c]
Welcome to my world ” title=”Cheesy” />
This is why we have betas :p
[quote:keqxcz9c]I’m also reminded of why I so hate IE..stupid inability to follow standards…[/quote:keqxcz9c]
Actually, when IE6 was released I don’t think any other browsers had support for :hover on non link items either (I could be wrong). The particular issue here isn’t that IE doesn’t follow standards, it is that IE was not updated for a LONG time.
Annoyingly, the latest beta version of IE (version 8 beta 2) has worse support for :hover than IE7. They’ve introduced a fleet of new bugs which really screw things up. I sure hope they fix all of them before it is released.
December 31, 2008 at 4:01 am #4434malcalevakModeratorDid you try what I said about changing sfhover to sfHover? Since when I did that on your demo page it worked perfectly.
-
AuthorPosts
- You must be logged in to reply to this topic.