Horizontal drop menus

Skinning and designing Serendipity (CSS, HTML, Smarty)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Internal plugins are prefixed with a "@", so this should work:

Code: Select all

{serendipity_showPlugin class="@serendipity_categories_plugin" side="hidden" negate="null"}
(in any way, the plugin is called "serendipity_categories_plugin", not "serendipity_category_plugin" :)

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Yee #$%@ hah it works!!!!!

Garvin, thank you, and if Josh is reading this, all your wishes are about to come true, just having some cross-browser issues, then I'll post a new theme and tutorial.

Cheers

Carl
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

drop down with built-in plugins

Post by carl_galloway »

Hi all,

I've uploaded a demonstration of the drop-down menu with plugins built-in for all to see. I've thrown it into the mt3-squash theme, and renamed it mt3-dropdown. Did this because so many of you are already familiar with the mt3 themes that it shouldn't take too much effort to work out what I've done, however a full tutorial will be posted over the next few days if you can wait.

As per usual this is not perfect, few minor annoyances (mostly cross browser related) still need to be fixed, but should give a reasonable idea of what is possible with s9y. You can see it in action at my themes site.

Cheers
Carl
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Nice job, Carl! And exactly what I was thinking of, too. Are you using Son of Suckerfish for those?

Although I notice the menu entries are duplicated in the sidebar. Are they supposed to be?
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Hi jude,

Yeah it is 'son of suckerfish', not the easiest to style, not because of the suckerfish, just lists in general. I have a feeling to get the complete control over appearance that some users want they may have to look at a javascript or differently coded menu but time will tell.

And yeah, you're right about the sidebar, but it demonstrates how tricky drop-downs are and why anyone who wants to use them is going to have to learn more about theming than they thought they would need.

There appear to be some bugs in s9y when we start doing this, I've set the sidebar to right within plugin configuration in admin suite, and used side="hidden" in serendipity_showPlugin, and there they both are, if I set the plugins to hidden in admin suite then I get the desired result.

I think before we can implement these drop-down into downloadable themes we need some extra scripting in the sidebar.tpl to kinda say if this plugin is active don't display it, because at this stage the drop-down has to be hardcoded. I don't want to restyle the left or right sidebar as a drop-down menu yet because too many items really does wierd things

The other thing, we may need to ask Garvin to build into the admin suite a 'required plugins for this theme' warning that won't allow a theme to be installed unless the corresponding plugins are also installed and set to hidden.

Its really messy, but if we get it right......

Carl
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Carl!
There appear to be some bugs in s9y when we start doing this, I've set the sidebar to right within plugin configuration in admin suite, and used side="hidden" in serendipity_showPlugin, and there they both are, if I set the plugins to hidden in admin suite then I get the desired result.
Could you elaborate this a bit? I don't really know what the problem is?

"Sides" can only be set within the admin plugin config - the "side" parameter for the showPlugin option only indicates the currently set side of a plugin, but does not set a plugin's side to that.
The other thing, we may need to ask Garvin to build into the admin suite a 'required plugins for this theme' warning that won't allow a theme to be installed unless the corresponding plugins are also installed and set to hidden.
Yes, this is aproblem I haven't wrapped my mind around yet. Actually, this is technically very challenging. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

Garvin,

Could you explain the serendipity_showPlugin side="left,right,hidden". If I set it to hidden it should only show plugins that are set to hidden in admin suite shouldn't it? If a plugin is set to left or right in admin suite, then it should not be visible in serendipity_showPlugin if the side isn't the same.

What I mean;
1. admin suite set to left, showPlugin set to left, should display sidebar and dropdown

3. admin suite set to left, showPlugin set to right or hidden, sidebar should display, dropdown should show nothing (error)

4. admin suite set to hidden, showPlugin set to hidden, sidebar shows nothing, dropdown works correctly

Does that make sense?

Carl
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

showPlugin should retrieve all the plugins set to the side you set as a parameter. You can only set the sidebar side of a plugin in the admin suite.

So if you've got two category plugins (because they're stackable), and you've got one set to the right sidebar and one set to the hidden sidebar, then calling showPlugin with "hidden" will (should) return the one set to hidden, but leave the other alone.

If you've got one category plugin, set to the right sidebar, and you call showPlugin with "hidden", it will (should) not return the category plugin. If you call showPlugin with "right", you'll get the category plugin, but it

The template itself may also return sidebars, through the same or other calls. (Garvin, does the sidebar go into a Smarty block?)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Judebert: No, the sidebar is returned by the Smarty function call, and not put into a variable, like $CONTENT is. So this should actually help.

About the rest, judebert is right exactly :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

I've posted the dropdown menu tutorial that I promised. Take a look.

Currently I have working inside my Andreas08 theme, which is not yet yeady for release, but hopefully will be in the next few days. Josh, if you're still reading this thread I put Andreas08 together as a possible replacement theme for your site, and if you're interested we'll need to talk and get a few of the little things ironed out so it meets your needs completely.

Cheers
Carl
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Carl, of course I am reading this threat. I am absolutely delighted and thrilled by all your work!

I will send you an email.
Post Reply