Version 1.5 is now available!.
Release log:
------------------
Created a sidebar menu widget called "BF Sidebar Menu". It is a vertical menu and the submenus shows when the parent is clicked (only works for the main sidebar and sidebar2 + custom sidebars when added as vertical).
added custom taxonomies to the "Items that can be added to the navigation" in the theme settings (taxonomy terms can also be added in a list below the navigations).
added a "Move the main sidebar and sidebar2 to the left of the content" theme setting under misc.
------------------
Created a shortcode called bftdynamic. It adds dynamic options for the BF Template, like filter, sort, layouts and posts per page.
Here's an example of it added to a page:
[bftdynamic sid="bftdynamic-test" filter="category&video_tag" filter_method="or" target_sid="test" sort="date=desc&name" layout="thumbs=2427&list=2433" posts_per_page="6,12,24,48"]
[bftemplate sid="test" template="{l=2427}" dynamic="http-get"]
It shows the dropdown lists above the bftemplate. The target_sid must match the bftemplate sid for it to be used. The filter list is a list of taxonomies or taxonomies and terms can be manually added like this: filter="category=design,photo&video_category". This adds the design and photo categories for normal posts and also adds all terms in the video_category taxonomy (this is the syntax of categories for custom post types added in the theme settings (posttype_category and posttype_tag)).
The sort list adds what to sort by and the first element can have a default order. See here for more sort paramaters.
The layout list makes it possible to select what template to use. The parameter syntax is "template label = template ID/slug" (thumbs=2427). And then the bftemplate must use the l (layout) paramater as a variable like this: {l=2427} (2427 is the default template).
Here's an example of a template:
[bfthumbs sid="bfthumbs-dynamic" showposts="{ppp=6}" tax="{tax}" tax_method="{tax_method}" post_type="post,video" orderby="{orderby}" order="{order}"]
The filter is passed as a {tax} variable, filter_method as {tax_method}, posts_per_page as {ppp}, sort as {orderby} (and also as sort) and order as {order}.
The bftdynamic also works with the bfthumbs shortcode, but then the layout functionality doesn't work.
Example:
[bftdynamic sid="bftdynamic-test" filter="category" filter_method="or" target_sid="bfthumbs-test" filter_width="350" sort="true" posts_per_page="6,12,24"]
[bfthumbs sid="bfthumbs-test" dynamic="http-get" showposts="6"]
------------------
added tax_method parameter to bfthumbs and bfloop. This sets the if posts must match all taxonomy terms (and) or just one of them (or). tax_method="or" The tax parameter must be like this to use if on one taxonomy: tax="video:action;video:comedy". With a tax_method of or, posts that are in one of the terms will be listed, but with and posts must be in both terms.
fixed a security issue.
changed the post pagination styling.
fixed a caption align left margin problem.
------------------
added fluid columns to bfthumbs (just like bfloop. max 6 columns). Example:
[bfthumbs sid="bft-fluidcols" fluid_columns="true" numcols="4" showposts="8" width="200" height="120"]
The image can be aligned and reduced in size like this:
[bfthumbs sid="bft-fluidcols" fluid_columns="true" numcols="4" showposts="8" image_align="true" image_width="200" image_height="120"]
------------------
fixed the problem with that parent pages was removed from the navigation when children was updated.
------------------
Added an ajax custom single functionality for bfthumbs and bfloop where it loads a template in a separate container. This way videos, images, products etc. can be loaded in the same page without going to the single post page.
Example:
[bfthumbs sid="bfthumbs-csa" showposts="6" numcols="3" width="100" marginright="5" marginbottom="5" margintop="0" class="alignleft" custom_single="cs-ajax" csa_container="csportfolio" csa_changeurl="true" csa_loadpost="1" text="false" title="false"]
<div id="csportfolio" class="alignleft" style="width: 400px; margin-left: 20px;"></div>
The parameters:
sid - Required. There must be a unique ID for the bfthumbs shortcode for this functionality to work.
custom_single - Required. This is the slug of the BF template (quick edit to see the slug) to show the content in the specified container.
csa_container - Required. This is the id if the container where to show the content outputted from the template.
csa_changeurl - Optional. true or false. Sets if the url will change so that the content can be linked/bookmarked.
csa_loadpost - Optional. The number post to load if no # url is set. The default is 1 (loads the first post). Set it to false to not to load a post by default.
csa_trigger - Optional. click or mouseover. Sets the method of triggering the thumb.
Here's an example of a template (with a title of cs-ajax):
[bfthumbs sid="bft-ajaxtest" numposts="1" width="500" image_align="left" image_width="200" image_height="200" margintop="0"]
The template can be any shortcode, and a post id parameter is passed to the template, so this it possible: id="{id}", but not necessary for the bfthumbs or bfloop since they know what post to show.
bfthumbs can now also fetch images from a post/page ID (get_images parameter), so this can work as a gallery.
Example of gallery with bfthumbs:
<div id="csgallery" style="min-height:400px;"></div>
[bfthumbs sid="bftgallery" get_images="2119" numposts="6" width="200" height="120" custom_single="csgallery" csa_container="csgallery" csa_changeurl="true" csa_loadpost="1"]
and the csgallery template:
<img src="{image_url}" class="maxwidth" />
or use bfloop in the template to add extra info:
[bfloop sid="bflgallery"]{image_wp_large}{post_title}[/bfloop]
Another idea with this feature is to have two of more bfthumbs to show content in the same container. For example to show videos, having new videos below the video and related videos in a sidebar both showing videos in the same container.
------------------
added a get_images parameter to bfthumbs that fetches all images from a post/page ID, so this can work as a gallery. And in combination with the custom single ajax functinality images can be shown in the same page (without having to go to single post/attachment view).
added a post format creation field in the theme settings (that can be used with the bfloop shortcode).
------------------
Created a new shortcode called bfloop, that is an alternative to bfthumbs for showing posts in a template or a page. The initial idea with the bfloop shortcode was to be able to create other kind post layouts than possible than with bfthumbs and that it should work with the new snippets system.
Example of a table loop:
<table>
[bfloop category="featured" numposts="10"]
<tr><td>{post_title}</td>
<td>{categories}</td></tr>
[/bfloop]
</table>
Everything inside the bfloop will iterate the number of times the showposts/numposts parameter is set to. The showposts parameter will show page navigation at the bottom, and the numposts parameter will just show the number of posts without breaking it up into pages. This is exactly how it works for the bfthumbs shortcode. And as bfthumbs there is an ajax navigation feature, but here it is not default, it must be set with the ajaxnav="true" parameter.
Example of a list:
<ul>
[bfloop category="featured" numposts="10" height="600" class="postlist"]
<li>
<span class="pn">{postnumber}</span>
<span>{post_title}</span>
</li>
[/bfloop]
</ul>
When a height is set scrollbars will appear. And the {postnumber} variable will show the number in the list.
And It can also be used to easily create single post templates:
[bfloop]
<div class="mb20">{image_feature}</div>
<div class="post">
<h1>{post_title}</h1>
{meta}
<p>{post_content}</p>
{post_pagination}
</div>
{comments}
[/bfloop]
As you can see the content of the shortcode is the template for the post(s). The post elements are added with template variables like {post_title}. In the shortcode GUI there is an easy way of inserting variables. All the variables available can be listed by adding a variables="true" parameter to the shortcode.
Here's an example of a blog index/frontpage loop:
[bfloop image_width="600" image_height="350" showposts="6"]
<div class="post">
{image_timthumb}
<h2>{post_title}</h2>
{meta}
<p>{post_content_autolimit}</p>
</div>
[/bfloop]
Here a {image_timthumb} variable was used to show the image, and then the image dimensions are set as shortcode parameters (image_width and image_height). showposts also works to override the default posts per page number. It is also possible to have columns like bfthumbs with the numcols parameter (example: numcols="5"). These columns have fluid width so they will fit in any container width.
bfloop also works with post formats:
[bfloop]
{% begin post_format video %}
<div class="post">
<h2>{post_title}</h2>
{video}
</div>
{% end post_format video %}
{% begin post_format standard %}
<div class="post">
{image_feature}
<h2>{post_title}</h2>
{meta}
<p>{post_content_autolimit}</p>
</div>
{% end post_format standard %}
[/bfloop]
The post format name must be without spaces and the standard/default post format should be added last, since the last one will be used if no post type is assigned. Post formats can be created in the theme settings (custom tab).
Custom content variables can be added with a filter, like this (in a child theme functions.php):
function bfloop_custom_variable($value, $variable, $atts) {
global $post;
if ($variable == 'myvar') $value = 'my content';
return $value;
}
add_filter('bfloop_add_variable', bfloop_custom_variable);
An existing parameter can also be modified with the filter:
function bfloop_custom_variable($value, $variable, $atts) {
global $post;
if ($variable == 'post_title') $value = 'my title';
return $value;
}
add_filter('bfloop_add_variable', bfloop_custom_variable);
And to add the custom variables to the list in the shortcode GUI variable inserter add this after the function:
$bflcvar = array('myvar', 'myvar2');
Plugins or other php code can be inserted with a bfhook shortcode (a custom variable like shown above can also be used). The bfhook shortcode outputs the content from an hook function. Here's an example of a hook call:
[bfhook sid="bfhook-st" name="myplugin"]
and the function that can be added to functions.php of a child theme:
function bf_myplugin() {
global $post;
echo myplugin($post->ID);
}
add_action( 'myplugin', 'bf_myplugin' );
The bfloop template must be styled and the css can be added to a child theme style.css or it can also be added to the css field in the template. This shortcode can be used in combinations with other shortcodes, like bfthumbs or bfhook (shortcodes can be mixed with the tags). This means that related posts can be added below the the post on single post view with a bfthumbs.
The bfthumbs custom single functionality was also added to bfloop. Example:
[bfloop sid="bfloop-cstest" category="featured" custom_single="single_template2"]
Here a BF Template called single_template2 will be used to show the single post. The template can be an import shortcode of a single php template or a bfloop shortcode single template like shown above.
btw, it is important to use the html mode of the editor when adding bfloop shortcodes, since the visual editor converts html tags.
------------------
fixed a bug with the right margin in the template option "Include the sidebars (main and sidebar2) if widgets in them."
------------------
added a responsive parameter to the bfthumbs shortcode. And also marginleft and container_height to work together with the responsiveness.
Here's an example shortcode:
[bfthumbs sid="bfthumbs-resptest" width="120" numposts="8" responsive="true" container_height="420" marginright="10" marginleft="10" numwords="20"]
The responsive="true" removes the numcols functionality, so the number of columns will depend on the container. The container_height="420" sets the height of each thumb. This is done instead of clearing the floats, that was done by the numcols functionality. This means that the container_height must be more than the highest thumb to clear the next row of thumbs. The marginleft="10" paramater was added to so that left and right margins can be set, instead of just right, so that the margins are distrubuted evenly.
------------------
added bfthumbs paramater query_stringa. Works like query_string, but for array arguments. Example:
[bfthumbs query_stringa="post__not_in=1724,1511&category__not_in=6"]
------------------
Added custom_field parameter to the bfthumbs shortcode. It works like this:
[bfthumbs custom_field="mycats:category"]
The mycats is the name of the custom field, and category is the bfthumbs parameter to assign it to.
[bfthumbs custom_field="cq:query_string"]
The query_string parameter makes it possible to change the query arguments in a string (use query_stringa for arguments that must be an array). Here's and example of a custom field value for the query_string paramater:
category_name=news&tag=happy,smile
------------------
added a click to insert/update functionality to the labels in the Shortcode GUI (like in the theme settings), so it's not necessary to scroll the whole way down everytime.
------------------
shortcode gui now works with nested shortcodes (can update and use the bfthumbs layout manager).
Example:
[box sid="mybox"]
[bfthumbs sid="mythumb"]
[/box]
Before the bfthumbs could not be accessed in the "current shortcodes" list, because it did not support nested shortcodes. Therefore the bfthumbs layout manager was not accessible for it either. The only solution was to move it out of the box shortcode and update it and then move it back. Now that's not necessary anymore, since it works for nested shortcodes too.
------------------
separated google fonts (added to the google font loader) by type (font weight/italic) in the theme settings font selection lists. This means that font-weight and font-style doesn't have to be set with css.
Removed the comma separation for the google fonts loader (fonts must now be only separated with linebreaks).
Created a snippets feature. Where shortcode snippets can be inserted into templates/pages/posts. It also has an update functionality built in that will import new snippets made available on vfxdude.com (there are no snippets available at the moment, but I will create a whole bunch of them). The snippets feature is only available for the administrator, but there are capabilities available to assign to other roles/users (ask in the forum about this).
created an importer plugin that can ovewrite existing posts. This way templates, snippets and other posts can be updated by importing a standard wordpress import file.
added a "remove navigation" setting for the shortcode template system. Also the remove header features has been modified not to remove the navigation.
added an "Add sidebars" setting for the shortcode template system. Makes it possible to add custom sidebars to the template without using the widgetarea shortcode.
added a css field setting for the shortcode template system. Adds css to the head tags only to those pages that are targeted by the template.
------------------
added a custom_single parameter to bfthumbs, where a template name/slug/id (bf template feature) can be added to be used to show single posts. In the template there can be an include shortcode to a php or bfthumbs can be used to show the single post.
Example:
bfthumbs with a custom_single paramater:
[bfthumbs custom_single="bft-single-template"]
Template (bft-single-template):
[bfinclude sid="bfinclude-single" filename="single-nosidebar.php"]
The custom_single parameter can be the template slug, name or ID.
Extra http paramaters can be passed like this (can be used with bfthumbs dynamic functionality):
[bfthumbs custom_single="bft-single-template&sid=bft&category=design"]
------------------
added dynamic {parameters} functionality to targeted templates. For example a template that is targeted for the blog (index/frontpage) can pass a url parameter for how many posts to show. Or a selectbox can send via http post how many posts to show.
Example:
Template targeted to Blog and "Enable dynamic http {variables} for targeted templates" setting is enabled:
[bfthumbs showposts="{sp=6}"]
url: http://domain.com/wordpress/?sp=12
The {sp=6} will be replaced with the sp parameter, but the default of 6 will be used if the paramater is not passed.
------------------
added a custom shortcodes fields in the theme settings. Makes it possible to create custom shortcodes with content and parameters. Even other shortcodes can be added to it's content.
added a new tab to the theme settings. It's called custom, and in it are inputs for custom post types, widgets, taxonomies, shortcodes, post formats and css/script input fields.
------------------
created a template shortcode that shows templates and takes custom parameters. The parameters can be added to template in this syntax: {width} or {height=300} and the shortcode can be used like this: [bftemplate id="32" width="400"] and the width will be passed to the template and height will use the default value of 300. Dynamic paramaters from forms or url can be passed instead of hardcoding them.
Example:
[bftemplate sid="fpt" dynamic="http" template="fpt" height="200"]
and then with a such url to pass parameters (or form post):
http://website.com/wordpress/?sid=fpt&category=featured
and the template:
[bfthumbs category="{category=design}" height="{height}"]
The sid in the url/form must match the bftemplate sid for the parameters to be used by this shortcode (several sids can be added (comma separated) to target more than one shortcode).
The template paramater can also be a dynamic parameter.
Example:
[bftemplate sid="fpt" template="{t=1546}"]
and then with a such url to pass parameters (or form post):
http://website.com/wordpress/?sid=fpt&t=1533
The template value passed can be ID, slug or title. This makes it possible to build several layouts for the same page, changing them with passing a http get or for post parameter.
------------------
the bfthumbs layout html node now executes shortcodes.
------------------
added a dynamic parameter to bfthumbs so that posts can be fetched based om the current posts categories, tags, yarpp (related posts. must have the yarpp plugin installed and activated for this option to work) and http parameters (post or get). The bfthumbs shortcode can be added to the blog index/frontpage (Adspace - Below Posts) or single post page (Adspace - Below Article).
Here's how:
1. Create a page with the bfthumbs shortcode:
<h5>Related Posts</h5>
[bfthumbs sid="bftrelated" dynamic="yarpp" numposts="4" width="124" numcols="4" marginright="10" text="false"]
2. Add it to one of the widget areas mentioned with the BF Page widget.
The bfthumbs shortcode can also instead be added to the textwidget (enabled shortcodes for it in this version), but then you can not use the shortcode GUI or the layout manager.
And here is an http-get example:
[bfthumbs sid="bft" category="design" dynamic="http-get"]
and then the url is like this:
http://www.domain.com?sid=bft&category=featured
Only parameters used in the shortcode can be changed with the url, and the sid must be passed as a parameter (can be comma separated for targeting more than one bfthumbs shortcode).
------------------
removed the "Adspace - Below Article" widget area from index.php and blogposts.php (blog index/frontpage) so that it only shows below the article in single view.
added "Adspace - Below Posts" widget area and bf_below_posts hook to show stuff below every article on the blog index/frontpage.
fixed so that correctly sized images skips timthumb in shortcodes too (bfthumbs, slider etc.)
removed custom styling of wordpress captions (captions inserted into the post) due to a wordpress 3.4 issue.
Added a custom taxonomy creator in the theme settings.
------------------
Added a custom post type and taxonomy creator in the theme settings. It also creates a separate category and tags taxonomy for the post type.
Example bfthumbs:
[bfthumbs post_type="video" category="sport" tags="funny,extreme"]
This works even though they are custom taxonomies, because it's converted to the syntax below:
[bfthumbs post_type="video" tax="video_category:sport,video_tag:funny,extreme"]
------------------
fixed a deprecated add background image function call.
Removed the Facebook Share button, since it was deprecated, and stopped working as it should. It is replaced by the FB Like button (see entry below).
added "Add Social Share buttons at the bottom of posts" theme setting. Adds facebook like, tweet and google+ buttons.
added a css field in the theme settings for custom css.
Improved the columns shortcode. Added 2 more columns (6 columns is now prossible) and some variations. Demo
added bf_after_article hook to the single-nosidebar.php template.
added missing colborder class for the columns shortcode.
fixed a bug with the onlynav and offsetnav parameters for the bfthumbs shortcode.
removed empty categories from the theme navigation admin.
------------------
There was a security issue and many bugs fixed with this release so I recommend an upgrade.