Go Back   Pligg CMS Forum > Pligg Development > Core Development

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 02-08-2008, 03:39 PM
New Pligger
Pligg Version: 9.9.0
Pligg Template: default
 
Join Date: Jan 2008
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
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, 05:43 PM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 217
Thanks: 20
Thanked 102 Times in 65 Posts
You are welcome!

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, 01:29 PM
New Pligger
Pligg Version: 9.9
Pligg Template: heavily moded yGet
 
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
  #14 (permalink)  
Old 03-01-2008, 10:12 PM
catchpen's Avatar
Pligg Donor
 
Join Date: Jan 2008
Posts: 208
Thanks: 30
Thanked 18 Times in 13 Posts
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, 12:35 AM
netfreak's Avatar
Casual Pligger
 
Join Date: Dec 2006
Posts: 54
Thanks: 3
Thanked 8 Times in 3 Posts
Good work and really helpfull
__________________
Drive more traffic to your blog by submitting blog..
______________________
|| Drive more Traffic || Gadgets Watch ||
Reply With Quote
  #16 (permalink)  
Old 03-15-2008, 10:32 AM
wnw's Avatar
wnw wnw is offline
Casual Pligger
Pligg Version: 9.9.0
Pligg Template: Wnw
 
Join Date: Dec 2007
Posts: 57
Thanks: 5
Thanked 1 Time in 1 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......
Reply With Quote
  #17 (permalink)  
Old 03-15-2008, 11:52 AM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 217
Thanks: 20
Thanked 102 Times in 65 Posts
Notice to the user submitting the story

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
The Following User Says Thank You to redwine For This Useful Post:
  #18 (permalink)  
Old 04-11-2008, 07:11 AM
New Pligger
 
Join Date: Apr 2008
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
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, 08:16 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,073
Thanks: 53
Thanked 25 Times in 23 Posts
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, 03:09 PM
Casual Pligger
 
Join Date: Oct 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
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
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing part of the story from summary, but not from the complete story not2serious General Help 10 12-29-2007 09:56 AM
Once a Story is Submitted does it ever get deleted? Naomi General Help 18 08-10-2007 05:08 AM
Idea for scalable story promotion jvallery Core Development 6 04-18-2006 08:41 PM


Search Engine Friendly URLs by vBSEO 3.2.0