Page 2 of 2

Posted: Sat Jan 07, 2006 7:33 pm
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

Posted: Sat Jan 07, 2006 7:51 pm
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

drop down with built-in plugins

Posted: Mon Jan 09, 2006 3:34 am
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

Posted: Mon Jan 09, 2006 4:24 am
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?

Posted: Mon Jan 09, 2006 5:45 pm
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

Posted: Mon Jan 09, 2006 8:41 pm
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

Posted: Mon Jan 09, 2006 9:26 pm
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

Posted: Mon Jan 09, 2006 11:32 pm
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?)

Posted: Tue Jan 10, 2006 12:26 pm
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

Posted: Sat Jan 14, 2006 6:35 pm
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

Posted: Sat Jan 14, 2006 6:41 pm
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.