Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jakeisonline

    (@jakeisonline)

    Hey Mark,

    We actually plan on adding multi-site support in the next few version updates. That will be unlikely to happen for a couple of months though.

    Thread Starter jakeisonline

    (@jakeisonline)

    Fail, just answered my own post ??

    This can be resolved by using a simple PHP function called “nl2br” which basically means it will convert carriage returns (that means a text line break) into the correct HTML linebreak format, br.

    To do it, you can simply use echo nl2br($curauth->description); in order to display an Author Bio complete with HTML Linebreaks.

    Thread Starter jakeisonline

    (@jakeisonline)

    I’m sure there is, the point of this post was that it should either be standard or a security option by standard.

    Thread Starter jakeisonline

    (@jakeisonline)

    Damn, Google pulled through for me a little too late.

    This is badly documented, but appending get_ to the beginning of a template tag will return it rather than echoing it.

    Therefore…

    foreach ($comments as $comment) {
       $get_comment_id // Will return the ID, but not print it to the page
       $comment_id // Will print it to the page, rather than return it.
    }
    Thread Starter jakeisonline

    (@jakeisonline)

    In the end I had to hack this out to make sure no one could do it any longer.

    After line 38 of “wp-comments-post.php” add this:

    // get list of user (display) names for blog
    global $wpdb;
    $valid_users = (array)$wpdb->get_results("
      SELECT display_name, user_email FROM " . $wpdb->prefix . "users");
    
    // get ID of logged in user (if there is one)
    global $userdata;
    get_currentuserinfo();
    $logged_in_name = $userdata->ID;
    $logged_in_email = $userdata->user_email;
    
    // see if the comment author matches an existing author
    $found_match = FALSE;
    foreach ($valid_users as $va) {
      if (trim($va->display_name) != '') {
        if (strtolower($va->display_name) == strtolower($comment_author)) {
          $found_match = TRUE;
          break;
        }
      }
      if (trim($va->user_email) != '') {
        if (strtolower($va->user_email) == strtolower($comment_author_email)) {
          $found_match = TRUE;
          break;
        }
      }
    }
    
    // if commenter is not logged in, but match was found, block the comment
    if (trim($logged_in_name) == '') {
      if ($found_match == TRUE) {
        wp_die( __('You cannot post using the name or email of a registered author.') );
      }
    }

    You can add in your own way of doing the error message.

    @claytonjames – don’t be so naive, it’s rather easy to get hold of blog posters email addresses, particularly in the open social worldwide web.

Viewing 5 replies - 1 through 5 (of 5 total)