Shiba Widgets 1.1

The Shiba Widgets plugin allows you to assign different widgets to different posts, pages, categories, or tags.

New features for Shiba Custom Widgets 1.1 -

  • Updated for WordPress 3.0. Plugin will now work on 2.9 and 3.0.
  • Copy widget sets.
  • Assign widget sets for front-page, search, file not found (404), all posts, all pages, etc.
  • Retrieve and delete lost widgets.
  • Tag and Category widget information is now stored in a metadata table. It no longer shows up in the description section.
  • Propagate text widget changes.
  • The Multi-Column Widget and Style Widget now use standard WordPress core options to store their results.

[Full description of the Shiba Widgets Plugin]

1. WordPress 3.0

Plugin now works in WordPress 3.0 (multi-site support has not yet been added). It will also work in WordPress 2.9+.

2. Copy Widget Sets

You can now copy widget sets in the Manage Widgets screen.

When you copy a widget set, new widget instances will be created for each of the widgets in the original set. In this way, you can alter the copied set in any way you want without accidentally changing the original data.

Inactive widgets will also get duplicated when you copy a widget set.

You can create as many copies of a widget set as you want. A unique slug name will be generated for each duplicate widget set.

3. New Widget Options Menu

There is now a new widget options menu under Appearance >> Widget Options.

The widget options menu allows you to assign widget sets to common pages or groups of pages such as -

  • Blog front page.
  • File not found page (404).
  • Search page.
  • All posts.
  • All pages.
  • All attachments.
  • All category pages.
  • All Tag pages.

Note – Widget sets for specific posts, pages, categories or tags will always take precedence over these blog-wide assignments.

Other widget options include -

  • Show lost widgets – Show widgets that are no longer assigned to any sidebar. Widgets can get lost when you save a widget set using a different theme, which may have a different number of sidebars.
  • Lost widgets will show up when you edit or create a widget set. The lost widgets area appears at the bottom of the screen below the inactive widgets area.

    Lost widgets do not get duplicated when you copy a widget set.

  • Inherit widget from parent – Allows you to set whether child pages should inherit the widget set of their parent page. This is a great feature suggestion made by Rob.

4. Propagate text widget changes

Text widgets now have an additional propagate setting.

This setting allows you to propagate text changes across all other text widgets that contain the same data.

This function is most useful when you have several copied widget sets that all have the same text. Using the propagate setting in this case means you only have to make the text changes once, and it will propagate to all the other copies.

5. Please report bugs and features below

This is a big update, so please report any bugs that you find. Feature suggestions are also very welcome.

Related Articles

Comments

  1. says

    Great plugin in general. I’ve used it on a handful of websites lately and thinking of making it a standard addition.

    Tonight, trying it on a new site (with a slightly flaky server) I received a fatal error when I tried to activate the plugin. No other message, just ‘Fatal error’. I tried again and it worked the second time. Thought I’d mention it in case it helped anyone else.

    Apache version 2.2.15
    PHP version 5.2.13
    MySQL version 5.0.92-community

  2. Dave says

    The image widget is not working with the image sets plugin. after you upload an image and click add to widget, the page goes blank. I tested it without the plgin sets and it works. Could you pleace take a look at it. Thanks

  3. Rob says

    Hi Shibashake

    I am now implementing ecommerce with secure transaction on the same site that I’m running Shiba custom widgets. I am running into a problem where the page is not 100% SSL secure because the Shiba style sheet is loading into the header with “http” instead of “https”. This gives the user a warning that not all page elements are secure (not good).

    So I have questions and requests…

    1) Can you make an update that will auto-detect whether a page is “http” or “https” and then have it write the appropriate absolute URL? That way the shiba plugin and css file references will also be encrypted SSL. I noticed some code that does this in the ecommerce plugin, maybe you can borrow from their methods, let me know.

    2) Or is there a quick way you can show me to edit the plugin to make the shiba links and references relative, without the full absolute reference of “http” that way they are relative and will be encrypted.

    #1 method is probably best for your plugin in long term, but I will settle for any quick fix that I can implement now. I wish I knew PHP, maybe I could figure it out myself. Any help is greatly appreciated!

    PS: Let me know if the fix is easy to implement on other plugins as well, because I have another activated plugin causing the same issue and I need to either fix it myself or contact the development company.

    Thanks!

    • ShibaShake says

      Hi Rob,
      #1 can be done but it will be a relatively big change. I will need to alter all the URL constants and replace it with a function instead. Also, testing would be an issue since I don’t run any SSL pages.

      I will add it onto my to-do list but I likely won’t get to it for a while.

      To do #2 edit the shiba-widgets.php file. Go to line 218 -

      wp_enqueue_style('shiba-widgets', SHIBA_WIDGET_URL . '/shiba-widgets.css');	
      

      Remove the constant SHIBA_WIDGET_URL and just put in the relative file path. Not sure if this will solve the SSL issue since I am not familiar with SSL coding.

      wp_enqueue_style('shiba-widgets', '/wp-content/plugins/shiba-widgets/shiba-widgets.css');	
      

      Alternatively, you can also hook into wp_head and add the css styles functionally with something like this -

      add_action('wp_head', 'widgets_header_style');
      function widgets_header_style() {
      ?>
      /* add css styles here */
      <?php
      }
      
      • Rob says

        Shiba
        THANKS! The second option worked. (although I found that line of code on line 159)
        Anyway, for SSL, all you need is to have all relative or fixed URLs, or if the URLs are absolute, they need to use the HTTPS protocol. Then of course you need the certificate properly set up, but in terms of a page’s links/URLs, it’s that simple.
        Thanks again!

        • ShibaShake says

          Glad it worked out Rob and thanks for the information on SSL. Now I will know what to do when I need to set up SSL pages. :)

  4. Rob says

    Hi again Shiba
    I have implemented the plugin on a new site running WP 3.0.1 and all installed well, but I’m experiencing some weird bugs.
    Some of my widgets seem to get mixed up or crossed up in the database. It’s almost like WP or the plugin confuses which widget it should load. I can’t detect any pattern, it almost seems random.

    I create a widget, save the widget, save the Shiba widget set, then it looks good when I go to the page on front end, but when I return a few minutes later to the same page, the text is different. It pulls text from another widget set, and mixes up titles/bodies of my text widgets.

    All my widgets are WP “text” widgets, just WP simple text/html widgets with a header and a sentence or two and a link.

    I have a different set of widgets on each page, about 10 pages. However Some of these text widgets are almost identical except for a few words (maybe that’s causing a problem?). Several of the widget titles are exactly the same, and the main text has only slight variances. So maybe somewhere the plugin gets confused by nearly identical widget content and then mixes up the title and content.

    That maybe makes no sense. It’s hard to explain. Any advice would be greatly appreciated.

    Site is supposed to go live tomorrow, I hope it’s an easy fix, client is worried, me too.

    Thanks in advance

    Koko says hi!

    Rob

    • ShibaShake says

      Hi Rob,
      Did you get the latest version of the zip? It could be an issue with the propagate functionality which I have fixed in the latest version. In the older versions, the propagate checkbox gets activated by default, so changing the text of one widget can cause the results to get propagated to other text widgets that contain the same text.

      Also are the widgets newly created or were they created a while ago and converted?

      You can also try turning off the propagate functionality by commenting out lines 142 and 143 in shiba-widgets.php.

      After loading the new zip or turning off propagate, go into each of your widget sets and make sure that the proper text is showing up in the edit screen. Also make sure to only open one widget edit screen.

      Otherwise I would need to look at the site to get a better idea of what is happening.

      Hugs to Koko!

      • Rob says

        I am running v1.2.2 according to my plugins panel. Is that the latest? Please let me know.

        The propagate feature confuses me, what does it do exactly? If I understand correctly, that might be the issue because all of them are turned on (checked). I will go through and turn them all off nad redo them and see and test further. I have a lot of work to do…about 30 widgets.

        Some of the widgets may have been created before the latest upgrade, most most afterward I think.

        I’ll let you know what happens.
        Thanks.

        If I still have problems,

      • Rob says

        Sorry, started to say, if I still have problems, I wouldn’t mind you logging in.

        I just tried editing some widgets and unchecking “propagate” and on some widgets, I uncheck propagate, then click “Save” and the check comes back immediately. I can’t get rid of the checked box!

        I guess I’ll try commenting out the propagate feature–especially since that goes against my whole purpose which is different widgets on every page.

        I’ll be back with news.

      • Rob says

        So far so good. I think the propagate feature was my issue–I just did not know what that feature was for, how it worked, or how to use it.

        Here’s I did … I did not re-install (running v 1.2.2 already), but I deleted all my widgets, deactivated Shiba, dropped the Shiba mySQL tables, commented out the propagate lines per your suggestion, then activated and started building my widget sets from scratch again. So far so good. Will be done tomorrow hopefully with no further issues.

        Again, THANKS SO MUCH for replying on a Sunday! You’re awesome.

        For future, I have some improvement suggestions:
        - Propagate feature should be off by default
        - It should be explained more clearly exactly what it does in the admin interface, and perhaps a warning.
        - In options, perhaps a method/button/script to “turn off all propagation” in existing widgets, even if some are currently checked on. This would fix the problem and make all widgets standalone and unique at their present state (in theory).

        I am not sure of the usefulness of the propagation feature in general. I love your plugin because it allows me to create completely unique sidebars/widgets on every individual page if I need to. The propagate overrides the uniqueness, which kinda goes against the nature of the plugin IMHO. I think this is what confused me to start. That’s why I said it should at least be clearly defined/explained and maybe have some warnings built in.

        Still love it, and thanks again.
        Rob

        • ShibaShake says

          Glad it worked out Rob.

          Yeah I am thinking of turning off the propagate since it seems to only complicate matters. It is useful for my own purposes, because I have certain text widgets that I want shared across multiple widget sets and I don’t want to have to edit each and every one of them every time I need to do an update.

          Good luck on your launch tomorrow!

  5. Chris says

    I have a similar problem to the one Greg has had, but the fix didn’t solve it yet.

    On activating I got “Fatal error: Call to undefined method: stdClass->save_widget_settings() in ……..plugins/shiba-widgets/shiba-widget-activate.php on line 77

    I did what you suggested, then activation worked fine, with the exception that everything on the plug-in screen got really spread out.

    But then going to Widget Options I get

    Blog Widget Options

    is_frontpage

    Fatal error: Call to a member function on a non-object in …………../plugins/shiba-widgets/shiba-widget-options.php on line 69

    I have WP 3.0.1

    • ShibaShake says

      I tried some time ago but wordpress.org did not think my main site shibashake.com was appropriate because it was about dogs and because I used some SEO terms.

  6. says

    Hi
    I just downloaded Shiba Widgets plugin for my new site but when I try to activate it I get this error.

    Fatal error: Call to undefined method: stdClass->save_widget_settings() in /homepages/16/d94783459/htdocs/aging-root/wp-content/plugins/shiba-widgets/shiba-widget-activate.php on line 77

    How do I fix that?

    Thanks.

  7. Michael says

    Greetings,

    We just updated to WordPress 3.0 and while widgets are still working on the site, the admin portion is not. The plugin options are there, but when we go to “Manage Widgets,” there are no widgets listed at all.

    What’s a widget man to do?

    Thanks,
    Michael

    • ShibaShake says

      Try downloading the latest zip and see if it works.

      I patched this issue a couple of days ago – so hopefully the new zip should fix it. Otherwise, please let me know.

  8. Rob says

    Shiba, Again, great update, thanks again.

    I just installed the update and think I found a problem. All my styles disappeared after I updated. I had one widget set with classes in the “widget styles class” field for each widget, which I created custom CSS styles for, and the fields were cleared out after the update.

    Let me know if there’s a way to restore the classes, or maybe what went wrong.

    I’m not sure if I updated corretly (I’m new to WP). I deactivated v1.0.8 then renamed that folder, then uploaded the new files for v1.1 and activated. Does that sound correct?
    Thanks
    Rob

    • ShibaShake says

      Sorry about that – I changed the way in which the style data is stored (so that it now uses the standard WordPress widget settings) but I forgot to write a function to transfer the old styles to the new system. The same is true of the multi-column widget options.

      The easiest fix is probably to re-enter the style classes.

      If you have many style classes, and want to recover that data then DO NOT uninstall the plugin as that will delete the old style classes. Instead edit the plugin and go into the uninstall.php file, and comment out the last two lines -

      //delete_option('shiba_widget_styles');
      //delete_option('shiba_widget_mcol');
      

      Then I can work on writing a function to convert the old style data to the new format. Let me know which way works better for you.

      • Rob says

        It’s not a problem. It only happened on my test site. I can easily add the styles back in. I just wanted to give you that heads up, maybe so you can let people know it’s a “known issue” and I’m sure you’ll fix with an update. Thanks again.
        Rob

    • ShibaShake says

      Ok, I have uploaded a new zip which does the conversion. Make sure to comment out the delete_option lines in uninstall.php before installing the new zip.

      Please let me know if you run into more issues. Thx.

    • Rob says

      Kyle, Thanks for covering Shibashakes plugin on the LinkedIn groups. With you and the WP groups, I would have never found this great plugin that is going to solve so many problems. cheers!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>