News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Mod Hide Post

Started by Roo, March 20, 2008, 06:02:05 PM

Previous topic - Next topic

Roo

Link to Mod

Hide Post mod for SMF.  Allows moderators to hide a post whilst still   allowing them to view it themselves.

To give a membergroup   permission to hide posts, log into smf admin and go to Permissions.    Modify the group you want to give permission to and down the bottom   under posts, tick the 'Hide Posts' checkbox.

Version 1.5 -   2010-06-10
Added support for SMF 1.1.11 and SMF 2.0 RC3.
Fixed   a bug with guest access.

Version 1.4 - 2009-07-08
Added   support for SMF 2.0 RC1-1.Fixed some areas where hidden posts where   still showing.
Added a checkbox in Features and Options to show the   name of moderator who hid post.
Allowed owner of post to see hidden   posts so they can modify them.
Changed the way hidden posts were   displayed.

Version 1.3 - 2008-12-08
Fixed a   security issue.

Version 1.2 - 2008-10-14
Fixed   a few bugs causing errors in log.
Added permission to membergroups   to allow hiding posts.

Version 1.1 - 2008-05-15
Fixed   problem with hidden posts showing in user's profile.
Added language   files for Turkish and Portuguese.

Basie

Thanks. Nice mod. That could be very useful. :)

Not sure about the color though. I think a background colour to match the theme would be better (with the text remaining red, so that it still stands out).

Yağız...

Nice mod Roo.
Turkish language:
ModHidePost.turkish.php
<?php
// SMF 1.1.4 - Moderator Hide Post Mod 1.0

$txt['modhide'] = 'Mesajı gizle';
$txt['modunhide'] = 'Mesajı aç';

$txt['hide_reason'] = 'Gizleme için sebep';
$txt['hide_success'] = 'Mesaj başarıyla gizlendi';
$txt['return_to_post'] = 'Mesaja geri dön';

$txt['hidden_label'] = 'Bu mesaj bir moderatör tarafından gizlendi';
$txt['hidden_message'] = 'Bu mesaj bir moderatör tarafından silindi';

$txt['unhide_confirm'] = 'Mesajı aç';
?>

Slug1

I tested this and it works fine. Question though... the, "THis post was removed by" comment is just black lettering like a normal post. I couldn't find anywhere for settings to adjust anything.
Slug1--out

~My blessings are as many as the miles I marched all these years~

Apllicmz

Nice Work

good Mod
translate portuguese

<?php
// SMF 1.1.4 - Moderator Hide Post Mod 1.0
// Moderator Hide Post Mod 1.0 Translate BY Candidosa2

$txt['modhide'] = 'Esconder Poste';
$txt['modunhide'] = 'Mostrar Poste';

$txt['hide_reason'] = 'Motivo para esconder';
$txt['hide_success'] = 'Poste escondido com sucesso';
$txt['return_to_post'] = 'Voltar ao Poste';

$txt['hidden_label'] = 'Este poste foi escondida por um moderador';
$txt['hidden_message'] = 'Este poste foi removido por um moderador';

$txt['unhide_confirm'] = 'Mostrar este poste';
?>



Deathschyte

#5
but, where's the setting or button to hide the posts ? ???  i'm not using default themes...and yes, i'm on SMF 1.1.4... :-\

Roo

Quote from: Slug1 on March 20, 2008, 08:59:57 PM
I tested this and it works fine. Question though... the, "THis post was removed by" comment is just black lettering like a normal post. I couldn't find anywhere for settings to adjust anything.
It should be red like in the screenshot.  Are you using the default theme?
The colour settings are in the style.css.  This is my first attempt at creating a mod, so I haven't looked at adding mod settings yet.  If you're using a custom theme you will have to copy some of the changes manually.

Quote from: Deathschyte on March 23, 2008, 03:50:08 AM
but, where's the setting or button to hide the posts ? ???   i'm not using default themes...and yes, i'm on SMF 1.1.4... :-\
You'll have to copy some of the changes into your custom theme.  If your not sure how to do this, let me know and I can try and help.


Thanks for the translations joomlamz and Yağız.  Do I just add those files to the lang dir?

cellax

#7
Is it normal that my Gmod are not able to hide posts? and to see hidden one?

my SMF is just installed, 1.1.4

thx

EDIT: there is a way to define a custom user group (something like 35) able to hide posts?

Roo

#8
The ability to hide and see hidden posts is tied in with the ability to "Moderate forum members".  If you give your global moderators that ability it should work.  When I have a chance I will see if I can add in some custom settings to set it for each membergroup.

Green Death

I would very much like the Hide Post ability to be given simply to moderators of forums without them having the "Moderate Forum Members" permission.

Can you update the mod?

Telfie2007

Hi

I have come across an issue where a hidden post can be viewed if a normal members goes the profile of a user and then clicks to view the posts of that particular user. I have been looking and a little fiddling but not been able to rectify this.

It appears that the Profile.template.php file needs to be modified so it doesn't show hidden posts.

Roo

Quote from: Telfie2007 on May 08, 2008, 09:05:51 AM
Hi

I have come across an issue where a hidden post can be viewed if a normal members goes the profile of a user and then clicks to view the posts of that particular user. I have been looking and a little fiddling but not been able to rectify this.

It appears that the Profile.template.php file needs to be modified so it doesn't show hidden posts.

Thanks for the heads up.  This has been fixed in the latest version.

Thorolf

Quote from: Green Death on April 16, 2008, 11:05:04 AM
I would very much like the Hide Post ability to be given simply to moderators of forums without them having the "Moderate Forum Members" permission.

Can you update the mod?

I'd like to second this request... Moderate Forum Members has simply too much power, and I'd like to give my board mods the ability to hide posts.

pp08

i cant figure out how to set this to the moderetors also can admin by default also hide posts or is it just mods?

bluesyrio

Quote from: Roo on May 14, 2008, 11:45:27 PM
Quote from: Telfie2007 on May 08, 2008, 09:05:51 AM
Hi

I have come across an issue where a hidden post can be viewed if a normal members goes the profile of a user and then clicks to view the posts of that particular user. I have been looking and a little fiddling but not been able to rectify this.

It appears that the Profile.template.php file needs to be modified so it doesn't show hidden posts.

Thanks for the heads up.  This has been fixed in the latest version.

I've installed the mod this week (downloaded the latest version available) and the problem is not fixed. :(

pp08

can someone pls help me with this

bluesyrio

#16
pp8, you have to change mods permissions to allow them to moderate members...

We're not very happy with it being like that, though... This way mods, not only admins, get access to info like IP, (hidden) emails e can change a member's profile.

Roo, is there a way you could change this so that mods can use the hide post feature, but without getting acess to righs like moderating members? Thanks.

Oh, another bug: when you hide post and choose to go back to it, it doesn't go back to the post you hid, but to the first post of the topic.

Lady Night Owl

#17
I'm getting these errors:

: Undefined index: subject
File: forums/Themes/default/ModHidePost.template.php (ask sub template - eval?)
Line: 16


8: Undefined index: current_message
File: forums/Themes/default/ModHidePost.template.php (ask sub template - eval?)
Line: 9


This looks like one of the files that came with the mod, so I'm not sure of what I should do.

ETA: The mod itself seems to function properly - but it would be nice to see these errors go away.

ETA2: A temporary fix to make the errors go away if they're bothering you (and still have the mod function) is to open ModHidePost.template.php:

Find:


$context['current_message']['subject']


Replace with:


$txt['current_message'], $txt['subject']


Remember to add the following to your ModHidePost language file:
(in my case it is ModHidePost.english-utf8.php)



$txt['subject'] = 'Subject';
$txt['current_message'] = 'Current message';


No more errors in the log.

The only thing you might want to be aware of is that when you go to enter the reason for hiding the post it will say "ArraySubject" in the text field, so you would just have to change it to whatever the actual reason is. The post should still be hidden successfully.


Argh...well, I'm getting this error if me or other members view posts "last posts of this person" through the profile:


8: Undefined variable: message
File: [snip]/forums/Themes/default/languages/ModHidePost.english-utf8.php (showPosts sub template - eval?)
Line: 476
Running SMF 2.0.1

Rosenstein

#18
I'm also getting those two errors.

Daggers

I agree that this mod should be available to moderators regardless of their permissions, it should only be assigned to the moderator membergroup

Advertisement: