Forum Replies Created

Viewing 7 replies - 31 through 37 (of 37 total)
  • Hmm for me it was fixing a typo for that error.
    (v. 2.0.2 of the plugin at the time of writing)
    Look in wp-content/plugins/wp-category-posts-list/includes/wp_cpl_output_gen.php at line 256 for:

    $post_output .= ((true == $op['show_date'])? ' <span class="wp-cpl-date">' . _('Posted on: ', $wp_cat_list_itg_tans) . date('M jS, Y', strtotime($post->post_date)) . '</span>' : '');

    and REPLACE it with this:

    $post_output .= ((true == $op['show_date'])? ' <span class="wp-cpl-date">' . _('Posted on: ' . $wp_cat_list_itg_tans) . date('M jS, Y', strtotime($post->post_date)) . '</span>' : '');

    The typo can be seen here _('Posted on: ',
    that comma should be a dot (for those that aren’t coders the dot (period) here tell PHP to add things together)

    Please update the plugin ASAP as I see a ton of these errors showing up in Google results.

    Hmm for me it was fixing a typo for that error.
    (v. 2.0.2 of the plugin at the time of writing)
    Look in wp-content/plugins/wp-category-posts-list/includes/wp_cpl_output_gen.php at line 256 for:

    $post_output .= ((true == $op['show_date'])? ' <span class="wp-cpl-date">' . _('Posted on: ', $wp_cat_list_itg_tans) . date('M jS, Y', strtotime($post->post_date)) . '</span>' : '');

    and REPLACE it with this:

    $post_output .= ((true == $op['show_date'])? ' <span class="wp-cpl-date">' . _('Posted on: ' . $wp_cat_list_itg_tans) . date('M jS, Y', strtotime($post->post_date)) . '</span>' : '');

    The typo can be seen here _('Posted on: ',
    that comma should be a dot (for those that aren’t coders the dot (period) here tell PHP to add things together)

    Please update the plugin ASAP as I see a ton of these errors showing up in Google results.

    I wonder if you ever found a fix for this or an alternative that doesn’t break WP core functionality?

    I, like many of us, have been scratching my now bald head trying to find a solution that will allow Widget Logic to play nicely with ANY plug in that adds Custom Class/ID to Widgets. I tried asking Andy (ZigWidgetClass) and got impatient waiting for a response (yes, he answered within a decent amount of time <12 hours, being a coder and impatient anyway, I dove in looking to find the problem). He and I both discovered that the issue is caused by the fact that WL needs to rewrite the ['callback'] array in order to function in the way that it does and in doing so keeps any other custom widget class plugin from visibly working.
    No biggie, just need to test to see if Widget Logic is active then if it is use the ['callback_wl_redirect'] instead of ['callback'].
    Since Andy’s fix was shorter and cleaner than mine I will show you his solution and all thanks should go to him:
    This is from his plugin; ZigWidgetClass
    This:
    $option_name = get_option($widget['callback'][0]->option_name);
    Gets replaced with this:
    if (!($widget-logic-status = $widget['callback'][0]->option_name)) $widget-logic-status = $widget['callback_wl_redirect'][0]->option_name; # because the Widget Logic plugin changes this array $option_name = get_option($widget-logic-status);
    Notice that depending on which plugin you have chosen to ad custom class/id’s to your widgets the $widget variable could be $widget_obj or something along those lines. You might find it easier to Search the plugin code for ['callback'][0]->option_name) as this should be standard.
    ZigWidgetClass has already update the plugin to work with Widget Logic.
    KC Widget Enhancements –

    Yes, this is a known issue and I’ve mentioned it in the release announcement on my blog (I will add this to the plugin description on the next update).

    I’m working on my own ‘widget logic’ implementation and hopefully I can include it in the next plugin update.

    If you are using a different plugin than the two mentioned then you should alert them to this.
    As an aside, @kucrut I am interested in seeing a version of Widget Logic that doesn’t break other plugins.

    For adding a custom class to a widget all you need is either KC Widget Enhancements or ZigWidgetClass and if you need to control where your widgets appear then you can’t do better than Widget Logic. As of this posting only ZigWidgetClass works with Widget Logic out of the box. The KC plugin needs a small change in order for it to work. They have been alerted as to the fix and will probably release it soon.
    The main diff between the two is Zig only adds a custom class while KC adds both custom ID and custom Class.

    Adding Custom Class to widgets can be done with KC Widget Enhancements or ZigWidgetClass

    I, like many of us, have been scratching my now bald head trying to find a solution that will allow Widget Logic to play nicely with ANY plug in that adds Custom Class/ID to Widgets. I tried asking Andy (ZigWidgetClass) and got impatient waiting for a response (yes, he answered within a decent amount of time <12 hours, being a coder and impatient anyway I dove in looking to find the problem). He and I both discovered that the issue is caused by the fact that WL needs to rewrite the callback array in order to function in the way that it does and in doing so keeps any other custom widget class plugin from visibly working.
    No biggie, just need to test to see if Widget Logic is active then if it is use the callback_wl_redirect instead of callback.
    Since Andy’s fix was shorter and cleaner than mine I will show you his solution and all thanks should go to him:
    This is from his plugin; ZigWidgetClass
    This:
    $option_name = get_option($widget['callback'][0]->option_name);

    Gets replaced with this:
    if (!($widgetlogicfix = $widget['callback'][0]->option_name)) $widgetlogicfix = $widget['callback_wl_redirect'][0]->option_name; # because the Widget Logic plugin changes this array $option_name = get_option($widgetlogicfix);
    Notice that depending on which plugin you have chosen to ad custom class/id’s to your widgets the $widget variable could be $widget_obj or something along those lines. You might find it easier to Search the plugin code for ['callback'][0]->option_name) as this should be standard.
    ZigWidgetClass has already update the plugin to work with Widget Logic.
    KC Widget Enhancements should be next.
    If you are using a different plugin than the two mentioned then you should alert them to this.

Viewing 7 replies - 31 through 37 (of 37 total)