Advertiser Approves Own Comments On Single Ad Page
Advertiser Approves / Deletes comments on single listings page.
Tested and works on a virgin 3.05.3 CP install. (only tested on localhost)
I wanted this so that my advertisers have the option to approve or delete comments held in moderation on single ad listing page, i also didnt want advertisers going into wp-dashboard (basically because i cant be arsed to prettify it).
The mod works like this:
1) User leaves a comment on single ad listing page.
2) Advertiser recieves a notification by email that a comment has been left and requires approval or delete. For approval email to advertiser use a plugin, plenty to choose from here WordPress › Search for comments notify « WordPress Plugins .
3) Advertiser will login, go to listing and approves or deletes comments.
4) Unmoderated (waiting approval) comments will be listed below the comments textarea. (see attached file)
5) Advertiser has 2 options "Approve or Delete"
6) Advertiser as post_author can only see and moderate own comments.
Here we go:
Step 1: Im wanting to keep peeps out of wp dashboard,
so firstly in comments.php around line 108 change this
Code:
<p><?php _e('Logged in as','appthemes'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="<?php _e('Logout of this account','appthemes'); ?>"><?php _e('Logout','appthemes'); ?> »</a></p>
to this
Code:
<p><?php _e('Logged in as','appthemes'); ?> <a href="<?php echo get_option('siteurl'); ?>/profile"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(); ?>" title="<?php _e('Logout of this account','appthemes'); ?>"><?php _e('Logout','appthemes'); ?> »</a></p>
Step 2 We need to alter Contributers role slightly so that they can edit posts.
open up functions.php (not theme-functions.php) paste in this bit of code on the line above the final ?> tag:
Code:
// This full block of code goes into functions.php
// Give the "contributor" role a new permission
$obj_existing_role = get_role( 'contributor' );
// add the "moderate post comments" capability
$obj_existing_role->add_cap( 'edit_posts' );
Posting restrictions means tutorial continues in next post
You must be an AppThemes customer and logged in to view this response. Join today!
Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.
You must be an AppThemes customer and logged in to view this response. Join today!
Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.