This wordpress plugins adds a radio button to the comment form so users can tell if a post is hot or not. Depending on the value that is chosen, another css class is added to comment .
Download the Hot Or Not plugin here
Unzip this file into the /wp- content/plugins/ folder.
This radiobutton has to be added in the < form > tag of the comments. You can find this somewere at the bottom of your "template/comments.php" file. It looks somethin like this.
HTML:
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
You have to paste the code below in that form.
In the beginning of that same file, there is a php foreach statement to print all comments.
HTML:
<?php foreach ($comments as $comment) : ?>
A bit further in the file you have to add the hotornot class to the listitem:
HTML:
li id="comment-<?php comment_ID() ?>" class="<?php print $comment->css ?>">
Active the plugin in the admin "Plugins" screen in wordpress.
You can do this in the template/style.css file.
.vote_hot {style.css (line 692)
background-color:#CDEEAB;
border-top:1px dotted #006600;
color:#006600;
}.vote_not {style.css (line 699)
background-color:#FFE0E0;
border-top:1px dotted #F5857E;
color:#AB0000;
}
2 Responses
james m
March 1st, 2008 at 10:12 am
1Hi, Is there a demo of this plugin anywhere?
tks
james
aRo`
March 1st, 2008 at 1:29 pm
2you can take a look at http://www.procontra.be/
RSS feed for comments on this post · TrackBack URI
Leave a reply
Who is aRo` ?
I'm an e-commerce consultant trapped in a developpers mindset.I work with:
Popular posts
Recent posts
Categories
Links
Software
Calendar
Archives
Mybloglog
Add me to skype