Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-settings.php on line 186

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/functions.wp-object-cache.php on line 108

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/pomo/mo.php on line 171

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/functions.bb-l10n.php on line 484

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h06/mnt/47169/domains/themehybrid.com/html/community/bb-includes/backpress/class.wp-taxonomy.php on line 581
Hybrid version 0.7 discussion « Community

Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

The community forums are currently being phased out. At the end of February or early March 2012, you will no longer be able to post here. This is because the entire site is being restructured. Please use the main forums for discussions.

Hybrid version 0.7 discussion

  1. RE: RE: Action hook names

    Let's push this back to 0.8. That way, we can have time to discuss alternatives to using those hooks, the benefits/disadvantages, and maybe reevaluate some things with the action hook system.

  2. Attachment templates

    I changed this recently but forgot to mention it. Attachment templates are getting a slight change as well.

    Normally, WordPress looks for attachments like so:

    $mime[0].php
    $mime[1].php
    $mime[0]_$mime[1].php
    attachment.php

    There's not enough structure there. Plus, since we're making a consistent hierarchy for all other post types, I think attachments deserve something similar.

    So, what I'm doing is changing this by adding "attachment-" in front of the file name:

    attachment-$mime[0].php
    attachment-$mime[1].php
    attachment-$mime[0]_$mime[1].php
    attachment.php

    So, with image attachments, the hierarchy would look like this:

    attachment-image.php
    attachment-jpg.php
    attachment-image_jpg.php
    attachment.php

    I actually still think this is a bit backwards because the hiearchy is switched around. I may even go as far as switching it to this, creating a more correct cascading effect:

    attachment-image_jpg.php
    attachment-jpg.php
    attachment-image.php
    attachment.php
  3. Recoded the theme settings page

    I had already spruced up the theme settings page a small bit, but recent discussion made me reevaluate this page:
    http://themehybrid.com/support/topic/hybrid_child_settings

    So, in 0.7, you'll see a whole new theme settings page. While it won't look too different (aside from the already-mentioned removal of many settings), it'll be completely different.

    Here's a screenshot of the new page:
    http://justintadlock.com/blog/wp-content/uploads/2009/12/settings-page-07.png

    The important thing about the new settings page is that it uses meta boxes (just like those meta boxes for the post editor). They can be sorted and/or hidden by the user. But, even more important is that child theme and plugin developers can make meta boxes specifically for the theme settings page, easily extending it.

    Anyone familiar with the add_meta_box() function will be able to do this. I'll be writing a tutorial on how to do this soon too. As a test of how easy it would be to add custom meta boxes, I wrote a plugin in about 5 minutes that adds the Theme Hybrid blog feed as a new meta box:
    http://justintadlock.com/blog/wp-content/uploads/2009/12/th-community-meta-box.png

  4. Sidebar?

    Since it looks like my attempts at getting the "sidebar" terminology changed has gone absolutely nowhere, I'm going to use the term with the templating system.

    This change is to keep the theme files organized. Currently, the widget areas with templates look like this:

    aside-primary.php
    aside-secondary.php
    aside-subsidiary.php
    utility-before-content.php
    utility-after-content.php
    utility-after-singular.php

    In keeping with my organization of the templating system, these will all have the prefix "sidebar-" in the new version:

    sidebar-primary.php
    sidebar-secondary.php
    sidebar-subsidiary.php
    sidebar-before-content.php
    sidebar-after-content.php
    sidebar-after-singular.php

    At such time that the WordPress community comes up with a more appropriate name, the names of these templates will also change. Until then, I'll just use what the rest of the WordPress world is using.

  5. Redefining the template hierarchy

    Here's a blog post on how version 0.7 will change the WP template hierarchy:
    http://themehybrid.com/archives/2009/12/redefining-the-template-hierarchy-in-hybrid-0-7

  6. Beta testing

    If you want to beta test version 0.7, check out this post and grab the download:
    http://themehybrid.com/archives/2009/12/hybrid-0-7-beta-release

  7. hybrid_get_textdomain() function

    For those of you interested in using the "core framework" of Hybrid to build your own themes, I just created a function called hybrid_get_textdomain(). What this does is update all the core strings to the textdomain of the theme.

    The Hybrid theme's textdomain is hybrid. It's typically used like this:

    _e('Some text.', 'hybrid');
    __('Some text.', 'hybrid');

    If you created a parent theme using the framework core, your textdomain would be based off what get_template() returns, which is the folder of your theme. So, if your theme's folder was super-duper, you'd want to use super-duper when localizing your text strings.

    The theme will automatically change all the core stuff to look like this:

    _e('Some text.', 'super-duper');
    __('Some text.', 'super-duper');

    Do I have to use this new function?

    No. I'm just documenting this here so everyone that creates parent themes will know that the core strings will be localized according to their theme.

  8. Custom theme settings page meta boxes

    If you're a child theme or plugin developer, you may be interested in this tutorial for version 0.7:
    http://themehybrid.com/themes/hybrid/settings-page-meta-boxes

  9. Switching the order of "Edit" and "Reply" in comment meta

    When I want to reply to a comment, I often find myself wanting to hit the last link in the comment meta section. This link is "Edit" if I'm logged into the site. I'm thinking that moving "Reply" to the end is more intuitive.

    Thoughts? Objections?

  10. Justin,

    In order to test WP 2.9 + Hybrid 0.7 + News Theme I have setup a test site as follows:
    Test site setup on different domain + on different server
    WP 2.9b2
    Hybrid 0.7b2
    News Theme 0.2
    copied data from live site to test site.

    Mostly all looks OK except for the get_the_image() function.

    Has anything changed or anything I/we need to be aware of with WP 2.9 and Hybrid 0.7 in relation to get_the_image?

    Robert

  11. Justin,

    For the life of me I cannot get get_the_image() to work on my front-page of Hybrid News theme. Had a look inside get_the_image packaged with 0.7 and noticed that there's an additional parameter 'the_post_image' - played with this and other combinations - no luck!

    Interesting thing... if I revert get_the_image back to 0.3.3 (as per Hybrid 0.6.2) all works as it should and my front-page displays as it should.

    I'm happy to do further testing but I'm kind of stuck where I should look next. My PHP skills are insufficient to debug this issue any further.

    Robert

  12. Justin,

    Further testing... the following filter does not work under 0.7 (works OK under 0.6.2.

    add_filter( 'hybrid_site_title', 'my_site_title' );
    function my_site_title( $title ) {
    	$title = str_replace( 'bla bla bla...', 'amended bla bla bla...', $title );
    	return $title;
    }

    (Note that I have replaced the contents of the "str_replace").

    Perhaps something I have overlooked in the 0.7 discussions/changes.

    Any input into this issue would be greatly appreciated.

    Robert

  13. Justin,

    In addition to the above... I have left the SEO box under Hybrid Theme settings as unticked - my approach to SEO is to allow Hybrid to do its thing plus a few of my own functions thrown in - this worked pretty well under 0.6.2.

    Robert

  14. Justin,

    Ignore my reply re the "hybrid_site_title" issue. All is OK. I needed to adjust the search string (site title) in 'str_replace' for the name of my test site (which is different to live site). "Trupela Tok" versus "Trupela Test".

    The "get_the_image" not working remains an issue for me under 0.7b2.

    Robert

  15. Justin,

    My apologies for jumping the gun twice. The issue with "get_the_image" was fixed after I did some search and replacing throughout the test db. Remember that I am setting up a test site (based on a copy of live db) for the purpose of testing WP 2.9 and Hybrid 0.7. There are many places in the test db where the site URL needs to be updated to match the URL of the test site.

    "Search Regex" plugin by John Godley is an excellent tool for such work.

    Robert

  16. I'm not sure whether this is now the best forum, or the blog post on the beta release of 0.7, but one thing I noticed when helping someone out in the forums is that a lot of classes seem to be gone from the body class. Most noticeable would probably be the tag classes. I'm sure you've got good reasons for this. I'm just wondering if body classes might be something you want to consider adding an arguments filter to. For example - arguments such as: show-author-classes, show-tags-classes, show-date-classes, show-time-classes, show-browser-classes. I know hybrid_body_class is filterable now, but this might be a good way to make it even easier for the end user.

  17. RE: Get the Image

    WP just changed some stuff, so there might be some issues with Get the Image until I get Beta 3 out. If you're running the latest of trunk, you'll likely get a fatal error.

    RE: Body Classes

    Some things are changing here that will make specific "show" hooks impossible. The changes are something I'll address in a blog post.

  18. Justin,

    Test server setup as follows:
    - Test site setup on different domain + on different server
    - WP 2.9b2
    - Hybrid 0.7b2
    - News Theme 0.2
    - copied data from live site to test site.
    - Ran search + replace changing "live.domain" to "test.domain" on copied db.

    Issue I am having now:

    Not able to get posts to display using the new taxonomy-category.php template. Have cut both Hybrid News Theme back to bare bones (ie allowing the templates from Hybrid 0.7 to handle the display rather than modified template in child theme) with the same result.

    Any ideas?

    Robert

  19. Justin,

    I feel like a "dick"! My fault again... issue with taxonomy-category.php is not an issue. Meaning testing so far with WP 2.9 and Hybrid 0.7 is looking good.

    Apologies for raising three false alarms in a row!

    While I got your attention... when will you be making 0.7b3 available?

    Robert

  20. Justin,

    The positive thing that has come out of this for me is that I now have a test site setup with the following:

    1) A WP installation that can be updated via subversion.
    2) A duplication from live of data and plugins.
    3) The ability to test newer releases of Hybrid (+WP, + plugins) as they become available.

    Something I have wanted to do for a long time!

    Robert

    PS. I think some of the Hybrid News sites might get caught out with Hybrid's new templates hierarchy (like I discovered on my test site) - especially those sites that have modified child theme templates.

  21. While I got your attention... when will you be making 0.7b3 available?

    Tomorrow, unless WP 2.9 is released then. I believe there's fewer than 10 tickets left for 2.9, so it might be out soon.

    PS. I think some of the Hybrid News sites might get caught out with Hybrid's new templates hierarchy (like I discovered on my test site) - especially those sites that have modified child theme templates.

    I'll be making sure the change in hierarchy is noticeable to everyone when the release is ready.

  22. apply_atomic_shortcode() function

    I've mentioned context-aware filter hooks and using shortcodes for certain hooks a few times in this thread. What I'm doing is adding a new function called apply_atomic_shortcode(). This function gives you the context-aware hook while allowing you to input shortcodes.

    For example, the byline within the theme would look like this:

    echo apply_atomic_shortcode( 'byline', $byline_text );

    So, you could essentially create your own filter function that outputs this for the byline:

    By [entry-author] on [entry-published] | [entry-comments-link]
  23. New shortcodes

    Building off my previous post, I want to mention the new shortcodes. These shortcodes are specific to entry-related stuff.

    [entry-title]
    [entry-author]
    [entry-published]
    [entry-comments-link]
    [entry-edit-link]
    [entry-terms]

    Anything I missed?

  24. This looks awesome, Justin.

    Will the comments code have the # of comments?

    You might want to leave it to the developer but being able to do something like [entry-published format="Y m d"] to output the date would be handy. Where format would be the regular PHP date format options.

  25. To add the Kyle's question, how will the author be displayed? Likely it will link to the archives, but what if that isn't wanted or they want to link to their external website?

    It looks like some of the shortcodes could use some attributes. However, these are great for now and make customizing the byline that much easier.

  26. This isn't really a major change in how things work now. Basically, I'm taking the code that already exists and wrapping it in a do_shortcode() call. So, if you filter it, you can use any shortcodes (from WP, the theme, plugins, etc.) to customize things.

    On top of that, I'm adding a few basic shortcodes that represent what the theme already does. If you really want to get crazy with things, you can combine it with this plugin:
    http://wordpress.org/extend/plugins/template-tag-shortcodes

    The reason for this change is twofold:

    1) Asking average users to use a filter hook is tough enough. Asking them to figure out the mess that's going on within a filter hook's function is even tougher. So, we get rid of that second hurdle and clean things up.

    2) Translations, especially with the byline. I'm constantly changing a bit of code here and there, and this usually messes up a translation every time the theme is updated.

    Will the comments code have the # of comments?

    Yes, it'll look the same as it does now.

    You might want to leave it to the developer but being able to do something like [entry-published format="Y m d"] to output the date would be handy. Where format would be the regular PHP date format options.

    Yes, that attribute is available, but I caution against the use of it unless it's necessary for child theme design. Users should be able to set this themselves.

    To add the Kyle's question, how will the author be displayed? Likely it will link to the archives, but what if that isn't wanted or they want to link to their external website?

    Nothing is changing here. The shortcode will link to the archives as always using the same WP functions. So, the WP filter hooks will still be available for plugins or themes to change.

    It looks like some of the shortcodes could use some attributes. However, these are great for now and make customizing the byline that much easier.

    I very much agree that some attributes are needed. I'm going to try and stick with the minimum needed though, at least until we all give this feature a go and see how well it's working.

  27. I know this is late in the game, but something that I'm working on is a Hemingway-like child theme. On non-home pages, the info (archive, category, etc.) is in a div that is floated to the left. Currently with the way the templates in Hybrid are laid out, there is no way to change this behavior without changing all of the templates. Take this snippet from archive.php in the hybrid theme:

    <div class="archive-info">
    
                <h1 class="archive-title"><?php wp_title( '' ); ?></h1>
    
                <div class="archive-description">
                    <p>
                    <?php printf( __('You are browsing the archive for %1$s.', 'hybrid'), wp_title( false, false ) ); ?>
                    </p>
                </div><!-- .archive-description -->
    
            </div><!-- .archive-info -->

    There is fairly identical HTML in the following templates (hybrid 0.6 -- I didn't look at 0.7.):

    • archive.php
    • author.php
    • category.php
    • date.php
    • day.php
    • hour.php
    • minute.php
    • month.php
    • search.php
    • tag.php
    • taxonomy-link_category.php
    • taxonomy.php
    • time.php
    • week.php
    • year.php

    I was thinking along the lines of a default action that spit out the correct info div so I wrote up a quick test function to my child theme and added the action to hybrid_before_content (I also added a modified category.php and month.php with the info div stripped to my child theme):

    function hybrid_info() {
        $title = '';
    
        if ( is_home() ) :
            return;
        endif;
    
        if ( is_page_template( 'category.php' ) ) :
            $infoclass = 'category-info';
            $titleclass = 'category-title';
            $descclass = 'category-description';
            $title = single_cat_title();
            $desc = category_description();
        elseif ( is_page_template( 'month.php' ) ) :
            $infoclass = 'date-info month-info';
            $titleclass = 'date-title month-title';
            $descclass = 'date-description month-description';
            $title = single_month_title( ' ', false );
            $desc = sprintf( __('You are browsing the archive for %1$s.', 'hybrid'),single_month_title( ' ', false ) );
        endif;
    
        if ( '' != $title ) :
            print_r( get_option());
            $info  = "\n\t\t" . '<div class="' . $infoclass . '">' . "\n";
            $info .= "\n\t\t\t" . '<h1 class="' . $titleclass . '">' . $title .  '</h1>' . "\n";
            $info .= "\n\t\t\t" . '<div class="' . $descclass . '">' . "\n";
            $info .= "\n\t\t\t\t" . $desc . "\n";
            $info .= "\n\t\t\t" . '</div><!-- .' . $descclass . ' -->' . "\n";
            $info .= "\n\t\t" . '</div><!-- .' . $infoclass . ' -->' . "\n";
    
            echo $info;
        endif;
    }

    The problem with the above code is that is_page_template() always returns themes/hybrid/page.php and I don't know how to determine which "info" I need.

    Comments on the idea? I don't mind editing all of the template files since it's trivial to do so and maintenance would not be difficult, but it seems like the above customization would make hybrid even more flexible.

    Pat

  28. RE: Archive Info

    It's something I've thought about. I'll put it on the agenda for discussion for 0.8.

    But, looking at the Hemingway theme, it's laid out the same way, just with less info.

  29. I notice that there is still an option in the posts page for entering a thumbnail URL. This seems kinda redundant now that 2.9 has post thumbnails built in. Perhaps this feature should be disabled for new users of the theme since it serves any purpose anymore apart from for legacy reasons? Or at least I assume it doesn't serve any purpose.

  30. @Ryan

    Sorry, I must've missed your post earlier:

    I'm a fan of keeping it because the Get the Image script has always used attachments, which isn't much different than what the new the_post_thumbnail() function does. But, I always want users to be able to have an easy way to override things.

    Plus, it's sort of something I just like having because I personally use it. I don't see myself using WP's new image feature when I'm so used to using custom fields. Old habits die hard, right?

Reply

You must log in to post.

Topic Info