WordPress.org

Ready to get started?Download WordPress

Forums

Dotclear like comments (3 posts)

  1. szdavid
    Member
    Posted 9 years ago #

    Hello,

    i would like to know if there is a plugin to show comments like in Dotclear "XX wanted to say..." and, everytime with a different sentence ?

    Thanks

  2. tomhanna
    Member
    Posted 9 years ago #

    Not a plugin that I know of, but you can do it pretty easily.

    Create a php file with an array with the different sentences and then call that file at the appropriate place in the template.

    You'd create a file, for example, called commentremark.php and upload it to your active theme directory that would be something like this:

    <?

    // Random HTML Generator
    // HTML Array....
    $mHTML[0] = 'wrote';
    $mHTML[1] = 'bloviated';
    $mHTML[2] = 'pontificated';
    $mHTML[3] = 'thought';
    $mHTML[4] = 'expressed the opinion that';

    // Calculate index
    $iUpper = sizeof($mHTML) - 1;
    $iLower = 0;

    $iIndex = rand($iLower, $iUpper);
    // Display HTML
    echo $mHTML[$iIndex];
    ?>

    Then in the appropriate place in your comments template you'll put:

    <? include('commentremark.php'); ?>

  3. Vryce
    Member
    Posted 9 years ago #

    There is this plugin, that I use on my site. Easy to setup and configure.

    http://frenchfragfactory.net/ozh/my-projects/wordpress-plugin-random-words/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.