View Single Post
  #13 (permalink)  
Old 02-24-2008, 02:29 PM
jasxon jasxon is offline
New Pligger
 
Join Date: Jan 2008
Posts: 15
Thanks: 1
Thanked 1 Time in 1 Post
I wanted to mod the "pending" submit to allow Anonymous (not logged in users) the ability to submit stories and have them queue as 'pending'.
This is a combination of this Solution along with this
Anonymous Posting

Following the Solution posted above I also did the following
This is tested in 9.9
First. Create a new user and call it 'Anonymous'. Note the userid of the new user
Submit.php
find the following code and REMOVE the RED and ADD the green code
Code:
totals_adjust_count('discard', 1);
	$linkres->status='discard';
	$linkres->author=$current_user->user_id;
if($current_user->user_id == 0){
		$linkres->author=10; //USERID of your created Anonymous user
	} else {
		$linkres->author=$current_user->user_id;
} 
remove this code
Code:
if(!$linkres->verify_ownership($current_user->user_id)){
		die($main_smarty->get_config_vars('PLIGG_Visual_Submit2Errors_NoAccess'));
Remove the RED and ADD the GREEN
Code:
totals_adjust_count('queued', 1);
	$linkres->status='queued';
if(!$linkres->verify_ownership($current_user->user_id)){
	totals_adjust_count('pending', 1);
	$linkres->status='pending';
	}
	else {
	totals_adjust_count('queued', 1);
	$linkres->status='queued';
	} 
remember this is a MOD for this threads PENDING FIX. YOU NEED TO FOLLOW THOSE STEPS FIRST! Then to the mods in this post.

You should now be able to have anonymous users (people not logged in) submit new articles and have them sent into a pending queue for an admin to approve.
Reply With Quote