Recent Topics

1 Nov 23, 2007 21:36    

My b2evolution Version: Not Entered

How do I tell a skin what widgets in what order should be in the sidebar container? Any container actually... So far I've been able to duplicate an existing skin, but by dropping the idea of containers and doing it the old-fashioned way: coding what I want where I want. I was kinda thinking though that this defeats the purpose of widgets and containers because the end user will have to hack to alter the skin to suit their tastes. Problem is I haven't stumbled across anything that lets me say "for this skin use these widgets in those containers".

Is it possible?

2 Nov 23, 2007 21:44

Blog Setting -> Widgets -> Add Widget and use arrows to move Widgets.

As soon as a skin loads, it searches for containers. If you do a new skin, add containers where you want Widgets to appear. Often header, sidebar and footer.

Good luck

3 Nov 23, 2007 21:56

Okay understood, but not the point. If I make a skin publicly available and I want the calendar at the bottom of the sidebar how do I do that? How do I make it so that when you download my skin you see the calendar at the bottom immediately. Or leave out the calendar entirely. In other words how do I set up the default widget configuration for a skin?

At this point it seems like I simply can't do that. It seems that if I use

skin_include( '_sidebar.inc.php' );

I get a default configuration that is not what I want it to be. AFTER I install and select the skin I can tweak the widgets to be what I want. But not before?

4 Nov 23, 2007 22:01

I got the notion you wanted to know something else B)
AFIK the order is determined by the blog and stored in the database. Therefore you can make an urgent recommendation about which Widgets to use and in which order, but it's my blog and I will determine what to do with it. :lol:
I guess a new blog (not skin) has some default Widgets to go with it.

5 Nov 23, 2007 22:21

That's another thing I'm noticing: widgets are tied to the blog - not the skin. So given that it makes sense that the blog owner picks the widgets. I don't see how it logically follows that the skinner shouldn't be in a position to say "this skin comes with these widgets in these location", so maybe I should do a feature request along those lines. Like the ability to add an array to a container that defines what the skin starts with. The skinner would have artistic control over the initial product, and the user would be able to do what they want with it.

On to plan B then! Gotta figure out how to call a specific widget in a specific location in the sidebar ;)

Thanks!

6 Nov 23, 2007 22:34

Guess you just hit a limitation of widgets and skins, there's a few others as well, the main one is your skin cant suggest specific html for specific plugins.

You can still use $Plugins->call_by_code( plugin_id, params ) ... or whatever it's called ... to arrange the plugins per skin, and even to set the html per plugin, but then you lose the widget ability for the user ... smidge self defeating :(

The good news is that widgets are in their infancy, so things can only improve :D

¥

7 Nov 23, 2007 22:44

¥åßßå wrote:

The good news is that widgets are in their infancy, so things can only improve :D

¥

Yeah that's why I oughta go do a feature request. For now I'm going to bring some skins back from the dead even though I won't be able to faithfully both reproduce what was AND maintain forward coolness. Mostly basin++ because I dig it, but in general just to have something ready for after a stable comes out.

8 Nov 23, 2007 23:00

EdB wrote:

Yeah that's why I oughta go do a feature request.

I look forward to hearing the FG groan over the ponies that are growing into shire horses :D

As an aside, good to see you more active .... I think throwing Topanga off a cliff has helped yah :roll:

¥

9 Nov 23, 2007 23:01

What about an XML file with the designer's choice:

<XML>
<container id="Top">
  <widget>Blogroll</widget>
</container>
</XML>


and a button at installing skins: "accept skin widgets".
This way it's similar to the preview picture (also provided by creator).

10 Nov 23, 2007 23:51

That'd be cool for when the skin was installed the first time, but then the admin would want to change the default install of the skins widgets so they only have to do it once .... and the shire horse gets a smidge fatter ;)

An xml file of "suggestions ( and "features" )" is cool though as the info could be used in lots of ways ;)

¥

11 Nov 24, 2007 09:02

I am going to hang on my idea of the XML file. You can add a skin version (>=2.1 or <2.1) so the skins section doesn't need to portray skins it cannot load anymore.
For the other thing: I'd rather ride a fat horse than having to add a Widget and then pressing an arrow key for ten times. :roll:


Form is loading...