love green - get broad leaf

After many many hours and numerous cups of coffee - broad leaf has just been released as a public beta.

broad leaf is green - err.. go!

There’s a lot of work poured into this puppy, with some nifty features, such as:

  • A choice between wide (defualt) layout or narrow with asides
  • Built in support for tags, via the excellent Ultimate Tag Warrior
  • Simple configuration through a quick edit of a single file and heaps of other cool shit.

There’s a heap more detail over at the new smackfoo theme home, so stroll on over and help yourself to some broad leafed love.

As this is my first release, stuff is bound to break - it should be pretty stable right now, but it’s not released as beta for nothing. :)

Release 1.3b is now out - features some fixes to tags.php and removal of some, err, spurious code.

Please, if you have any comments or questions - this is the right place to ask. I’d prefer to keep the comments within the release post, rather than clutter up the release page..

≡ This is a design entry relating to the topics of No Tags.

Brendan Borlase is a Systems and Network Administrator living in Adelaide, Australia, having lived, worked and breathed Information Technology for over 12 years. Learn more.

Feedback is encouraged. If you would like to read more, consider subscribing to the regularly updated RSS Feed.


  1. Andy Z

    Man, I thought it said “bread loaf” at first. That would be way cooler.

  2. brendan

    I guess if it was full of browns and tans then yes, “bread loaf” would rock.. sadly it’s green - so green bread isn’t usually good for you. :)

  3. Nothing

    I’ve been playing with your theme, love it!
    One question, im trying to get the asides to work.
    I can get my posts to asides working but they also appear as a main article aswell.
    i want anything i post as an aside to only appear as an aside not also as a main article.
    Im sure the code i right in front of me but i cant seem to find it.

  4. brendan

    Check that you have the latest version - it has updated code that excludes the correct category now..

  5. Nothing

    I’ve got the latest version but for some reason its not working for me. Very odd.

  6. brendan

    Okay, firstly - make sure you have added the right category name (not number) to data.php..

    It should be the following lines:

    // do you wish to present short entries or asides?
    $display_asides = 1;

    // the aside category name?
    $asides_cat = ‘asides’;

    Again.. ‘asides’ should be changed to your chosen category and $display_asides should be set to 1..

    If that doesn’t work you can try changing the following line (in home.php) that starts:

    <?php if (in_category($asides_cat)) continue;

    and change it to:

    <?php if (in_category('01')) continue;

    .. where ‘01′ is the category ID for your asides (it should be listed next to the category name, in the category admin page).

    Of course, if you make the above changes you won’t be able to change the asides category easily within data.php, but it should work..

    There is a new version due out soon that takes advantage of a more reliable and efficient db query which should be better..

  7. Nothing

    Thanks mate.
    I’ll give it a go when i get home.

  8. brendan

    Nothing,

    There is a new version out that definitely works well handling asides.. feel free to grab the latest copy and give it a spin first.

    Do please let me know how you get on. :)

  9. Karthik

    hey brendan my asides dont seem to work. i am using your latest version. please help me out.. my asides category is ‘asides’ and its id is 3.. what do i do..

  10. brendan

    Have you enabled asides?

    In data.php the very first option needs to be set to 1 - it looks like you’ve got the wide column (default) layout in use at present..

  11. Karthik

    no i had made it 1 and it was not working. so i made it 0. here is the error i got..

    Fatal error: Call to undefined function: the_excerpt_reloaded() in /home/ipowerth/public_html/mywebviewz/wp-content/themes/broad_leaf/shorts.php on line 20

    and what am i supposed to do..

    [code]

    Where’s the beef?

    Text Link Ads
    Text Link Ads
    Text Link Ads
    Text Link Ads
    Text Link Ads

    The finest internet hypertext

    have_posts()) : $my_query->the_post(); ?>

    ‘, ‘none’, FALSE, ”, TRUE, 2); ?>
    ” rel=”bookmark” title=”Permalink to “>#

    //” title=”about asides”>More asides love »

    [/code]

  12. brendan

    You’ll need to download and enable the plugin “the_excerpt_reloaded” available here.

    I’ve added it to the broad leaf download as I appear to have missed it when packaging the theme.

    Give that a spin and see how you go.. :)

  13. Karthik

    hey brendan thanks for your help. i am designing a theme and i want to display the asides on the top portion of the blog(the top portion is similar to foliage mod..).. can you tell me how do i accomplish that.. also can you tell me how to implement brians latest comments in the footer like you’ve done.. please reply by email..

  14. Karthik

    hey brendan my asides show up in the main page too

  15. brendan

    I would recommend you have a skim through the wordpress forums.

    Brian’s latest comments plugin and code is already set up in broad leaf (bottom_index.php). Separating posts out based on category is done within broad leaf in home.php, have a look at the query used to get some ideas (or have a look in shorts.php to get an idea of a simpler ’single category’ query).

    There is a lot of material available (google is your friend too) to help guide you through some of the more advanced template tags, etc and I would recommend you follow that up.

    I’m happy to help with broad leaf questions, or if you have a block of code you want someone to help with.. but I’m by no means the wordpress codex. :)

  16. brendan

    The query to identify asides needs an actual ‘asides’ category to work..

    If you use tags, that’s great - but you still need a specific wordpress category for asides. I’ve not managed to find a clean and efficient method to query posts based on tags as yet.

    Basically - if you want to mark a post as an aside, make sure it’s at least in the asides category (irrespective of any tags used) or the query won’t exclude correctly (you can’t exclude something that doesn’t exist).. :)

  17. Karthik

    hey guys i have released a new theme called fauxed.. for more details visit my site 33rockers.com..

  18. VOLKAN

    Hi.. first, its a great theme :) Thanks to u and derek!
    Well, i have a problem with the footer section of the theme in die Frontpage.
    On Commentary i become this error message: ” Fatal error: Call to undefined function blc_latest_comments() in C:\Programme\xampp\htdocs\root\VLKN\wp-content\themes\broad_leaf\bottom_index.php on line 41 ”

    and the bottom.gif in the frontpage dont displays… all links in the navigation dont works and all go back to http://localhost … :(

    What was my mistake ??

    Kind Regards,

    VOLKAN

  19. brendan

    Karthik,

    Good to see you’ve got a new theme. Have you let Derek Punsalan at 5thirtyone know too?

  20. brendan

    Volkan,

    Perhaps you could post a comment with your website? I can’t tell you what’s wrong if I don’t know where your website is. :)

    Might be worth having a read through the theme page to get some tips as well.

  21. ChamPioNeer

    hi, I tried the latest broadleaf theme on my site, and I found an error when visiting articles or searching something by date/tag/category, here is it:
    Warning: Invalid argument supplied for foreach() in /home/.digger/championeer/championeer.ihackr.com/wp-content/themes/broad_leaf/index.php on line 26

    please help me !

  22. brendan

    Odd.. have you checked the data.php file to ensure your settings are right?

    Try removing line 22:

    "AND $wpdb->post2cat.category_id != 14 ".

    .. from index.php and see if that makes any difference (it’s a redundant line I really should fix up in the theme download).

  23. brendan

    Guys,

    I’ve posted a new version (RC2) which should fix some of the odd problems occuring.

    Please try updating with the current version as it will fix a number of errors.

  24. championeer

    Great! I upgraded to rc2 and now it is working very nice. Thanks very much!

  25. VOLKAN

    Hi Brendan,

    01. i have upload the site on my domain, please can you check if i have anywhere a mistake ?

    02. how i can handle the tags ? where i can write or add an tag list ? Makes it himselfs ?

    03. on the frontpage i have an error with the first article i think… it displays on the asides part.

    04. the other links like chronolgy, archive, about, external, rss etc. dont work, how i create with the rightway the pages for this sections ?

    —-

    Sorry for all this questions, i have worked always with TXP and the first time with Wordpress ;)

    —-

    Kind Regards,

    VOLKAN.

  26. championeer

    hi, I could be confused , why can’t the newest article (not in “aisdes” category) be displayed on the front page though it comes to be at “The Chronology” section ? A bug or a feature?
    Thanks!

  27. brendan

    I’m not sure I follow..

    The front page will always display the latest post, sorted by date. If the most recent post has a date older than the previous, it will (quite rightly) not show up as the first post.

    Can you be a bit more specific?

  28. championeer

    Hi, Brendan, I notice that in your site, the front page article ” Text Link Ads - July 4″ was posted on June 28th, 2006, but in “The Chronology” section at bottom index, the newest post is “Another day another broad leaf” on 2006 07 06, it is curious, isn’t it?

    However, I have just solved this problem with a strange way: I use rc1 home.php and rc2 index.php, yes , the front page is now working all right, but I am really confused……

  29. brendan

    Ahh, I see. In that case the list is correct. I allow the asides to show up in the archives listing in the bottom section. You can easily filter those out if you wish.

  30. championeer

    I think you could get me wrong:), you can see my another test site: blog.ihackr.com, no “aisdes” posts, but the latest article in front page is Test2 rather than Test4 (test4 is still at “the chronology” section)……

  31. brendan

    “you can see my another test site: blog.ihackr.com, no “aisdesâ€? posts, but the latest article in front page is Test2 rather than Test4..”

    It’s looking ok - I see Test post 6 is the latest “aside” and it’s also listed in the bottom archives listing.

    I have updated the theme (again) as there were a couple ‘odd’ results in the posts listings under some conditions.

  32. championeer

    hi, Brendan, today I consult one of my friends ,the guy is very skilled at PHP and wordpress. I get some advices from him ,and so I think I know the issue that the latest post can’t be displayed in my blog.
    It is a timezone issue, you know I am in China but my hosting is in America , so I changed wordpress timezone to Beijing. However in the home.php, you use post_date in query section that if it is different between server timezone and wordpress timezone, my issue could be coming , so you should change the code to post_date_gmt according to my friend.

  33. championeer

    sorry, the php code is broken.

    post_date < NOW() and post_date_gmt < UTC_TIMESTAMP()

  34. brendan

    I used the standard query as far as timestamps go (in fact I removed more stringent timezone related code to ensure it didn’t choke on different zones).

    I can see that you’ve had to make a change due to your timezone, however I’m not going to change the current db query until I’ve checked that it will suit all environments.

    Thanks for the comments however. :)

    By the way - the wordpress time should always be the same as server time unless you have very good reasons not to. If you set the wordpress time to match your local time-zone and that time-zone is ahead of the server time-zone then there will always be a risk that the latest post is ‘newer’ than the server time - which leads to odd behaviour when running queries outside of the standard wordpress ones.

    I will investigate the GMT suggestion, however as most UNIX based hosting servers run on UTC time, changing to GMT may have unusual effects in return.

  35. championeer

    All right, maybe you are right, but the modified code solved my issue really.
    Now, Let’s talk about anther thing: I think I caught another flaw of this theme:)
    –You could miss include (TEMPLATEPATH . “/data.php”) in page.php and tags.php , please check out.

  36. brendan

    championeer,

    You might be interested to note I’ve found a clean way to handle time using GMT rather than UTC..

    First we set a variable:

    $today = current_time('mysql', 1);

    Then it’s used within the query:

    "WHERE post_date_gmt < '$today' ".

    It’s nice in that it means the time is referenced from the db server, should work on older MYSQL and PHP 4 servers and should also be reasonably accurate & reliable. I’ve updated the theme (1.5) — see what you think.

  37. championeer

    Brendan, That’s a wonderfu way to fix timezone bug:D

    However , I have to say that you don’t replace asides cat ID “14″ with “$side_cat” in home.php of new 1.5 release. You can see below:

    AND $wpdb->post2cat.category_id != 14

    But “14″ should be “$side_cat” ,right? I think It is a careless bug:wink:

    Good day!

  38. brendan

    Indeed it is - now fixed.

  39. championeer

    Hi, Brendan, maybe in the future, the english version of my blog would be available,hoho. Although my english is poor, I guess it must be better than your chinese:wink:.

    Talking about one thing, your CSS has a little problem on compatability with IE, if seeing your front-page with IE , you can find that the right-edge words of shorts are being cut off. So I add some contents in the CSS, see red part below:

    .content .shorts { float: right; margin-right: -2em !important; margin-right: 0em; width: 26em; color: #B2C977; margin-top: -0.8em; }

    It maybe solve this issue. Firefox is better, but IE has more users. I expect the theme is more and more perfect.

  40. l!pa

    I’ve also noticed that the banner-green.jpg image gets cut off from the left side when viewed in IE. This is how I changed the css in order to repair it:

    #header {display: block; width: 80em; height: 42em; margin-left: -7.5em; background: #333 url("images/banner_green.jpg") no-repeat top left !important; background-position: top 10%;}

    That should fix the IE view, but I don’t what how would it influence other browser (eg. Opera).

  41. AK

    Hey there!
    I came across this theme as I was browsing through some comments on Binary Bonsai. I’ve been using a cut-up version of Foliage for a while and I was basically trying to achieve exactly what you’ve done with this theme. So thanks for saving me tons of work.

    I just thought I’d share my site, since I know people like to see what’s been done with their theme. Just a few tweaks here and there, and a color makeover. Hope you like it, and of course you’re credited in the foot.

    My Site Link

  42. brendan

    All,

    I have updated the theme with a couple of fixes.

  43. Matt Armour

    I get the following errors in the “The Commentary” part of the page:

    WordPress database error: [Access denied for user: ‘mattslameblog@%’ to database ‘mattslameblog’]
    CREATE TEMPORARY TABLE tmp (comment_post_ID INT, comment_date DATETIME);

    WordPress database error: [Table ‘mattslameblog.tmp’ doesn’t exist]
    LOCK TABLES wp_comments WRITE, tmp WRITE

    WordPress database error: [Table ‘mattslameblog.tmp’ doesn’t exist]
    INSERT INTO tmp SELECT comment_post_ID, comment_date FROM wp_comments WHERE comment_approved = ‘1′ AND comment_type NOT LIKE ‘%pingback%’ AND comment_type NOT LIKE ‘%trackback%’ ORDER BY comment_date DESC;

    WordPress database error: [Table ‘mattslameblog.tmp’ doesn’t exist]
    SELECT comment_post_ID, post_title, ID, MAX(comment_date) AS f, UNIX_TIMESTAMP(MAX(comment_date)) AS unixdate FROM tmp, wp_posts WHERE comment_post_ID = ID GROUP BY comment_post_ID ORDER BY f DESC LIMIT 7;

    Warning: Invalid argument supplied for foreach() in /home/content/f/r/i/friendrave/html/domains/mattarmour_com/htdocs/wp-content/plugins/brianslatestcomments.php on line 29

    Any Ideas?

    Thanks

  44. brendan

    Okay,

    The plugin either doesn’t have rights to create ‘temporary’ tables or there is some permissions issue.

    [Access denied for user: ‘mattslameblog@%’ to database ‘mattslameblog’]

    You may find your web host has disabled the function that allows your account to create temporary tables in MySQL.

    .. comment out (e.g. <?php // ... ?>) the plugin call in the bottom index and see how that goes.

  45. Matt Armour

    I commented it out and the error is gone…and so is the comments….

    Is there any way to get the comments here or do I just need to put something else there?

  46. brendan

    You may need to locate another recent comments plugin in that case (if you wish to use one).

  47. jack

    Nice site actually. Gone to my favourites. Thanks for creation.

  48. Mike

    Very nice.

  49. Ilya

    I am having the same problem, and you can also currently see it on the WP demo … has there been a resolution ?

  50. Brendan Borlase

    The error exists because the conf file hasn’t been set. I can’t do that with the demo site as I have no control over it.

    If you are testing the theme yourself and are still experiencing a problem please email me the SQL error.

    The theme isn’t being actively maintained at this time, primarily because WP development is constantly changing core functionality which undoes much of the work many theme developers have done.

    Thanks.

  51. Jim

    So, WP 2.3 breaks the theme quite substantially, any ideas anyone on how to fix it?

  52. Brendan Borlase

    Jim,

    Broadleaf interrogates the db for posts directly, thus it would require that the entire post structure is re-written, using standard function calls, (which would remove some custom post functionality).

    It can be done using a the ‘query’ function, excluding the asides category if required - I haven’t had an opportunity to fix the problems yet, particularly as recent wordpress versions keep introducing new ways to screw over templates and I won’t be upgrading to the 2.3 release.

    If anyone happens to have overcome the issues (in the mean time) I’m happy to update the theme with the changes.

  53. Brendan Borlase

    Theme has been updated.

  54. karoushi

    updated version (1.6f, final freddy) link is not working for me.

    great theme btw…

  55. Brendan Borlase

    Oops. Package should now be able to be downloaded. ;)

  56. TephS

    I love this theme to the point that I can’t imagine settling for anything else. Which is what I normally would do (being not-too-tech-proficient), but my problems is that I’m getting this error:

    Fatal error: Call to undefined function the_excerpt_reloaded() in /home/tephscom/public_html/wp-content/themes/broadleaf_2/broad_leaf/home.php on line 68

    Is there anything I can do about it, or any wisdom you can bestow? Thanks!

  57. TephS

    =) never mind… I learned to read and saw your advice above. I suppose all I have to say now is that I absolutely love this theme!

  1. 1 This is SmackFoo › chronology › revisionism of a theme

    […] Handling images isn’t a complex task, doubly so when the likes of flickr make it a point and click affair and plugins such as the wordpress lightbox plugin simplify the process. Get the photo posting habit’s right from the outset and no matter the theme, you’ll be the next Andy Warhol wooing the populous with your designer imagery. .. as a refresher you can view the original post. (↩).. this likely includes you, too. Cool huh? (↩)..indeed 75% of you sport widescreen Apple displays or 1280×1024+ desktop resolution. (↩).. or reason.. or just don’t give a shit — pick one. (↩).. for example 600px wide in a 700px wide column. (↩) […]



Leave a Comment