• Hello,

    I was so distraught about King Text widget not working in WP 2.2 that I started poking around in the plugin to see if with my extreme limited knowledge, I could figure out how to make it work. This really started by my trying to find where the stuff I had in there was stored (which I never did find).

    Anyway, I fixed it!

    Open up the king text.php file and look for this line of code near the top:

    include_once('widgets.php');

    if you comment it out so it looks like this
    /*include_once('widgets.php'); */

    the plugin will now activate and it works like it used to! The plugin was looking for that old widgets.php plugin that is now a part of WP 2.2 automatically.

    Now my site is back to normal and I can stop obsessing!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Nice save – thanks for sharing. ??

    I followed the instructions above and while the widget will now work without breaking my site, when I open the widget none of the js associated with it seems to be working even though the path to the King Includes is correct.

    Any ideas?

    I don’t know how to unresolve this or if I should start a new topic but it is not resolved…

    Marked not solved.

    If you need php in a widget, try Otto’s execphp widget. He also has a fix for the 2.2 widget.php listed in the comments:

    https://ottodestruct.com/blog/2006/04/09/fun-with-widgets/

    Unfortunately Otto’s fix for the widgets.php doesn’t work with King Text, and like BigDog the fix by mxv that started this thread doesn’t work either. I don’t mind switching to the execphp widget by Otto, but how can I get the PHP code out of the King Text widgets that I used previously? I don’t know where this is stored.

    The standard 2.2 widgets stores that information in the wp_options table. For instance, all the standard text widgets store the data with an option_value of “widget_text”. Maybe look there for the King Text widget information.

    I like Otto’s widget but the King widget allows you to decide what pages to have them appear on. As such, I have my archives only show on single or archive pages.

    I am sure there is a way to do this with code but that is beyond my ability.

    I have waited to upgrade my main site until I see if the author upgrades the King widgets.

    BTW, I use Otto’s and the fix worked fine.

    Thanks so much, MXV. My entire sidebar ran out of eight King Text Widgets, so I was hurtin’.

    One observation: In WP 2.2.1 the King Text Widget does not display its widget options correctly. Instead of collapsing, the whole thing sprawls out and exceeds the widget’s box size.

    Is anyone else experiencing this problem? Anyone got a fix?

    I changed the file ‘king_widget_functions.php’ in ‘…/king-includes/library’ to make it work correctly again.

    First, I changed the ‘themes.php’ in line 30 to ‘widgets.php’, so that it looks like this now:

    if ( strpos($_SERVER['REQUEST_URI'], 'widgets.php') !== false || strpos($_SERVER['REQUEST_URI'], 'king-framework.php') !== false ){

    and commented out line 34 so it looks like this:

    /* echo '<script type="text/javascript" src="'.$js_dir.'prototype.lite.js"></script>'."\n"; */

    After changing the ‘themes.php’ to ‘widgets.php’ the menu showed up correct again and after commenting out line 34, the displaying of the Widgets Options worked again. It seems like the prototyle.lite.js jars with the other Javascripts, wordpress is loading. Anyway it seems like all functions needed are still there.

    Hope this helps, at least it worked for me (running WP 2.2.2) ??

    Thanks bsnoop and mxv: Your suggestions worked flawlessly!

    Thank you mxv and bsnoop. The both of you made quick work of correcting the issues with the King Framework..

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to make King Text widget work in 2.2’ is closed to new replies.