Version 1.2.5 Released Today

CataBlog got a major update today, offering more then a dozen new features and enhancements. Most importantly this update includes the necessary files for translators to localize CataBlog. I have included a preliminary Spanish translation with this release as an example. Another really important thing to know about this release of CataBlog is that it requires WordPress 3.1 or greater.

A few other changes in the interface should also be noted. The CataBlog icon has been moved down to the bottom of the Admin Menu so it does not cause any conflicts. Also, drag and drop reordering of the catalog was removed, instead you may use the date and order fields to sort your catalog.

The most exciting new features in this version are all part of the shortcode implementation of CataBlog. There are a bunch of new parameters, including: sort, order, operator and template. Each of these parameters along with the category parameter, which now works with multiple categories in this version, give you a wealth of options for displaying your catalog. Here are some examples to best demonstrate how to use these parameters.

NEW UPDATE: CataBlog 1.2.5.2 patch has been released. This patch fixes a few minor display and CSS bugs. Please try this version if your catalog is not displaying correctly.

[catablog]
will show the entire catalog sorted using the order field in an ascending fashion with the system template.

[catablog category="dogs"]
will show catalog items that are in the dog category.

[catablog category="dogs,cats"]
will show catalog items in both the dogs and the cats categories.

[catablog category="cats" operator="not in"]
will show catalog items that are not in the cats category.

[catablog sort="date" template="gallery"]
will order the entire catalog by date and use the gallery.htm template file in the plugin views folder.

[catablog sort="random" template="default"]
will show the entire catalog in random order using the default list template.

You may notice that your catalog displays differently after upgrading to this new version. CSS and JavaScript changes in this version may cause unexpected behaviors with old configurations. This is because the LightBox was redesigned to work best with anchor tags instead of image tags. Trust me, this is better, take as evidence the fact that almost every other LightBox plugin works this way. Now a link may override the LightBox image on a per catalog item basis and you could even link to a completely different image outside of your CataBlog or even your Blog. I will write a post documenting how to use this feature soon. For now, if your LightBox breaks, your catalog renders differently or possibly nothing is shown, please make sure to check these things first.

  1. Clear your browser cache.
  2. Reload the default template in the Template Tab of the CataBlog Options Admin Panel.
  3. Make sure the LightBox is enabled in the LightBox Tab of the CataBlog Options.
  4. Make sure the Render a new image to be used... is enabled in the LightBox Tab.
  5. Make sure that the jQuery selector is .catablog-image in the LightBox Tab.
  6. Check that your shortcode is not using the old tag parameter, which is no longer supported.
  7. NEW Make sure the link field is empty when using the default template.

Version 1.2.5 of CataBlog Features this new enhancements:

  • Included a POT file for generating localized PO and MO files inside the plugin's localization folder.
  • The shortcode now supports multiple categories using a comma to separate each category name.
  • The shortcode now supports an operator parameter that lets you modify how the categories filter.
  • The shortcode now supports sorting your catalog by date, order, title or randomly.
  • The shortcode now supports overriding the system template with any template file you want.
  • Catalog items now have a date field that may be used for sorting
  • Category names may now include non alphanumeric characters
  • Various bug fixes and enhancements.
This entry was posted in Localization, New Features, Software Update. Bookmark the permalink.

42 Responses to Version 1.2.5 Released Today

  1. Thanks Zach for a outstanding product!

    We are integrating it with Cart66 the results are exactly what we were looking for.

    We would like to have some pages with the default template, like our store and some pages with the gallery template like our home page. Is this simple to do? When I change the template in the configuration it changes all the pages.

    Steve

    • Zach says:

      Why yes Steve, this is very easy to do with version 1.2.5 of CataBlog. Simply add the template option to the shortcode and set it either to gallery or default. Example:

      [catablog category="dogs" template="gallery"]

    • Zach says:

      I might also take this time to explain how to upload your own templates to CataBlog. This will change very soon, but currently you should upload a HTML file with an extension of .htm to your /wp-content/plugins/catablog/templates/views/ folder using FTP or another file transfer method. This file should contain the exact content you would want in the CataBlog Options Template Tab. You will then be able to use the filename without extension as your shortcode template option. See example above.

      Pretty cool, no? 🙂

      • Jesse Houchins says:

        Is there a reference for %TOKENS% that we can use in our custom templates?

      • It is! Pretty cool!
        I am going to upgrade, right now (Saturday) we were in production Friday, things are slower today… Backup first… Upgrade…

        Ok 1.2.5.2 loaded. In my “store” the text is crowded in on the images, the images cover them up. http://onthestep.com/store/

        I will do some checks on the style sheet.

        • Zach says:

          Steve,

          There have been numerous changes to the StyleSheets, before you go and try and fix it, make sure you have cleared your browsers cache> You should also examine your template code against the templates in 1.2.5.2, they have seen some updates and you should try and match those updates. Namely make sure to remove any %HEIGHT%, %MARGIN-LEFT%, or other CSS based tokens as they are no longer necessary. Let me know if you have any more questions.

          • “Namely make sure to remove any %HEIGHT%, %MARGIN-LEFT%”
            We have never changed your default or gallery style sheets. We just use them out of the box. The 1.2.5.2 version shows no tokens like that.

            I do see them in the 1.2 version we have a testbed set up (I should have done the update there first.) Those images and margins look fine. http://sidewalkflyer.com/store/

            Do you see the margin problem at http://onthestep.com/store/ ? I do in a few browsers here.

            Should I set or adjust margins in my child theme or in a custom template (that I have not made or used yet) I assume I would make changes to affect the .catablog-images-column or .catablog-title and .catablog-discription

            Some notes on the new version, as I indicated at 7:41 (you and I must have been typing at the same time) the lightbox feature no longer functions. even following the steps. 1-6.

            Also when I click on the thumbnail, with the lightbox on or off in the configuration, a new tab opens. Likely due to _blank being set as the default I changed that to _self. Never saw it before because we always used the lightbox feature. That is off now till we find out why it stopped working.

            The movement of the control down to the bottom of the dashboard was a good idea.

          • Zach says:

            So I already addressed the margin issue in the previous comment, your thumbnail images are being shifted right by a CSS rule that has nothing to do with CataBlog but is part of your theme. I would recommend putting this in your styles.css or in a catablog.css file in your theme’s folder.

            .catablog-image img {
                margin: 0 !important;
            }

            As far as the LightBox goes, this is an interesting one. A new feature that overrides the LightBox when you add a link to the catalog item is causing your problem. You may remove the links for each catalog item, or I would recommend trying this template code instead of the default.

            <div class='catablog-row'>
              <div class="catablog-images-column">
                <a href="%IMAGE-LIGHTBOX%" class="catablog-image" %LINK-TARGET% %LINK-REL%>
                  <img src="%IMAGE-THUMBNAIL%" alt="" />
                </a>
                %SUB-IMAGES%
              </div>
              <h3 class='catablog-title'>%TITLE-LINK%</h3>
              <div class="catablog-description">
                %DESCRIPTION%
                %BUY-NOW-BUTTON%
              </div>
            </div>
            

      • Ok,
        Before I got to work on the style sheet, I added the shortcode to our home page [catablog category="all" template="gallery"] (can you blame me I’m excited!) that brought in what we were looking for on the home page. Plus I noticed the size of the text changed on hover, it was assigned a larger font in the past. Perfect!

        When clicking on the icons it goes to the page referenced for that image (product) not the lightbox catalog (very cool popup catalog, I may add) that we did have.

        Same with the “store” page where we use a [catablog category="All"] short code. I did follow all the instructions you provided.. yes, 1-6 I just did that again to be sure.

        Thanks for your thoughts on all that, I will get into the margin issue now on the default template.

        • Zach says:

          Hey Steve,

          glad everything is working out well for you, the margin issue is actually not from the left margin of the title and description, but instead you should make sure that the .catablog-image img has a margin of zero, right now your image is being shifted right and overlaying your title and description. Let me know if that fixes it for you.

      • Chris says:

        YES!! This needs to be added someplace really visible – took me a good while to find these instructions, which work perfectly. Perhaps the FAQ on wordpress.org?

        Thanks again for all your hard work!

  2. Jesse Houchins says:

    The new shortcode features are awesome. Another that could be useful would be “limit”. For example:

    [catablog category="ninja" sort="random" <b>limit="3"</b>]

    This would show three random ninjas. Pagination would also be useful, but I realize that is more complicated.

    • Zach says:

      Just added it to the list of features for the next release 😉

      • Jesse Houchins says:

        I have patched my version with the following changes:

        catablog.php

        
        function catablog_show_items($category=null, $template=null, $sort='menu_order', $order='asc', $operator='IN'<b>, $limit=-1</b>) {
          global $wp_plugin_catablog_class;
          $wp_plugin_catablog_class-&gt;frontend_init(true);
          echo $wp_plugin_catablog_class-&gt;frontend_content(array('category'=&gt;$category, 'template'=&gt;$template, 'sort'=&gt;$sort, 'order'=&gt;$order, 'operator'=&gt;$operator<b>, 'limit'=&gt;$limit</b>));
        }
        

        CataBlog.class.php
        
          public function frontend_content($atts) {
            $shortcode_params = array('category'=&gt;false, 'template'=&gt;false, 'sort'=&gt;'menu_order', 'order'=&gt;'asc', 'operator'=&gt;'IN'<b>, 'limit'=&gt;-1</b>);
            extract(shortcode_atts($shortcode_params, $atts));
            // extract all category names
            $categories = explode(',', $category);
            array_walk($categories, create_function('&amp;$val', '$val = trim($val);'));
            // if sort equals order, change it to menu_order
            $sort = ($sort == 'order')? 'menu_order' : $sort;
            // modify the operator if it is a possibly wrong format to work with WP.
            $operator = str_replace("-", " ", strtoupper($operator));
            // get items from cache and start the output buffer
            if (false &amp;&amp; isset($this-&gt;results_cache)) {
              $results = $this-&gt;results_cache;
            }
            else {
              $slugs = array();
              foreach ($categories as $category) {
                foreach ($this-&gt;get_terms() as $term) {
                  if (strtolower($category) == strtolower($term-&gt;name)) {
                    $slugs[] = $term-&gt;slug;
                  }
                }
              }
              $slugs = array_unique($slugs);
              $results = CataBlogItem::getItems($slugs, $operator, $sort, $order<b>, $limit</b>);
            }
        

        CataBlogItem.class.php
        
          public static function getItems($categories=false, $operator='IN', $sort='menu_order', $order='asc', <b>$limit=-1,</b> $load_categories=true, $offset=0) {
        

        • Zach says:

          Thank you for the suggested code change, and yes I am aware how easy it is to add extra parameters in PHP. By the way, their would need to be more code changes as the custom post query itself needs to be modified.

          One reason I did not implement a limit option in 1.2.5 was because many people have requested for automatic pagination of their catalogs. I was concerned that adding a limit option to the shortcode would cause mass confusion as to why next and previous page link aren’t being automatically generated by CataBlog.

          If you too are asking for automatic catalog pagination, this will not be making it into the next release. People need to keep in mind that CataBlog does not make pages for your blog, it makes content to be inserted into your blog’s pages. Perhaps this will change at a future date.

          – Zach

        • Zach says:

          Actually that probably works because limit and offset are already in the custom post query…oops, sorry about that. If anyone wants to implement a limit option for the shortcode and hack the plugin, feel free to try the code snippets above. Cheers and thanks for your input.

  3. Zach,
    Thanks for your outstanding help yesterday. Sorry to ask so many questions at once, the thread end end up getting confused.

    The edits to the .catablog-image style sheet worked fine. We did those in our child theme, so updates do not eliminate them. I agree somewhere in our css is the problem, it just came out with the upgrade. Thanks for your fix to our problem.

    The custom html template you did, got us back our litebox catalog, it looks great again. We do the link in the catablog text to provide further info to the customer should they need it. They lead to full page descriptions of the products that some people need.

    Remarkable product, remarkable support, I will go on a bit more about how great catablog is in your note about record downloads.

  4. Ran into one more issue with the upgrade on our end.

    Our https page is no longer secure it comes up with this error. (when checked with Chrome developer tools)

    The page at https://ourURL.com/store/checkout/ displayed insecure content from http://ourURL.com/wp-content/plugins/catablog/css/catablog.css?ver=1.2.5.2.
    The page at https://ourURL.com/store/checkout/ ran insecure content from http://ourURL.com/wp-content/plugins/catablog/js/catablog.lightbox.js?ver=1.2.5.2

    We rolled back to the last version and the problem is eliminated.

    • Zach says:

      Hey Steve,

      What version did you end up rolling back to? 1.2? Also, I don’t think I changed the path to the css and js files, so I am curious how rolling back fixed it. Funny enough, I was justing reading online about this problem with another plugin and was like, wow I need to check that for CataBlog… 😉

      I am not a security expert, but I believe that the only reason you are getting that message is because the css and js files are transferred insecurely, but do they need to be transferred securely? No. Still I understand why that message would spook away a lot of internet users.

      I am going to start working on 1.2.6 sometime soon, this version will make sure that all included paths use the appropriate security.

      • I did go back to 1.2, I did the backup Saturday right before we upgraded to 1.2.5.2 I did look through some of your files, I thought that I could change the http to https if I found it. I did not find anything with a quick look, but was anxious to get the store back up. We were up Friday (on 1.2) and lost our first order for a unrelated issue (not security) a big one too. We had a successful order today (small) so a clean security report is important.

        I agree they do not need to be transmitted securely, we even had to clean up the fact that the credit card image was at http not https since “some one could eavesdrop” using that file. Silly IMO but that is how strict the SSL side of the house is.

        We have a second site we are working on that is not public yet (On The Step is 6 years old, and a replacement of a OScommerce site) we will install 1.2.5 on that site so we have a test bed and can investigate this further. Let you know what we find out.

        Can’t wait to get back to the new version, we never got a chance to check out the new method to order (as in assign location on the page) the products! Plus we loved the thumbnails on our home page and the traditional listing on our store page.

        Still, outstanding, up and running, in the version we have working! 🙂

  5. Rachel says:

    Hi there!

    I love your plug-in it’s really great! I do have a question, I have added a price to the item in your form and it is not showing up on the website. I’m not sure if there may be a bug, or if I am missing something.

    Any help would be great! Thanks so much!

    Rachel

    • Zach says:

      Hi Rachel,

      It’s actually really simple to add the price anywhere you want in the catablog options template code. Go to CataBlog Options, and then go to the Template Tab, in this tab you will see some HTML code that is used to render your catalog. If you add the %PRICE% code to your template code it will be rendered in the front end catalog. Also, check out the documentation page on Making Custom Templates, which lists all the current tokens you may use in your HTML template. Good luck and let me know if you have any more questions.

  6. Frank says:

    Zach,
    I just upgraded from 1.1.9 to 1.2.5.3. I see you fixed the problem with not being able to delete a certain length category name, thanks.

    I have some problems:
    1. When I click on LIBRARY it takes 4-5 minutes to load all my images. Then when I finish editing an entry, it takes another 4-5 minutes to reload the image library. This makes it pretty much unusable for me to do any meaningfull work in Catablog. Currently my catalog has 785 entries with about 13 MB of data in the Originals folder.

    2. Adding the Order number to an entry does not help me in any way. The old drag and drop worked great for me. In this new version, when I add a new catalog entry I have no idea what order number I need to assign to the entry. Some of my other entries have order numbers like 4,1,1,2,3,38,1554,54…To have to go to each entry and open it to find out the order number is just not workable. And then when I do get a number like say 854, what exactly can I do with that info? I may be missing something here, if so please let me know.

    3. Adding a Date to each entry and the new sorting features in the shortcodes looks like a great idea. I haven’t tried them yet as the slow loading of the Library is a showstopper for me.

    My production site is still on 1.1.9 and I’ll leave it there until I hear from you. Thanks for all the work you do. Catablog is the backbone of my website.

    Frank

    • Zach says:

      Hi Frank,

      Thank you for pointing out your problems with the new version of CataBlog. I will address each issue below.

      1. If the library page takes 4-5 minutes to load, it is not because of loading 785 images, unless you have turned javascript off. You may verify this yourself, but each image thumbnail is not loaded until you scroll down and it is rendered on the page. This means that your database must be the bottle neck. Who is your hosting provider, are they known to have issues with complex or large database queries? Are you using shared hosting? If so you might consider switching to a VPS or higher end hosting package. When I do a query count on the library page there are only 9 queries, not many database queries at all considering that the posts page has 63 queries. The database queries on the library page are all generated by WordPress functions, so I am unsure how to optimize this anymore. Can you explain the exact difference between 1.1.9 and 1.2+ that is causing the page loads to take so long? Is it that the default category is “All” instead of “Uncategorized”? You may also bookmark the library view of a specific category, if you would rather not load all catalog items. I wish you weren’t having this problem, but perhaps you are expecting too much from free software and your current hosting package. It is incredibly difficult to write software that performs well on all the different server configurations out there. I pay $29 a month for a VPS that lets me load up a library that large, perhaps you need to upgrade…

      2. The order number value in each catalog item is NOT new, but directly editable by users now. The order may be ascending or descending and is basically alphanumeric order, read more about MySQL sorting to understand how this value works. Also, please read the article on ordering multiple categories to learn more about why I made this change, and why you will never get drag and drop functionality in the library itself. A future version of CataBlog may offer drag and drop functionality in a new gallery feature that will allow you to create distinct collections of library items. You kind of missed your chance to offer up a different solution or direction for CataBlog, since that post was published last month.

      3. Glad you like the addition of the date field.

      So, I am concerned that you are expecting too much from free software. If I was in your situation I would probably consider purchasing professional hosting, especially if I am making money from my website or it is my main source of income. I have thought about and may release a “pro” version of CataBlog in the future with its own database table allowing for superior query optimization. This version will not be free and offer better support and consultation from myself. In the meantime you might consider doing some research about hosting providers, in particular I would recommend a hosting provider that offers you a dedicated MySQL database for just your site and your site visitors. Good luck and have a wonderful day.

      – Zach

    • Zach says:

      When I said “dedicated MySQL database” in the previous comment I mean a MySQL database that has these attributes.

      1. runs on the same machine as apache, so the database domain is set as localhost in WordPress.
      2. is a dedicated task/application for just your server, not shared across multiple hosting accounts. most shared hosting does not offer this.

    • Zach says:

      Hi Frank,

      I just wanted to let you know release 1.2.8 of CataBlog now has an Admin pagination feature, so your large Library shouldn’t take 4-5 minutes to load anymore. I hope you didn’t get too offended by my last post, we all have our moments 🙂

      Let me know if I solved your problem with the load time, I am sincerely hoping so.
      Cheers

  7. Haystack says:

    I’m finding an issue with item order integers vs. drag and drop sorting. If I have, say, 15 items and I want to add a new one between items 6 and 7, it looks like I now have to manually increase the order of items 7-15 in order to create a space. Would it be possible to automate this with, say, “move up” and “move down” arrow buttons?

    • Zach says:

      Sounds like a problem. Currently I am forcing you to use an integer for the order value, possibly if I let you set a decimal that would solve your problem. I am not sure if the WordPress schema will allow me to do that, but I will look into it.

    • Zach says:

      After looking into setting the menu_order with a decimal, I now know that it is impossible with WordPress’ database schema. I believe they made the right decision by forcing it to be an integer for performance reasons. If I made a living making CataBlog I would have already released my planned feature to solve this issue. Read more about it at http://catablog.illproductions.com/2011/04/ordering-multiple-categories/

      • Haystack says:

        Thanks. What I’m doing for now is entering values in the 1000’s so there is no need for decimals.

        There seems to be some issue with new entries I add–the thumbnails now all have a black border on the right side, and the intended color on the left. I’m currently looking for workarounds.

        • Zach says:

          Can you send me a link with an example? Thanks

          • Haystack says:

            Sure.

            I’ve just gone through and replaced all my old JPGs with PNG’s that have transparency over the border area, and those display correctly. However, I changed the entry for Freeman’s “Edward H. Rulloff: The Veil of Secrecy Removed” back to the original JPG so that you can see what they all looked liked like before I put in the PNG:

            http://www.victoriangothic.org/bookshelf/

            Black border to the right, intended color to the left

            As you can see, I’m using Catablog to organize a bibliography. One thing that would make this easier, in future versions, would be the ability to add and sort by custom fields, such as the author’s name.

            It would be nice if the “Link” field could apply to the title as well as the thumbnail. In most cases I can put an Amazon affiliates link into the title field itself, but in the case of longer titles there are not always enough characters.

            Of course, I understand that you have limited time to write fixes and add new features–I’m just offering some input. Catablog is the best plugin I’ve found for listing an inventory in a way that integrates well with the design of the site–I didn’t want to use a tacky Amazon store or something.

            Thanks for your help.

  8. Ted says:

    Hey Zach, I just came across your plugin. Great job man.
    Was just wondering how I could get items, with titles, descriptions etc. to load on a separate page as opposed to only in the lightbox.
    I ‘ve been through all the documentation on the site, although I haven’t had time to read through all the questions asked. If you have already answered this before, could you please point me in the right direction.
    Thanks

    • Zach says:

      Hi Ted, I’m very glad you are enjoying the plugin. There currently is no automatic way for you to turn your catalog items into individual pages. This will most likely be a feature in a future upgrade. What you are experiencing is your browser simply loading the LightBox resolution image into the browser’s main window, look at the URL, it ends with an image extension like jpg.

      If CataBlog did have this feature, it might require that you create a specific template file in your theme (single-catablog-item.php), how comfortable do you feel with that? The reason for the needed theme file is that a catalog item has values that do not correspond to a standard posts values. Values like the product code, price, link or the sub images would all need their own display hooks in a template file.

      I guess I could override what the_content() renders to the page, but that seems like a much more limited option. Since all the catalog item’s content would have to be displayed in the content section of the page. Also you would lack the ability to change how the page around the content section appears. I see people needing control over the entire catalog item page.

      In the end I hope that a combination of both ways will be implemented and offer the most options. In the meantime, I encourage you to still use CataBlog to create well organized lists on your site. Cheers 🙂

      • Ted says:

        Zach, thanks for the prompt response man. Its much appreciated.
        I started playing around with something similar to what you suggested while adding a query string to the end (eg. catalogue.php?catablog-items=xxx) however as im still relatively knew to developing for wordpress so i’ve got to mess around with it to see what I can come up with.Thanks for your suggestions and if I find a solution, I’ll let you know.
        Cheers

  9. Hi Zach,

    I’ve just installed this, and managed to successfully activate it after tackling a php version issue, by adding AddType x-mapp-php5 .php in my root .htaccess file. Before it was throwing back a Fatal Error on activation.

    As for how the plugin seems to be working, it’s a dream! So easy to use in it’s basic form. I’ll be attempting to style it up so hopefully if offers a lot of flexibility in terms of styling the individual elements within the [catablog] code.

    Cheers. Great work!

  10. C. Scott Gilbert says:

    The change in sorting is a problem for me — I now have to go through and re-number all of my images to make room for room images at the top of the stack. I always want new images to appear on top. This means editing every image in my library by hand to change the number.

    I tried to do this via the date sorting — but there seems to be no way to sort descending.

    Any thoughts on this?

    • Zach says:

      Please read the displaying catalogs in posts section of the documentation. There is a Shortcode parameter to change ascending to descending.

  11. Hey I just posted about random order and I found the issue!

Leave a Reply

Your email address will not be published. Required fields are marked *

Please wrap any HTML markup or code with the pre-formatted tag: <pre> </pre>