replacing prettyphoto, other scripts…
-
CreatorTopic
-
December 29, 2012 at 4:15 am #1853
Israel Curtis
ParticipantSo I’d prefer to use a different lightbox with standard post galleries, but I’m not seeing a clear way of doing so. I found all the registering going on in /framework/frontend/functions/general.php, so I thought I’d just “dequeue” them, so in the wp_head hook I used:
wp_dequeue_script('prettyphoto'); wp_dequeue_style('prettyphoto');
but this resulted in javascript console errors, as prettyphoto was still being called in themeblvd.js (/framework/frontend/assets/js/themeblvd.js) – and I don’t see any mechanism for overriding these functions. Do I have to override this entire themeblvd.js file? how?
The same problem exists for superfish, roundabout, etc. You have a confusing filter for $themeblvd_framework_scripts, which seems to be only about dependencies – I thought maybe by hooking this filter it would actually change which scripts were activated. That would be far clearer.
-
CreatorTopic
-
AuthorReplies
-
January 8, 2013 at 9:13 pm #2268
karlo
ParticipantSuperFish might not be that much of an issue for long. Check changelog for Bootstrap 3.0 https://github.com/twitter/bootstrap/pull/6342
We haven’t seen anyone using submenus in meaningful ways and the code necessary to make them work well is just too much overhead. Submenus just don’t have much of a place on the web right now, especially the mobile web. They will be removed with 3.0.
That is a fool talking but unfortunately also one of the 2 main devs. π I thought they left Twitter and wanted more “community” involvement. From that page I think they still run the show! Democracy will be chaos but they ALSO remove
.btn-inverse
– that is just evil…They dont seem to encourage a debate so may be JS need to find alternative? I hope only few share their trendy drop down hate. I think there will be protests AFTER 3.0 is out but then it will be too late.
-
This reply was modified 10 years ago by
karlo.
January 8, 2013 at 9:54 pm #2282Jason Bobich
KeymasterI don’t think most of the stuff there really is that big of a deal. Dropdowns were cool, but I never personally really ever even found use for them I don’t think. And I don’t believe I incorporated them anywhere in Jump Start or any shortcodes or other features. However, it’ll be kind of pain to update themes. I have a feeling Bootstrap 3.0 is going to come out just after I’ve updated everything.
January 8, 2013 at 10:25 pm #2290karlo
ParticipantWell I agree with the slightly insulted comment about Bootstrap now heading towards being “mobile framework”. With such insane popularity it is bold to say they have seen no use for sub-menus. WordPress would just deprecate, these people “nuke”, lol.
I was actually thinking you used dropdowns part in normal navbar but I guess not or you would have freaked out π I see some JS going on now I check but must be old SuperFish doing its thing. Because we are not starting from a blank sheet in WordPress this sub-hate is of less importance.
Yep, updates I was also thinking about. There is also a 2.3 path! If you think about old themes it would probably be best to wait for 3.0. And then 3.5… They say nothing clear about release but seem to sprint ahead. Not that bad for JS as it is selective, you dont promise 100% support for whatever BS, not bad for uses at least, but those who use vanilla Bootstrap and go all out including various add-ons to BS might have to redo some things. They will be the ones complaining.
Best to keep eye on them π
January 8, 2013 at 11:11 pm #2294Jason Bobich
KeymasterYeah, I’ve been using Superfish forever. It just keeps working with every update to jQuery, and works perfectly with the markup structure WordPress uses for its
wp_nav_menu
function.Bootstrap now heading towards being βmobile frameworkβ
Are you just getting this from quasipickle’s comments/assumptions? This notion seems awfully strange, with the whole idea behind “responsive” design being that the site works on all resolutions, with that including mobile, desktops, and everything in between.
So, yeah, it does seem odd that they would say “Submenus just don’t have much of a place on the web right now” — Seems to me just about every client has tons of content and organizing things within submenus is about as popular as ever. Kind of does make you wonder where they are headed, I suppose.
January 8, 2013 at 11:59 pm #2295karlo
ParticipantYes but there are different views. Some might see BS as a “app”/mobile thing. Who are they targeting? BS surves many purposes. They say “web development” on front page but that does not exclude mobile “app” buidling.
How to do proper navigation I also think is question no. 1 on all platforms. Most seem to suck in one way or another. May be they should improve or expand on drop down idea instead of nuking. Like http://lab.hakim.se/meny/ or what ever. Old school drop downs might not be hot but they are effective. Adv. menu like Ubermenu is related for a reason. Megamenu might be an idea for BS!
We dont have to care that much when BS is just one layer and BS is bigger than whims of devs. Ton of non-app or pure website dev. interest as well so limits to how much they can stray even if they should have focus on apps.
But look at button menus http://twitter.github.com/bootstrap/components.html#buttonDropdowns so cute!!! In WP world where we think fat navbars and custom menus such featuers are nifty to have. Pretty sure these things will be gone as well. Depend on drop down script.
-
This reply was modified 10 years ago by
karlo.
January 10, 2013 at 8:35 pm #2372karlo
Participanthttps://github.com/twitter/bootstrap/pull/6342#issuecomment-12063240
However if you are developing a new website TODAY and still want dropdown navigation? To me that’s just being silly!
Another random comment but that simplified and totally wrong view is what I am projecting in to BS devs.! Hopefully just paranoid π
Btw, check his numbers which he use as argument WHY drop down is backwards. Up to 30% of his visitors come from non-desktop browsers. Ok, they need to have a good experience but that leave how many percentages left? I think the world move much slower than the impression hipster, or just graduated in “Mobile/Table” class, give. Poor desktop experience or conveniently bend site to “mobile first” craziness should be as unacceptable as having to make secondary site just for mobile browsers. Or remove content because it cannot be presented <1000px. Seeking solutions is better than excluding with one liners. Of course 100% depending on each site but limiting navigation option is not good.
January 10, 2013 at 9:15 pm #2378Jason Bobich
KeymasterYeah I personally don’t see what all the fuss is about on the dropdowns. I think dropdowns are actually pretty cool all the way down to mobile. Just look at how the dropdown menus fold up in Jump Start’s default theme. I think having them in Bootstrap is making things more complicated for other aspects of the framework and it will be easier to just take them out, and they’re just justifying that.
Just remember that you don’t need to depend on Bootstrap for everything. There will always be ways to accomplish just about everything.
January 17, 2013 at 8:29 pm #2695karlo
ParticipantMy paranoia about unnecessary mobile craziness got a snack π https://twitter.com/twbootstrap/statuses/291832693354811392
Bootstrap 3 will be mobile-first when released.
What that means beside being hipster modern I dont know. Paranoia dont need to know, heh. Or I cant know because “there is no mobile first or last – everything should work and not bend over to other devices!” is all I can understand.
But first they release version 2.3. Glad I dont have to care that much about theme updates! May be some of the older themes will be better off with 2.3? Questions…
ChitChat.
More interesting I think I managed to kick SuperFish out. At least for a regular navbar. First remove load then in own themeblvd.js
// Activate Superfish // $('ul.sf-menu').superfish().addClass('sf-menu-with-fontawesome'); $('ul.sf-menu').addClass('sf-menu-with-fontawesome'); // NEW, still want class $('ul.sf-menu li.sub a:first-child').append(''); // NEW, still want icons!
For Fontawesome purposes there is no need to remove everything starting with “sf”. Will complicate things. More is better π
As a million other scripts SuperFish is not 100% compatible with latest jQuery 1.9 btw. so another reason to say good bye. Just the .browser detection thing http://api.jquery.com/jQuery.browser/ and migrate script fix this but technically it is not great to rely on deprecated functions. Not just deprecated actually, removed!
January 17, 2013 at 8:37 pm #2697karlo
ParticipantOh damn.
I forgot to say that “sub” part of
$('ul.sf-menu li.sub a:first-child')
is a “sub” class I added manually to custom menu. To target a sub-menu and not add sub-menu icons to all entries.
To be continued I think. But it can be done.
January 17, 2013 at 9:16 pm #2700Jason Bobich
KeymasterJust a heads up on this for your information. — I have fixed Superfish to work with jQuery 1.9 already for the next framework update (just involved commenting out some fixes they had in there for some IE6/7 hacks). Also, in the next framework update you will be able to use a filter to turn off Superfish from your functions.php (I think I explained this previously in this topic), and then proceed with your own scripts in your own javascript file, opposed to messing with themeblvd.js.
January 17, 2013 at 9:27 pm #2701karlo
ParticipantYeah I know but had to fiddle anyway π Themeblvd.js should be more or less static or transparent to other activities I think.
Good you change script, SuperFish is over 4 years old so probably wont get updated.
One of things I dont understand about jQuery is there are no build in natural “fix” for what SuperFish and also hoverIntent does. I have searched for replacements but not found much. Guess why these scripts are still all over the internet. I think some CSS transition, background ease in or whatever, is good enough these days so that is why SuperFish is relevant to look at. Speeeeed is friend of mobile stuff, heh.
February 14, 2013 at 12:35 am #4063karlo
ParticipantWas wrong about SuperFish, back with a punch https://github.com/joeldbirch/superfish/
Big new features in v1.5.2
You can now require a click to open submenus, and click again to close them. Just set useClick option to true (is false by default).Support for animations when closing submenus. Added animationOut and speedOut options.
Has always worked on iOS, but now supports Android and (possibly) other touch screens, too. Behaves like it does on iOS: first tap acts as hover and opens submenu, second follows link (unless using the new useClick option, in which case the second click closes the submenu). Keyboard and hover functionality works as normal. Thanks to Maarten Machiels for his valuable feedback on this.
I tried superfast test on normal desktop browser, with the viewport magic so it only kick in at < 768 Works though acts a bit funky with no touch. His demo site does the same http://users.tpg.com.au/j_birch/plugins/superfish/ See "Require click" under examples.
February 14, 2013 at 12:42 am #4066Jason Bobich
KeymasterVery cool. Maybe I can implement some kind of feature that allows items to be selected as click only from the WordPress menu builder. — something to look at later.
February 14, 2013 at 1:02 am #4068karlo
ParticipantYep very nice. Now I check again with Chrome menu works fine so I guess there is a Firefox issue when menu is used on normal desktop browser with “useClick:true” Seems like it set opacity to 1 but leave display: none and visibility:hidden – until you click 1 more time.
He just updated script 30min ago because of a IE issue so to be continued π
February 17, 2013 at 9:28 am #4192karlo
ParticipantWeeee, now Firefox approved. Click feature also match great on desktop π Different behavior might be best though. Hover habit is strong!
Big bug fixes in v1.5.4
The useClick feature now works reliably in all browsers, including all versions of IE (which was buggy in Superfish v1.5.3).
Has always worked on iOS, but now fully supports all Android browsers. Kind of a big deal! Menus will behave like they do on iOS: first tap acts as hover (opens submenu), second tap follows link (unless using the new useClick option, in which case the second click closes the submenu). Keyboard and hover functionality works as normal. Thanks to everyone who helped me test and sent me down the right paths to solving this. @maartenmachiels, @wickynilliams, @Luoti, @malsup, @auntyfuzz.
-
This reply was modified 9 years, 11 months ago by
karlo.
-
This reply was modified 9 years, 11 months ago by
Jason Bobich.
-
This reply was modified 10 years ago by
-
AuthorReplies
- You must be logged in to reply to this topic.