Quote:
DCrussader wrote:
Better theme engine and yeah, tons of blocks everywhere, like the screenshot I posted above...
Blocks everywhere is not the same as block positions. I don't think we need more than 8 blocks positions, we need ability to place blocks anywhere!
And no, I do not mean smarty plugins to make it possible. Smarty plugins don't go well for blocks that require javascript or css. We need this on core, but not has extra block positions. Solution is quite simple and I implemented in one of my recent modules 'mymenus'. I won't show you code but this is how it works:
- You give ability for blocks to have a unique id (being the 'bid' of the block or any other custom ID you provide like 'myblock_navbar'
- Then you add a selection box to give that block 2 different render methods. This methods are 'assign to block position' and 'assign to template'
- the block function will then look at the choosen method and render the normal way for first choice, for second choice it will assign the block result to a smarty var and deliver block as empty to core(so block is not displayed in his position)
- assign block to template will allow you to place the block anywhere in the theme just by calling the corresponding smarty var, in the case above the var could be <{$myblock_navbar}>
Doing this in core we can add this ability to any exisiting block (adding field for custom id and select box). Theme designers can create places for blocks where they want, the site admin just have to edit a block and give same id used in theme and assign it to render to template.
Practical example:
In 'mymenus' module I want designers to make a place in theme for dropdown menus(top navigation). So designers just have to add <{$xoopsblock_navbar}> in the place they want menu to show.
All I have to do is to edit my mymenus block and give it the id of 'navbar'. Here xoopsblock_ prefix is automatically added to avoid namespace conflict.
You see, we often need to add a search block, a login block, a menu block or any other special/custom block. We do not really need positions where we can drop more than one block.
This 'hack' provides more flexibility cause it allows to use blocks inside any module template/theme and is easy to implement on theme(without using ifs and elses like we would need for extra block positions). This will not affect core performance and will allow code to maintain clean without extra worries that extra block positions give.
---------
Regarding designers:
I read somewhere that XOOPS and all forks together have around 10 designers. I think we have 2 or 3. It depend on the 'designer' meaning. For me a designer is lot more than having lot of brushes in photoshop and know some good css tricks. Creativity is not found on books, it cannot be taught. I am able to make themes but I'll never be a designer no matter how bad I try and how high I scream I am.
PS: 2 or 3 has a lot of space for you to fit in so don't take it personally!
PS: Same can be said for writing, painting, music, XOOPS development or any other kind of art.