Documentation

Please select a chapter from the Documentation submenu.

68 Responses to Documentation

  1. Linda says:

    I’m using the Catablog in my sidebar1.php page. I’m not sure what I’m doing wrong, but I can only get [catablog category='Used Boats'] to appear. Can you please advise what I’m doing wrong? Thanks!

    • Zach says:

      You are using a shortcode in a PHP file. Shortcodes, are made to be used within a post or page only, if you want to render CataBlog in your theme’s PHP file you should use a PHP function. This is an example usage of the CataBlog PHP function.

      <?php catablog_show_items($category, $template, $sort_field, $sort_order, $operator); ?>

      All the parameters are optional and the category parameter can be an array of category names as well as a single category name. Each parameter directly relates to a shortcode option, so for your shortcode, you should use this code.

      <?php catablog_show_items('Used Boats'); ?>

      • Audee says:

        could you please give an example of how to use template=”gallery” in the PHP function? and maybe for some other parameters?

        thanks!

  2. Where can I find more information about functions like catablog_show_items?
    Is there a similar function to get only the categories?

    I would like to split up the gallery by category, like:

    Cat 1:
    pic1, pic 2, …

    Cat 2:
    pic 3, Pic 4, …

    • Zach says:

      The catablog_show_items() function has many parameters that you may set to filter your catalog results. But first I want to make sure you are implementing CataBlog correctly.

      The template function, catablog_show_items('Cat 1'), is meant to be placed inside your theme’s template files, such as sidebar.php or page.php.

      The Shortcode, [catablog category="Cat 1"], which offers the same parameters as the template function, is meant to be placed inside the content of a post or page you edit in the Admin section.

      You may read more about these parameters at the displaying your catalog in posts documentation page. Keep in mind that the Shortcode does not care what order your enter your parameters, but the template function requires that parameter be implemented in the correct order.

      • Karl von Karton says:

        In understand the principle. My question aplies to the template function.
        What I’m interested in, is to know how I can get the categories without me knowing the categories in advance (since it is a cms and users can add categories).

        So I was wondering how I can accomplish something like hereunder:

        foreach($arrOfCats as $cat){
        catablog_show_items($cat,’gallery’);
        }

        • Zach says:

          I would look into the get_terms() function built into WordPress, off hand I believe that the taxonomy label is catablog-terms, but you may double check this in the catablog.class.php file. Good luck and let me know if you are able to create your desired interface. Cheers!

        • Zach says:

          functions like get_terms() will have to be implemented in your template code, and will not be accessible in a post or page editor. I personally would not consider CataBlog a CMS system as much as a cataloging or gallery making application. Perhaps one day it will be a CMS, in the mean time you may hire me to create completely custom CMS solutions within WordPress.

  3. Alex says:

    I use your plugin and is simple and work very fine. But i have a problem with the thumbnail sizes. How i can modify, the .css. For example the default thumbnail is square 120 x 120, i need chance 120 x 80.. Is posible?

    • Zach says:

      You may try to wrap your CataBlog generated 120 x 120 pixel thumbnails with a smaller HTML element that crops the image, try these CSS settings:

      .catablog-image {
        display: block;
        position: relative;
        width: 120px;
        height: 80px;
        overflow: hidden;
      }
      .catablog-image img {
        display: block;
        position: relative;
        top: -20px;
      }
      

      Please rate and confirm CataBlog works with your version of WordPress at http://wordpress.org/extend/plugins/catablog/

  4. Winston says:

    how do you have the title show up and the color change when you scroll over the box?

  5. Chronocube says:

    This is a great plugin. I am currently using the catablog to populate related products on a page. However, the similar product that is on that page is being populated. Is there a way to exclude current page from being populated?

    • Zach says:

      I am unsure exactly what you mean, could you please provide a link along with a detailed explanation of what is wrong. Thanx

      • Chronocube says:

        Sorry for the multiple comments. Wrong formating.
        However, using <?php catablog_show_items('Category 1'); ?>, the column will still populate the page I am currently in. I wish to exclude my current page from being shown, is there a way?

      • Chronocube says:

        Hi Zach. Currently, I don’t have a link to show.

        Let me explain. For example, I am in a page that belongs to category 1. Inside that page, there is a column that show all the related post from same category(category 1). However, using , the column will still populate the page I am currently in. I wish to exclude my current page from being shown, is there a way?

        Hope you understand what I mean. Thanks.

  6. Jerry Lee says:

    I know this is a killer plugin, but I cannot get it to work. I too am getting the views error. I know how to create shortcodes in posts, and code in pages, but somehow I am missing it. I have also created .htm files in the views folder of the plugin. I am stumped.

    CataBlog ShortCode Parameter Error: The template attribute of this ShortCode points to a file that does not exist. Please make sure their is a file with the name '.htm' in the views directory.
    CataBlog ShortCode Parameter Error: The template attribute of this ShortCode points to a file that does not exist.

  7. Nicolas says:

    Thank you Zac for this useful plugin. I would like to use this as soon as possible on my website but I have a problem when I try to display a catablog-term page : I tried the link http://www.website.com/category/catablog-term-testcat but there are no results found. The others categories are accessible by the link http://www.website.com/category/slug-category and I verified the slug of my catablog-term entry in the database which is “catablog-term-testcat”.
    Can you please guide me to the good link of catablog-terms?
    PS : Category Archives are activated in Catablog options and the Category Pages Slug is set to “catablog-term”

    Moreover, I am currently translating Catablog in French, I send you the files when the translation is completed !

    • Zach says:

      Wow, Thanks for translating CataBlog into French, I would love to integrate those files into the main code branch of the plugin as soon as you are finished translating.

      As for your category pages not being found, what exactly are you experiencing? 404 pages, empty category pages? Have you tried these urls:

      http://www.website.com/catablog-terms/testcat
      or
      http://www.website.com/catablog-terms/catablog-term-testcat

      You may also use the WordPress menu system, by clicking the view options in the upper right corner and enabling CataBlog Terms, this will let you add individual catalog categories into your menu system, and I am sure the URLs will be correctly created by WordPress itself.

      • Nicolas says:

        Hi Zach,

        I forgot to come back here for a while, CataBlog’s new version reminded me that I wanted to give you my french translation of CataBlog.
        You can download it on my wordpress installation : http://mecenetp.fr/wp-content/plugins/catablog/localization/catablog-fr_FR.po
        I added the new version’s last changes.
        Hope it will be usefull !

        • Zach says:

          Thank you for the french translation. I will add it to the CataBlog codebase in version 1.6, to be released later today 🙂

          • David Kartuzinski says:

            Hi! The french translation… Uhm, I updated catablog to the latest version. Fantastic! Thank you both, one for the translation and the other for the update.
            -DK

          • Zach says:

            There was a bug that broke the french translation at times, if you update to CataBlog 1.6.4 the bug should go away. Also, there are some new strings that the French translation is missing, Nicolas, if you still have time I would love an updated .po file.
            Cheers!

  8. Jessica says:

    Hello,

    First of all I would like to thank you for this great plugin. It has allowed me to make a very nice website: http://www.itsthat.com.

    One thing that I am struggeling with is the information pages. If you look under more info on the website you can see some of the info pages needed. It is all fine… only is there a way for me to get the price to not show on these items. We would like to keep them as “items” as some info sometimes needs to be put next to a object in the catablog or on the home page and this gives a good option to do so.

    Hope you can help.
    Many thanks.

    • Zach says:

      First off, let me say that your site looks very nice and I am impressed with the way you integrated CataBlog into your theme. I need to know more about the integration of CataBlog and your theme. How are you displaying your catalog: Shortcodes, PHP, or the unique single page for each entry option. If you are using the last you should be able to edit the single.htm file in /wp-content/plugins/catablog/templates/views/single.php.

      • Jessica says:

        Thank you for the compliment.
        I use the following code for example on the industial page: [catablog category="Industrial"]. Then when you click on a single product it shows the single template.

        That all works fine. But what I need is for the overview page to sometimes have a price and sometimes not have a price. So for example when adding a product into the categorie “industrial”, it should show the price and therefor use the template for a product with price. But when I add an item to, for example the categorie “more info”, i would like it to show use a different layout for the overview and the single view. so no price is shown and also the background of the layout is different.

        • Jessica says:

          Also: I can’t get the lightbox to work on the main image in the single view. Could you help me with that?

          • Zach says:

            If you are using the built in CataBlog LightBox, make sure the ‘a’ tag surrounding the main image has a class of catablog-image.

        • Zach says:

          Jessica,

          CataBlog isn’t exactly setup for conditional data like you want, meaning that the price may or may not be shown. If the price is zero then CataBlog will not show the number, but any language or monitory symbols will be shown, so that doesn’t really work. You could create a category called hide-price or something to hide the price with CSS. Simply add the category slugs token into the class attribute of your catalog item’s row div. Now you may add a CSS class in your style.css file something like .catablog-row.hide-price .catablog-price { display:none; }.

  9. Wagner says:

    I want simple. How do I rename “PREV” and “NEXT”? In which file do I change these names? Or to use an image? Thank you.

    • Zach says:

      You can use an image with CSS, just look into replacing text with an image in CSS. You will need to use the background-image attribute in your CSS classes.

    • Zach says:

      CataBlog 1.3.2 now has the ability to set the label of the previous and next navigation links. It also lets you set where it is rendered and if the extra page data should be shown.

  10. What a great plugin!. My first catalogues are in this exhibition review:

    http://berkshirereview.net/2012/01/rembrandt-and-the-face-of-jesus-detroit-institute-of-art/

    Everyone is delighted with the grid view. I was able to use it to make readers think about what the paintings have in common and what is different. Thanks, Zach!

    • Zach says:

      Glad to help, that’s an awesome use of the plugin and I’m glad to see CataBlog being used in such away. Let me know if you find any other uses for it and have a wonderful day. 🙂

    • Zach says:

      hey, got a second and want to help me out? it would be awesome, if you haven’t already, if you could go to CataBlog’s Plugin Page and rate and confirm it works with your version of WordPress that would be very helpful. Thanks in advance.

      – Zach

  11. anaske says:

    is there any way i can change the default catablog to show products in 3 columns in stead of only one. i am not good at css. help pleace.

  12. aljay says:

    hi how can i add a pagination function in a catablog term? i like your plugin

  13. James says:

    Hello,
    So far I like the plug in but, I would like to add “price” field directly after the upload. There is title and description but, no place for price. I would also like to see a checkbox that indicates:
    Check to make link the permalink.
    This would help a bunch when using gallery view. Assigning the permalink to the gallery image by default. Without that, I have to copy and paste the permalink into link field on library view. This allows the click on the image to go to the public page for that item automatically.
    These mods would allow me to add a product without having to go into library to continue the edit unless I wanted to add subimages.

    I already modded catablog.upload.php for “price” field but, I don’t know which script to edit to add the fields value to db.

      $html .= "<div class='text-elements'>";
      $html .= "<input type='text' name='title' class='title' value='".$new_item->getTitle()."' />";
      $html .= "<input type='hidden' name='id' class='id' value='".$new_item->getId()."' />";
      $html .= "<textarea name='description' class='description'>".$new_item->getDescription()."</textarea>";
      $html .= "<input type='text' name='price' class='price' value='".$new_item->getPrice()."' />";
      $html .= "<input type='button' class='button-primary' name='submit' value='".__('Save Changes', 'catablog')."' />";
      $html .= "</div>";
    

    I also edited library to populate the “link” field with the permalink but, have to edit and save for it to get added to db obviously. The checkbox to use permalink for link in the upload step 2 process would be a great feature.

    The upload, add “price” and “link” or “use permalink for link” would allow people to add their items in one motion without having to go into library to continue editing after the upload.

  14. James says:

    The guy who wants to use this is not a patient as I and it has been four days here without a reply. So, off to find another solution. Need the ability to add a product in one area. Not having to visit two areas, “Add New” and then “Library”.
    Please put price field and link field in ‘”Add New” right after upload.
    I will revisit this in the future.

    Thanks anyhow…

    • Zach says:

      Hi James,

      I appreciate your interest in CataBlog, and I agree with your desire to have more fields in the “Add New” micro editor. My idea is eventually to use the screen options tab, upper right, to let one turn on and off specific fields they may want to edit, just like the Library and Gallery view let you change which columns are visible.

      I would like to remind you that being a free product that I work on in my spare time, CataBlog has no deadlines or expected release dates. So far, every time I have quickly turned around a new feature based on a comment, I regret it. The commenters will become entitled and tell me other things I must do right away, and the feature won’t be fully thought out, only really helping a couple people instead of the entire community.

      Also, I would recommend you look into the CataBlog Template system more in regards to your desire to have a “permalink” checkbox. If indeed every item should point at their permalink within a specific context, then simply use the %PERMALINK% token instead of the %LINK% token in a custom template you make and ignore the link field altogether. You might have to replace other tokens that use the link value by default. For example, you should replace the %MAIN-IMAGE% token with something like this:

      <a href="%PERMALINK%" class="catablog-image" target="%LINK-TARGET%" rel="%LINK-REL%">
        <img src="%IMAGE-THUMBNAIL%" alt="%TITLE%" />
      </a>
      

      • James says:

        Thanks for your reply,
        As a retired developer myself, (writing code since 1974), I am very seasoned in relation to mod requests and how to filter real world vs frivolous suggestions. (Comes with experience and a gauntlet of corporate B.S.) I can do the mods myself but, I needed to know where the add new form is parsed so, I could have written the mods without having to read through the entire script. I never got that answer. This would have allowed the user to add the images, title and description as is done currently, then add price and link right there. The whole shebang. Just makes too much sense. Currently, you add then, you have to go into library and edit what you just added. With the simple mod I mentioned, the library would only be used for editing existing. Currently, in gallery, a click on image does not take user to images page. A permalink would need to be used in link area of link in library. So, there are some “close to conflicting” scenarios but, very useful just the same. Keep up the good work but, please modify the add script so, you can in fact add the “product” at that point in one shot. Your solution you mentioned above does not make sense to me as the template system is not for admin functions. I was suggesting the offering of assigning a link at the add page AND, offering a checkbox that allowed the user to just use the permalink. This would circumvent the need to modify any templates therefore, value added, time saved and continual process improvement so, more of a benefit to the community. No need to mod a template if certain admin options exist. Naturally, that is the ISO trainer in me talking or perhaps an echo from when I was a professor at NCR. What you are experiencing is why I do not write plug-ins anymore. Really is a full time job in itself and a commitment upon release. BUT, where would we be without all the folks out there doing just this and the venue we have today where anyone can get up and play. Keep up the good work and I will revisit this perhaps on my next project in where I need a simple catablog. Yours was the best solution I found but, without the ability to add a products price and link in the add product area, I just can’t use so, I was forced to write up a quickie Perl solution to handle this uhhh “dilemma” 😉 ….

        Please modify the add script so, you can in fact add the last two remaining variables for the “product” at that point… in one shot.

        Keep writing and…. Dream in code…

  15. Drew shane says:

    Hey Zach I have a question for you regarding shortcodes from other plugins.

    I have another plugin that uses shortcodes but when i put it into a catablog entry it does not render out. Why is this and is there a way to make this work?

    thanks for making a truly great plugin!!!

  16. Steve says:

    Hi,

    is it possible to randomly display catalog gallery (photo and title) in the posts, each time when visitor refresh page? What I mean is, it will be changed the order of the items each time when page is refreshed.

    Thanks

  17. Pingback: Catablog - Easy Plug-in to list Products in Wordpress without needing a store - Wordpress Design Shop

  18. Kuba says:

    Hi Zach!
    Your great plugin just about to save my ass 🙂 One question though, is it possible to create links as the catalog is rendered in the post? Here’s my site http://fafankula.pdg.pl/produkty/ and the links don’t work. They only work from the sidebar and regular menus. Also, is it possible to make thumbnails also link to catalog items (or categories)?

    • Kuba says:

      ok, I managed the part about links, when I’m creating an item, I need to add link manually 🙂 still don’t know is it possible with images but getting there maybe 🙂

  19. Maarten says:

    Hello,

    I’am trying to use 2 shortcodes in 1 page but that doesn’t work, the frontend display’s only the first shortcode 2 times. hope there is a solution?

    Here is the code i want to use:

    title
    [catablog catogory="figures" template="default" limit="2"]
    Bekijk alle producten

    title
    [catablog catogory="connectlights" template="default" limit="2"]
    Bekijk alle koppel verlichting

  20. Wayne says:

    Hi There.
    Is it possible to display only a certain amount of the description text, and then for it to say something like ‘read more’ so that i can have a list of my products without the full description
    any help would be much appreciated
    many thanks

  21. Wayne says:

    hi
    me again ok when i use the catblog shortcode to display a category, it only shows 1 product per page. how can i set it to display all the products in a category on one page, kind of like the traditional shopping cart style.
    also it says that you can change the default page template that it shows the product on. for example i would rather display the product description on a page template rather than the blog template. is this possible?
    many thanks

  22. Rjay says:

    How to insert catablog into template file??

    i use this code

    but nothing happens? i dunno wats the problem

  23. Richard says:

    hello I have a problem … to change the thumbnail size does not allow saving the settings made … I want a larger size to 100×100 but I can not change .. as I do?

  24. Hello, I need to change the thumbnail size to 150×150 but once I change it the “SAVE CHANGES” won’t highlight and I can not make changes. It will stay 100×100…???Please advise ASAP. I need to set up my gallery, thanks!

  25. kevin says:

    hellow I am currently using catalog on my project pages of fiendbmx.com with no issues and was able to adjust a few simple lines in the .css file of the plugin to get the thumbnails to display as a row under my main page image rather then a column how ever as i am building and working on a updated version of the site i am having the same issue where no matter what i am doing for the life of me they simply will only display as a vertical column andy help would be greatly appreciated. and yes i am aware and will be child thumbing the entire site once it is done.

  26. ram says:

    hi.

    hello I have a problem … when i am using click image in lightbox two times image will be displayed.how to resolve this issue.please replay me urgent

    • Zach says:

      Ram, it sounds to me like you have bound the click handler for the thumbnails twice. Please try disabling any other plugins and use a known working theme such as TwentyTwelve. If that resolves your problem then you should enable each plugin and your theme one at a time until the problem returns. You will now know what is messing up CataBlog and can evaluate or fix that problem.

      Cheers 🙂

  27. SR says:

    Is there a way to display a category in a single entry page?
    For example, if I make one top-level category and want to create sub-categories.
    I tried to type [catablog category="mysubcategory"] in the entry description but it seems to output nothing.

  28. Pablo says:

    I little tweak I made that others may find useful. A client wanted to be able to upload multiple sub images in one go, rather than one after the other. The changes required are:

    admin-edit.php around line 323

    <input type="file" id="new_sub_image" name="new_sub_image[]" multiple />

    then in CataBlog.class around 1468

    foreach($_FILES['new_sub_image']['tmp_name'] as $value) {
              
              $tmp_name = $value;
              
              if ($this->string_length($tmp_name) > 0) {
                $validate = $result->validateImage($tmp_name);
                if ($validate === true) {
                  $result->addSubImage($tmp_name);
                  header('Location: admin.php?page=catablog&id=' . $_POST['id']); 
                  //die;
                }
                else {
                  $error = $validate;
                }
              }
              else {
                $error = __("You didn't select anything to upload, please try again.", 'catablog');
              }
            
    }
    

  29. David says:

    Hi,
    I it possible to link to a gallery using a hyperlink rather than inserting the gallery in the post?

    Ergo word Cats linking to a gallery that opens in popup with cat pics..

    Thnx

    • Zach says:

      You should try turning on the public feature in settings. This will setup urls you can hyperlink to for all your CataBlog categories.

      As for the popup, you should do that on your link however you normally do that. Good luck.

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>