Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: bitmovel on May 13, 2014, 05:27:58 PM

Title: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 05:27:58 PM
Hi.

I want to be able to show unnaproved posts to everyone, with the usual unnaproved message and colors associated with it.

How can it be done?

I assume this should be some easy change?

Thanks!
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Irisado on May 13, 2014, 05:32:27 PM
Do you want someone to actually do this for you, or just explain how you can do it?  If it's the latter, it's just a standard support request, so I'll move it.  Please could you clarify?
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 05:34:39 PM
well, if i get explained on how to do it, its ok with me.

thanks :)
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Irisado on May 13, 2014, 05:43:14 PM
Thanks for the clarification.

Moved to support for now.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Arantor on May 13, 2014, 05:45:14 PM
Question: why? The entire point of unapproved posts is to keep posts back so only moderators can see them...
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 05:48:50 PM
there are normal delays on aproving posts.

I want a visible warning to users that the post was not approved yet, but it can be viewed.

If there is any alternative method or a modification that does the job, thats ok also :)
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Arantor on May 13, 2014, 05:55:14 PM
Yes, there are delays. The user themselves can see their own posts.

If you want to make the post visible to everyone, why bother with approval in the first place?
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 06:12:43 PM
I want content visible for everyone in first place, and gets moderated after.

I want to search for duplicate topics, bad quality items, and fake ones.

The warning is there. It is only trustable after the post gets approved.

Anyway, already tried myself.

Here is where I am right now:

1 - Activate "can approve messages" in normal members group

2 - on Display.template.php search:
$message['can_approve']
replace all entries:
(($message['can_approve']) && $context['user']['is_mod'])


At the moment, the users are able to see the topic, and cannot approve it inside the topic.

But they are able to approve it. Please check attached picture. How can I disable approve from that quick moderation menu?

Thanks.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Arantor on May 13, 2014, 06:15:25 PM
Then turn off post moderation and let your moderators moderate it after the fact.

What you want cannot be done without a significant overhaul of the system, you've only changed two tiny superficial details.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 06:24:13 PM

Allow me to update what I have done till now, So anyone can use it:

Quote1 - Activate "can approve messages" in normal members group

2 - on Display.template.php search:
$message['can_approve']
replace all entries:
(($message['can_approve']) && $context['user']['is_mod'])

3 - on MessageIndex.template.php search
$context['can_approve']

replace with:
($context['can_approve'] && $context['user']['is_mod'])


Next thing:

Disable access to index.php?action=moderate

Do you know where can I disable it? What file is it?
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Arantor on May 13, 2014, 06:27:11 PM
-sigh- So now you have a major performance overhead applied to all users (which is why post moderation is disabled by default and you've just created the worst case scenario for it), all because you want to leave users with a message saying 'this message hasn't been approved yet', even though it really doesn't make any real difference to users when they can see it anyway?

Also note that if you disable action=moderate you won't actually be able to approve anything anyway since that's where the approval system is handled from.

Best of luck to you.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 06:33:02 PM
Another step added to the tuturial I am building.

Quote1 - Activate "can approve messages" in normal members group

2 - on Display.template.php search:
$message['can_approve']
replace all entries:
(($message['can_approve']) && $context['user']['is_mod'])

3 - on MessageIndex.template.php search
$context['can_approve']

replace with:
($context['can_approve'] && $context['user']['is_mod'])

4 - On ModerationCenter.template.php, add this in top of the file

if (!$context['user']['is_mod'])
die('You do not have access to this area Please go away...');


Is there any possible way users can approve it now?

They can read it at the moment.

I dont find any problem with it right now.

Moderators and admins can approve them at the moment. Normal users can only read them and reply.

Anything else?
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Arantor on May 13, 2014, 06:35:13 PM
I was going to answer your questions but you're not interested in listening to what I have to say, so I will simply leave it at: there are a large number of assertions there, most of which are wrong.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: Kindred on May 13, 2014, 06:43:37 PM
Basically, the sort of it is -- you are trying to do something which is not suggested and is not necessary.

Either post moderation is ON - in which case mods and the original poster can see the post
or post moderation is OFF - in which case everyone can see the post.

If you use option number 2, then you have EXACTLY what you are asking for - with no coding changes...   and the mods can come in at any time to clean the content, remove duplicated, etc...   all without even bothering with post moderation or coding changes.
Title: Re: [Paid] unnaproved posts visible to everyone
Post by: bitmovel on May 13, 2014, 06:44:25 PM
Thank you for all the replies.

:)