WordPress.org

Ready to get started?Download WordPress

Forums

Custom Meta Widget
[resolved] possible conflict with "display widgets" plugin (5 posts)

  1. leeviathan
    Member
    Posted 2 years ago #

    when trying to display this widget, I couldn't get it to display to any user not logged in. The "display widget" options show a check mark next to "show only for logged in users", or something to that effect, and after unchecking that box and saving, it rechecks the box automatically and doesn't save the change.

    http://wordpress.org/extend/plugins/custom-meta-widget/

  2. Luke Mlsna
    Member
    Plugin Author

    Posted 1 year ago #

    "show only for logged in users" is not an option offered by this plugin. If another plugin is butchering mine, you'll have to contact that plugin author.

  3. DSkyline
    Member
    Posted 1 year ago #

    I had the same problem. Two perfect plug-ins but they clash. I had to rename all instances of 'login' to 'log-in' in your plug-in (it was easier than to change it in other plug-in :D ). Because of the 'Show only for logged in users' option in 'Display widgets' plugin that uses the same name and if you check 'Show "Log in/out" link?' in your plug-in, then you can't un-check the 'Show only for logged in users' option in other plug-in. Now everything works perfect and Logged-out users can see both links ('Register' and 'Log-In') where before they couldn't see 'Log-in'. So, thank you for this plug-in and I hope you don't plan on updating your plug-in any time soon.

  4. Luke Mlsna
    Member
    Plugin Author

    Posted 1 year ago #

    I just installed this plugin to see what was going on, and it appears as though this widget inserts options into other widgets without namespacing those options. So chances are the "Display Widgets" plugin clashes with a huge number of other widgets besides this one.

    I will send a message to the developer of that plugin letting him know how to fix this, but I'm not going to start giving my options crazy names to avoid collisions with other plugins improperly violating my namespace.

  5. Afg4x4
    Member
    Posted 1 year ago #

    I have some decision to solve your problem. I had the same problem with this plugin.
    How to solve: Go to plugin Editor, and comment next lines:
    ___________________________

    $instance['dw_logout'] = isset($instance['dw_logout']) ? $instance['dw_logout'] : (isset($instance['logout']) ? 
    
    $instance['logout'] : 0);*/
        /*$instance['dw_login'] = isset($instance['dw_login']) ? $instance['dw_login'] : (isset($instance['login']) ? 
    
    $instance['login'] : 0);

    ________________________________

    }else{
            global $user_ID;
            if( (isset($instance['dw_logout']) and $instance['dw_logout'] and $user_ID) or
                (isset($instance['dw_login']) and $instance['dw_login'] and !$user_ID))
                return false;

    ______________________________________

    $instance['dw_logout'] = isset($instance['dw_logout']) ? $instance['dw_logout'] : (isset($instance['logout']) ? 
    
    $instance['logout'] : 0);
        $instance['dw_login'] = isset($instance['dw_login']) ? $instance['dw_login'] : (isset($instance['login']) ? 
    
    $instance['login'] : 0);

    ___________________________________________

    <p><input class="checkbox" type="checkbox" <?php checked($instance['dw_logout'], true) ?> id="<?php echo $widget->get_field_id('dw_logout'); ?>" name="<?php echo $widget->get_field_name('dw_logout'); ?>" value="1" />
        <label for="<?php echo $widget->get_field_id('dw_logout'); ?>"><?php _e('Show only for Logged-out users', 'display-
    
    widgets') ?></label></p>
        <p><input class="checkbox" type="checkbox" <?php checked($instance['dw_login'], true) ?> id="<?php echo $widget->get_field_id('dw_login'); ?>" name="<?php echo $widget->get_field_name('dw_login'); ?>" value="1" />
        <label for="<?php echo $widget->get_field_id('dw_login'); ?>"><?php _e('Show only for Logged-in users', 'display-
    
    widgets') ?></label></p>

    _______________________________________

    if(isset($new_instance['dw_logout']))
            $instance['dw_logout'] =  $new_instance['dw_logout'];
        if(isset($new_instance['dw_login']))
            $instance['dw_login'] = $new_instance['dw_login'];

    ____________________________________________
    to comment place /*code*/
    And where the code begins like this {<p><input class="checkbox"}, use this comment <?php /*?>code<?php */?>
    If you do this you remove from this plugin autentification system, the main problem of this plugin.
    That's it. The problem is solved.
    You can see how my decision works on my site cryptoworld.ru

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.