On Jan 19, 2011, at 5:32 PM, Andrew wrote:
> Hi everyone,
>
> I'm looking at Habari as a potential replacement for my current blog engine
> (tables all the way down). I have two questions:
>
> - has anyone ever considered // developed a plug-in for setting themes on a
> per post basis? perhaps pre-defined tags would flag posts so that they're
> always displayed with Themes XYZ? I'm looking to migrate a blog with 5+ years
> of content spread over several clearly defined periods, which would be best
> presented with themes of their own. If the answer is no, would someone
> familiar with the code base mind giving me a push in the right direction? I'm
> somewhat handy with PHP and could likely stumble through it myself if told
> where it would be best to begin.
I've never heard of such a plugin, but there is a plugin that allows users to
switch the theme they see the site as (cleverly named 'themeswitcher' in
-extras), so that would probably be your best best for a starting point.
>
> - has anyone ever considered // developed a plug-in for autopopulating pages
> with links to posts? Imagine a personal blog where every once in a while you
> write about cooking, and you make a cooking page with all the of your posts
> about cooking automatically listed. Yes, you can see such a thing by just
> clicking the appropriate tag, but having it on a page would allow you to
> include introductory text/media in addition to your list. And again, if
> someone would be so kind as to give me a few pointers, I'd start tinkering
> myself.
Again, I've never heard of such a plugin, but it's not a difficult mod to make.
You essentially want a page that displays posts with a certain tag (presumably
they're all tagged 'cooking'), rather than the page's regular content.
The easiest way to do this is probably to add an act_display_post method in
your theme.php file that checks if Controller::get_var('slug') == 'cooking' and
then passes custom arguments into parent::act_display_post() if it is (and if
it's not, just calls parent::act_display_post normally so as not to break other
post pages).
The custom arguments would probably just need to be something along the lines
of this:
array( 'vocabulary' => array( 'tag' => array( 'cooking' ) ), 'limit' =>
25 )
I think it'll figure out the pagination on its own, if necessary. But of course
you can look at the other act_display_* methods in system/classes/theme.php for
examples of what you can do and what can be passed in.
>
> All in all I like what I see in Habari very much, and look forward to getting
> to know you all better and hopefully one day contributing something
> meaningful to the project.
>
> Thank you,
>
> - Andrew
>
> --
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/habari-dev
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev