wordpress.sundskard.dk

    • Home
    • News

    Recent comments

    Andrias Sundskarð | 06.01.2009

    To prevent comments from protected pages from appearing in “Recent comments” widget, open up “/wp-includes/widgets.php” and replace the function “wp_widget_recent_comments” with this code:

    function wp_widget_recent_comments($args) {
    global $wpdb, $comments, $comment, $current_user;
    extract($args, EXTR_SKIP);
    $options = get_option(’widget_recent_comments’);
    $title = empty($options['title']) ? __(’Recent Comments’) : apply_filters(’widget_title’, $options['title']);
    if ( !$number = (int) $options['number'] )
    $number = 5;
    else if ( $number < 1 )
    $number = 1;
    else if ( $number > 15 )
    $number = 15;

    if ( !$comments = wp_cache_get( ‘recent_comments’, ‘widget’ ) ) {
    $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = ‘1′ AND comment_post_ID NOT IN (SELECT post_id FROM " . $wpdb->prefix . "named_users WHERE (user_id <> " . $current_user->ID . " OR group_id NOT IN (SELECT group_id FROM " . $wpdb->prefix . "named_users_groups_relations WHERE user_id = " . $current_user->ID . "))) ORDER BY comment_date_gmt DESC LIMIT $number");
    wp_cache_add( ‘recent_comments’, $comments, ‘widget’ );
    }
    ?>

    <?php echo $before_widget; ?>
    <?php echo $before_title . $title . $after_title; ?>
    <ul id="recentcomments"><?php
    if ( $comments ) : foreach ( (array) $comments as $comment) :
    echo ‘<li class="recentcomments">’ . sprintf(__(’%1$s on %2$s’), get_comment_author_link(), ‘<a href="’. get_comment_link($comment->comment_ID) . ‘">’ . get_the_title($comment->comment_post_ID) . ‘</a>’) . ‘</li>’;
    endforeach; endif;?></ul>
    <?php echo $after_widget; ?>
    <?php
    }
    Comments
    20 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    Internationalization

    Andrias Sundskarð | 02.01.2009

    I’ve made some changes to the plugin to support internationalization. The POT file is placed in the plugin directory. Let me know if you find any bugs!

    I’ve included a danish translation. Please write a comment if you want to share your translation files (.po and .mo) and remember to write your email address in the “Mail” field, so that I can contact you.

    Comments
    4 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    Version 0.3.5

    Andrias Sundskarð | 31.12.2008

    I’ve released version 0.3.5. This version has the “wpNamedUsers permissions” working with the group functionality, so now everything should be working. Let me know if there are any bugs!

    Comments
    6 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    Group functionality

    Andrias Sundskarð | 28.12.2008

    With the release of version 0.3.2 the group functionality is implemented. If you find ANY bugs PLEASE report them to me in a comment!!

    Remember to deactivate before upgrading as the database is upgraded when the plugin is activated!

    I’ve made the group functionality so that it is possible to select users and groups who will have acces to posts/pages.  This means that you can go on the old way and give permissions to single users. You can also combine the two things and give permissions to a group and a couple of users.

    “wpNamedUsers permissions” is not done yet, so it still behaves as if there were no groups.

    Does it make sence?

    Comments
    5 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    WordPress 2.7 compatible

    Andrias Sundskarð | 22.12.2008

    I’ve had some problems getting the plugin to work with WordPress 2.7, but version 0.2.6 of the plugin should be fully compatible. These problems have delayed the groups functionality, but I’m working on it.

    Comments
    7 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    Version 0.2 released

    Andrias Sundskarð | 27.09.2008

    I’ve released version 0.2 of the plugin. The functionality that was originally planned is now implemented. The next thing now, is to find a way to group users and to set permissions to these groups.

    Comments
    4 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    Management page

    Andrias Sundskarð | 22.09.2008

    The management page is almost finished. I’ve implemented the “clear permissions” functionality, but the “set permissions” is still just a button.

    I’ve started thinking about some kind of user management. I think it would be best, if it was possible to group users, so that it would be possible to set permissions to a group as well as individual users. Well, the “set permissions” has the highest priority at the moment, but I think that the grouping functionality would be nice to have.

    Comments
    8 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    First bug fixed

    Andrias Sundskarð | 21.09.2008

    I realized today, that if you had given permissions to a page or post to more than one user, none of the users would see the content. This bug has been fixed in version 0.1.4. This version also introduces the copy permissions feature.

    Comments
    No Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    More on the comments feed

    Andrias Sundskarð | 20.09.2008

    I’m not sure if users that are not logged in, are able to see the comments of hidden pages. Please visit http://wordpress.sundskard.dk/archives/41/feed and tell me if you see my comment to “Protected post” or not. It might just be the browser cache that is playing around with me. :)

    Comments
    3 Comments »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    SVN working

    Andrias Sundskarð | 18.09.2008

    The project is now hosted at wordpress.org. I’ve uploaded the first release for testing purposes only. The plugin is usable, but there are still features missing. Read the previous post to find out whats missing.

    Comments
    1 Comment »
    Categories
    wpNamedUsers
    Comments rss Comments rss
    Trackback Trackback

    « Previous Entries

    Recent Posts

    • Recent comments
    • Internationalization
    • Version 0.3.5
    • Group functionality
    • WordPress 2.7 compatible

    Recent Comments

    • madbadcat on Recent comments
    • madbadcat on Recent comments
    • Andrias Sundskarð on Recent comments
    • fanta78 on Recent comments
    • blogindir on Recent comments
    rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox