1 edb Dec 22, 2007 17:42
3 edb Dec 22, 2007 18:53
My good friend I'm simply not a fan of wikis, but please feel free to commit the content yourself if you see fit. Perhaps I should play there, but - really - I think wikis are just plain silly.
W? Is W widgets? I like widgets :) . Or is W wikis? I don't like wikis :( . Or is it waffles? I like waffles :) . Or is it warfare? I don't like warfare :( . Or is it witchcraft? I have no view on witchcraft, although sometimes witches are totally hot! Like especially when goth chicks pretend to be into Wicca ;)
In a different vehicle I've made my issues with 220 known, so I won't rehash them here. Or ANYWHERE. Suffice to say that I'm trying to see all the good that is present in the latest and greatest, and can hardly wait to see an 'officially stable' release. This is my first effort to share something I've learned. Hopefully it will help people make cool skins eh?
Next up: showing off what we can all do with the actual post content. I'm looking forward to that because I will learn (and share!) a lot. But first I must learn. And tinker!
4 yabba Dec 22, 2007 19:20
You'll be pleased to know that all widgets now have 3 extra settings ( in cvs )
widget_name : gets shown in the widget list [ Free HTML ( widget name ) ]
widget_ID : this is the replacement value for $wi_ID$ in the same way $wi_class$ is currently replaced [ id="$wi_ID$" -> id="<your groovy personailised ID>" ]
widget_css_class : added to current $wi_class$ replacement [ class="$wi_class" -> class="widget_core_freehtml <widget_css_class>" )
¥
5 edb Dec 23, 2007 13:38
¥åßßå wrote:
class="$wi_class" -> class="widget_core_freehtml <widget_css_class>" )
¥
A little clarification, please. I notice you use "$wi_class", noticing in particular there is only one dollar sign. Is that a change or simply an omission designed to test me? Also this example shows "widget_core_freehtml" instead of "widget_core_free_html" as per what we now could use. Same question eh?
IF I understand correctly this bit is actually telling me I can select a style name (attribute, class, whatever it's called) in the widget's settings. So like I might tell my widget to use a style "gorgonzola" for my bloglist widget that I've added to my sidebar. Assuming I have
<div class="$wi_class$">
for my block_start I would then get
<div class="widget_core_colls_list_public gorgonzola">
for my bloglist in the sidebar, but the bloglist in my header would NOT see the "gorgonzola" bit?
Naming widgets will be a super cool thing. Especially for the widgets people will use multiple versions of like "Free HTML" and "Menu Link".
Hey and thanks for the heads up!
6 yabba Dec 23, 2007 14:30
They were both typos :p
On the grounds that a picture says a thousand words, here's a really long explanation ;)
These are the settings for one of our widgets in our new skin :
http://innervisions.org.uk/media/settings.jpg
That makes our widget list look something like this :
http://innervisions.org.uk/media/widgets.jpg
The code for our container is as follows :
// Display container contents:
skin_container( NT_('Sidebar'), array(
// The following (optional) params will be used as defaults for widgets included in this container:
// This will enclose each widget in a block:
'block_start' => '<div id="$wi_ID$" class="$wi_class$ am_sidebar_widget"><div class="$wi_class$Bub am_sidebar_widget_bubble">
<div class="top"> </div>
<div class="mid">
',
......
The relevant bit of html that's spat out is :
<div id="my_demo_ID" class="widget_core_free_html am_skin_register am_sidebar_widget"><div class="widget_core_free_html am_skin_registerBub am_sidebar_widget_bubble">
<div class="top"> </div>
<div class="mid">
The settings are individual to the widget ( just like the rest of their settings ) so your gorgonzola would only be seen by the widget with the cheesey grin ;)
¥
7 blogmeister Nov 18, 2008 11:26
Hello. Nice work explaining this.
Q: In the Public Blog List widget, in the anchor tag, it has a 'class="default" attribute that is throwing off other widgets/plugins I have next to it (it has a bottom border).
Is there a way to pass a different class or no class to that anchor tag, since it seems like it's value is a variable? :?:
For the blog I'm using that Public Blog List widget for, I prefer to style the <li class="..."> tag instead. I didn't want to change the style.css value (comment it out), as I don't know if other current or future applications will call that anchor 'default' style. Right now, it seems like I'd have to edit code in 'widget.class.php'(?).
Thanks.
P.S. In the future, it would be nice to customize e.g. <a> class via the Admin interface or container used in the skin. So far, the few widgets I've customized were easy via the container params for the <li> tag.
8 blogmeister Nov 19, 2008 00:25
Nevermind folks.
I made it a variable feature whereby each of my bloggers will be able to control it for their particular blog's design via the Admin interface in that widget.
Thanks anyway.
Nice job, Ed.
Please do copy this in the Wiki, perhaps on this page: http://manual.b2evolution.net/Skins_2.0. I know the page is from the one who recently used the W word, but this is not about W itself. On the bottom there's the "Details here" link to this page http://manual.b2evolution.net/TemplateTags where I try to gather hard to get information about the arrays for the template tags.
Did you like what you saw when you dived into it?