WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Larger input area request (16 posts)

  1. billseymour
    Member
    Posted 2 years ago #

    Wonderful plugin, much appreciated. Feature request:
    - please make the input textarea much larger. It is particularly difficult to work with when constructing a complex conditional statement, since I can't see most of the entry.

    - alternatively, make the textarea user-adjustable, where we could modify the size using Css.

    Great stuff! Thanks again.

    http://wordpress.org/extend/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    Good timing - i've been asked this before but as I'm just in the middle of updating the development version I'll give it a go.

  3. billseymour
    Member
    Posted 2 years ago #

    Terrific, looking forward to seeing your results. Bigger area to start with, and hopefully the ability to further adjust with Css, would be great.

  4. billseymour
    Member
    Posted 2 years ago #

    Just brainstorming here, but I had another idea:

    Might there be a way to Save snippets of a user's conditional code (the code that was added in the Widget Logic input box)? I'm thinking that a user might well want to refer to these snippets, particularly if setting up widgets again on another site.

    Perhaps some sort of Save-as-text-file? (I already do this 'on the fly', saving some Widget Logic code of mine for later re-use. Thanks.

  5. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    i've put in something like that experimentally, and now I'm wondering how to do a 'full load' of the same file so you can load up and save out all your site's WL options in one go.

  6. billseymour
    Member
    Posted 2 years ago #

    Now that's what I call a responsive plugin designer!

  7. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    ha - you've caught me at an uncharacteristic moment. i've been *amazingly* lazy and complacent about my plugins. for literally years in WL case.

  8. billseymour
    Member
    Posted 2 years ago #

    *laughs* Well, it is good to see you active on WL. WL really increases the usefulness of widgets for me - without WL, I would probably not use sidebar widgets, so that I could instead control the logic of my own sidebar code myself. WL "completes" the role of widgets, in my opinion.

  9. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    i've just committed v0.50 as 'stable' - it's a big change in the core functionality so I've not changed a lot else so I can concentrate on any problems this causes.

    however if you want textarea now I'll 'soon' be updating the 'development' version you can get at:

    http://wordpress.org/extend/plugins/widget-logic/download/

    or you can try changing line 99:
    echo "<p><label for='".$id_disp."-widget_logic'>Widget logic <input type='text' name='".$id_disp."-widget_logic' id='".$id_disp."-widget_logic' value='".$value."' /></label></p>";

    to
    echo "<p><label for='".$id_disp."-widget_logic'>Widget logic <textarea class='widefat' type='text' name='".$id_disp."-widget_logic' id='".$id_disp."-widget_logic' >".$value."</textarea></label></p>";

  10. billseymour
    Member
    Posted 2 years ago #

    I just tried that textarea replacement code. It produces a textarea the width of the widget and several lines deep. Much more readable and far easier to work with Widget Logic this way. I'd say definitely add that change to the next iteration of the plugin.

    Great, thanks again.

  11. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    The 'development' 0.52 version has the textarea change AND a full import/export functionality trial (under the usual widget logic options on the main widget admin page)

    http://wordpress.org/extend/plugins/widget-logic/download/

  12. kjetilgf
    Member
    Posted 2 years ago #

    My compliments!
    Good idea - and it seems to work fine, though I haven't found any export possibility (v 0.52b / developer version as of today)
    Keep up your good work! Still one of my favorite plugins

    Just another idea - for all of us not too confident with php:
    What about making a larger collection of "ready to copy and paste" expressions? There are so many ways to use this, but writing expressions that works is far from easy. You might use the "Other notes" section or maybe better: link to a blog post where users could add their suggestions as comments. (If you're on the lazy side, I mean :o)
    Here's one favorite - think you helped me:
    is_category(4) || (is_single() && in_category(4) && !in_category(22))
    ...to make the widget appear on a category's page AND that category's posts but NOT on pages that also belong to an other category (22 here) (correctly described?)
    Cheers
    Kjetil
    wp 321

  13. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    at the bottom of the widgets admin page should be an 'Export All' button followed by a load file button and 'import All' button.

  14. kjetilgf
    Member
    Posted 2 years ago #

    You're quite right, Alan. Overlooked that one.
    Great
    Thanks

  15. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    :-) no worries. What I have to do now is cater for multi-line logic. Now that it's a textarea you can have returns in the code so the export format needs tweaking…

  16. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    I just updated the dev again, with a fix for import/export of settings function which includes the ability to cope with multi-line logic

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic