[SOLVED] Complete solution to approve the story after being submitted

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-08-2008, 04:39 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: default
 
Join Date: Jan 2008
Posts: 6
Great solution Redwine but seems that you forgot the most important part...

Without setting the links status table to accept "pending", it will set it empty...
I had to search for your other posts to find a solution...

Code:
alter TABLE table prefix_links
change link_status link_status enum('discard','queued','published','abuse','duplicated','pending') NOT NULL default 'discard'
;
Again thanks for the trick and the tutorial
Reply With Quote
  #12 (permalink)  
Old 02-08-2008, 06:43 PM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Quote:
Originally Posted by imlerim View Post
Great solution Redwine but seems that you forgot the most important part...

Without setting the links status table to accept "pending", it will set it empty...
I had to search for your other posts to find a solution...

Code:
alter TABLE table prefix_links
change link_status link_status enum('discard','queued','published','abuse','duplicated','pending') NOT NULL default 'discard'
;
Again thanks for the trick and the tutorial
That's why I started this post with:
"I've already posted a quick fix answering few questions about this subject:
How to set admin approval for all stories"

I did not want to be redundant as long as I referenced it.

Cheers!
Reply With Quote
  #13 (permalink)  
Old 02-24-2008, 02:29 PM
New Pligger
Pligg Version: 9.9
Pligg Template: heavily moded yGet
 
Join Date: Jan 2008
Posts: 22
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
http://forums.pligg.com/general-help...html#post56778

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
  #14 (permalink)  
Old 03-01-2008, 11:12 PM
catchpen's Avatar
Pligg Donor/Coder
 
Join Date: Jan 2008
Posts: 184
A feature that would make this more useful is an if/else statement or something for it to only apply to new members with less than 3 or x stories submitted. Say the member submits x amount of APPROVED stories then no more probation - there next submittal and all others afterwards will go directly to queued status.

Another way for less gray hairs but still effective.

whadaya think?
Reply With Quote
  #15 (permalink)  
Old 03-02-2008, 01:35 AM
netfreak's Avatar
Casual Pligger
 
Join Date: Dec 2006
Posts: 51
Good work and really helpfull
Reply With Quote
  #16 (permalink)  
Old 03-15-2008, 11:32 AM
wnw's Avatar
wnw wnw is offline
Casual Pligger
Pligg Version: 9.9.5
Pligg Template: Wnw
 
Join Date: Dec 2007
Posts: 55
Hi Redwine...this is super cool mod and its working like a cream......but this mod lacks something......which is the USABILITY.......as when you post a story it gets into Pending.....but is user getting a message that its pending for approval....or something like that.....

Can we have a solution please,.,,,.because the user might feel....lost....as he will look for story......
Reply With Quote
  #17 (permalink)  
Old 03-15-2008, 12:52 PM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Quote:
Originally Posted by wnw View Post
Hi Redwine...this is super cool mod and its working like a cream......but this mod lacks something......which is the USABILITY.......as when you post a story it gets into Pending.....but is user getting a message that its pending for approval....or something like that.....

Can we have a solution please,.,,,.because the user might feel....lost....as he will look for story......
The simplest solution is to add a notice to the users submitting the story informing them the story will be pending approval...

In /templates/yourtemplate/submit_step-3.tpl, add the following right before the <form action=" line

Code:
<p><strong>When you click on 'Submit Story", the story will be pending approval by the administrator. Once approved, the story will show in the "Upcoming" section.</strong></p>
The output right above the "Modify" and "Submit story" buttons will be:

When you click on 'Submit Story", the story will be pending approval by the administrator. Once approved, the story will show in the "Upcoming" section.
Reply With Quote
  #18 (permalink)  
Old 04-11-2008, 08:11 AM
New Pligger
 
Join Date: Apr 2008
Posts: 8
Hi All,
I'm a complete newbee in PHP and I'm wondering where can I find the table that redwine is referring to in his post as well as the table_total.
Sorry if my question sounds silly...I really need to approve the stories after being submitted.
Thanks for your help.
Reply With Quote
  #19 (permalink)  
Old 04-11-2008, 09:16 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I´m looking for something like this at user registration: It should be email-free an d give admins the possibility to sort potential users out. Anything like that available?

P.S.: Even if I need this kind of regulation more the mod is awesome!
Reply With Quote
  #20 (permalink)  
Old 04-11-2008, 04:09 PM
Casual Pligger
 
Join Date: Oct 2007
Posts: 38
A nice mod for this would be to only set stories to pending for users that have less than a specified amount of approved stories. On my pligg site, the regular submitters always post good stories and don't need approval but sometimes a new user will register and just start posting spam. It would be nice to set the status on just these ones as pending.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to submit complete URL? Max09 Questions and Comments 1 12-31-2008 11:38 AM
[SOLVED] Direct link to story instead of going throught out.php or /out/ doit Questions and Comments 10 01-27-2008 05:29 PM
Removing part of the story from summary, but not from the complete story not2serious Questions and Comments 10 12-29-2007 10:56 AM
[SOLVED] When I upload a image when submitting a news story... gossipqueenie Questions and Comments 3 10-27-2007 11:44 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development