Link to mod (http://custom.simplemachines.org/mods/index.php?mod=1007)
This mod will allow a moderator or admin to delete a spam post and dock the member's post count by one.
It also logs the deleted message in the Moderator's logs. As well it also logs any message which has been modified by a mod or admin. It is selectable in the Admin CP under the Posts and Topics option.
The display message can be edited there also.
V1.0
Initial release.
- Spam Post replaced by pre-set message and the member's post count is reduced by one.
- The deleted post is recorded in Moderator's log. (SMF1.1 only)
- Modified posts are also now copied to the Moderator's log. (SMF 1.1 only)
V1.1
- Added the original subject of the post to the Moderator's log.
- Cleaned up the display in the moderator's log.
V1.2
- Added the option to award the member bad karma as well.
- Added the option to place a copy of the deleted post in the recycle board.
- Fixed a bug in the Moderator's logs which caused removed posts and topics to show in a box as well
- If the message in a modified post was not changed, the message body will now not be displayed in the Moderator's log.
- Changed the code in Display.template.php so that the Delete Spam Post link won't show if the poster is a moderator or admin. (Thanks to JohnyB for the suggestion)
- Added an install script to enable the mod in $modsettings when it is installed.
- Added an un-install script which can be run separately if you wish to remove any database enties added by the mod
- Added Portuguese translation. Thanks to ne.miguelito
V1.3
- Updated for 2.0 RC2
- Due to changes in how the moderator log is created, a copy of the original post is no longer displayed.
V1.4
- Updated for 2.0 RC3
V1.5
- Corrected several bugs with the SMF 2.0 version. Thanks go to Bugo (http://www.simplemachines.org/community/index.php?action=profile;u=229017) for the corrections.
V1.6
- Updated for 2.0 RC5 +.
- Added the option to remove the database entries on uninstall.
- Added Russian translation. Thanks to Bugo
Very great addition, and congrats on making it, and also thank you! I'm installing this one immediately, IMHO it will be a great deterrent to get people to stop spamming.
Thanks for making it, really appriciating it! ;)
I get this :(
Fatal error: Cannot redeclare preparsecode() (previously declared in /home/ecricnet/public_html/forums/Sources/Subs-Post.php:158) in /home/ecricnet/public_html/forums/Sources/Subs-Post.php on line 286
when I click in Delete Spam Post appears this:
Fatal error: Cannot redeclare preparsecode() (previously declared in /home/nemigue/public_html/Sources/Subs-Post.php:158) in /home/nemigue/public_html/Sources/Subs-Post.php on line 286
somebody can help...
nobody knows the solution?
please help
Not sure but maybe you installed the mod twice.
didn't do that
Attach your Sources/Subs-post.php so others can look at it and find what is wrong.
Here you go
Please please help....This is a great Mod. HELPPPPPP!!!
Sorry for the delay.
I can't see what could be causing that problem. This mod doesn't alter that file.
Line 289 is suppose to be the un_preparsecode() function not parsercode() as the error indicates.
Which other mods do you have installed or did you install at the same time as this one?.
to see the same mistake here: http://www.simplemachines.org/community/index.php?topic=222201.0
that it was solved...
Thanks ne.miguelito, I've just updated it. As well I've added some more features. See the first post.
You will need to uninstall an older version in order to update.
Tks, link this mod: http://custom.simplemachines.org/mods/index.php?mod=1007
Ooops... Thanks again. :)
That this error:
Fatal error: Call to undefined function addslahes() in /home/nemigue/public_html/Sources/Post.php on line 2429
Help me...
Sorry, spelling error on my part. Please redownload it. I have corrected it.
In "Moderation Log" that this error
Parse error: syntax error, unexpected '<', expecting ')' in /home/nemigue/public_html/Sources/Modlog.php on line 149
Ok, that's fixed now and should be the end of the errors.
My apologies for not thoroughly checking it before uploading it.
Link to mod is: http://custom.simplemachines.org/mods/index.php?mod=1007 not: http://www.simplemachines.org/community/index.php?topic=222201.0
it is better to correct...
translate to Portuguese:
Modifications.portuguse.php
$txt['deletespampost_spamcop'] = '{SpamCop}';
$txt['deletespampost_spammer'] = '{Spammer}';
$txt['modlog_ac_deletespam'] = 'Spam\'s Apagados';
$txt['deletespampost_link'] = 'Apagar a Mensagem Spam';
$txt['deletespampost_confirm'] = 'Você deseja apagar esta mensagem?';
$txt['deletespampost_admin1'] = 'Permitir apagar mensagens Spam rápido.';
$txt['deletespampost_admin2'] = 'Insira a mensagem que deseja mostrar. HTML e BBC são permitidos. '. $txt['deletespampost_spamcop']. ' e '. $txt['deletespampost_spammer']. ' vão ser substituídos pelo moderador e nomes do spam respectivamente. Limpar o campo para a mensagem padrão.';
$txt['deletespampost_admin3'] = 'Pré-Visualizar:';
$txt['deletespampost_admin4'] = 'Conceder Karma negativo aos membros também';
$txt['deletespampost_admin5'] = 'Colocar uma cópia da mensagem original no quadro da Reciclagem';
$txt['deletespampost_error1'] = 'Desculpe, mas você não tem permissão para fazer isto.';
$txt['deletespampost_error2'] = 'Desculpe, você já apagou esta Mensagem Spam.';
$txt['deletespampost_message'] = '[b]Esta Mensagem foi apagada por '. $txt['deletespampost_spamcop']. ' porque foi considerada como Spam![/b]';
$txt['deletespampost_message'] .= "\n". '[i]'. $txt['deletespampost_spammer']. 'a contagem das suas mensagens teve uma redução de 1.[/i]';
$txt['deletespampost_no_change'] = '[i]O corpo da mensagem não foi alterado.[/i]';
Help.potruguese.php
$helptxt['deletespampost'] = 'Activando esta opção vai permitir aos moderadores e administradores apagar mensagens spam deixando a mensagem a baixo. Com isto a contagem de mensagens dos membros vai ser reduzida em uma unidade. Se o registo da moderação está activado os conteúdos das mensagens apagadas vão ser mostrados nos registos dos moderadores. Assim como alguma mensagem que seja modificada por algum moderador ou administrador.';
Thanks,ne.miguelito. :)
I've changed the link and have updated the mod with the translation.
Tks ;)
SMF Package Parser says
"ERROR: The package-info.xml file is invalid!"
Thanks, PanesarV . That's been fixed too.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Apagados] ftf', 1, 255), SUBSTRING('ftf', 1, 65534), SUBSTRING('Tugamen', 1, 2' at line 4
Ficheiro: /home/nemigue/public_html/Sources/Subs-Post.php
Linha: 1536
Because the translation Portuguese this string its wrong:
$txt['modlog_ac_deletespam'] = 'Spam\'s Apagados';
correct:
$txt['modlog_ac_deletespam'] = 'Spam Apagados';
Sorry...
I've corrected it and re-uploaded the mod.
Hello, just want you to know that your Mod is great. I was wondering if it's possible to have both the 'Delete Spam Post' and the original 'Report to Moderator' options in a post for the Moderator position and above? Maybe side by side.
I ask this cause I also use a Mod called 'Create Topic on Report to Moderator'. With this I have a board in a Leadership section called 'Reported Posts' where a copy of any post that is reported is moved. I do this so I have a copy of the original post before an edit or deletion is done. This way Global Mods+ in the leadership can track these reported posts without having to access the Logs.
Thanks for any help!
To do that, in the change in Display.template.php instead of this:
// Maybe they want to report this post to the moderator(s)?
elseif ($context['can_report_moderator'])
Use this:
// Maybe they want to report this post to the moderator(s)?
if ($context['can_report_moderator'])
Thank you, I'll do this edit tonight after work and see how it goes. :)
Quote from: Kays on March 13, 2008, 11:31:56 PM
To do that, in the change in Display.template.php instead of this:
It worked great, Thank you!
I installed this mod tonight and had a massive failure afterwards. This is the error I get when I click on home or anything else:
QuoteWarning: Unexpected character in input: ''' (ASCII=39) state=1 in .../Themes/default/languages/Modifications.english.php on line 69
Parse error: syntax error, unexpected ',' in .../Themes/default/languages/Modifications.english.php on line 69
60: $txt['modlog_ac_deletespam'] = 'Deleted Spam';
61: $txt['deletespampost_link'] = 'Delete Spam Post';
62: $txt['deletespampost_confirm'] = 'Do you wish to delete this post?';
63: $txt['deletespampost_admin1'] = 'Allow quick deletion of Spam Posts.';
64: $txt['deletespampost_admin2'] = 'Enter the message you wish to display. HTML and BBC are allowed. '. $txt['deletespampost_spamcop']. ' and '. $txt['deletespampost_spammer']. ' will be replaced by the moderator\'s and spammer\'s names respectively. Clear the field for the default message.';
65: $txt['deletespampost_admin3'] = 'Preview:';
66: $txt['deletespampost_admin4'] = 'Award the member negative karma also';
67: $txt['deletespampost_admin5'] = 'Place a copy of the original post in the recycle board';
68: $txt['deletespampost_error1'] = 'Sorry, but you don\'t have permission to do this.';
69: $txt['deletespampost_error2'] = Sorry, you have already deleted th
70:
71:
That is where the file ends now. why is it that the only time I need a back up is when I don't have one. :)
Okay i fixed it by removing everything after line 57. I can put it back if need be.
I'm running SMF1.15 and 1.2 of your mod. Hope your still here. I tried to uninstall the mod but I was not able to. I get this: (I have learned my lesson, always backup before installing mods)
Quote
Installing this package will perform the following actions:
Type Action Description
1. Execute Modification ./index.php Test successful
2. Execute Modification ./Sources/Modlog.php Test successful
3. Execute Modification ./Sources/ManagePosts.php Test successful
4. Execute Modification ./Sources/Post.php Test failed
5. Execute Modification ./Themes/default/Admin.template.php Test successful
6. Execute Modification ./Themes/default/Display.template.php Test successful
7. Execute Modification ./Themes/default/Modlog.template.php Test successful
8. Execute Modification - Modification parse error
looks like the error was on my end. I was out of disk space is it safe just to force an install over the top of it now that the disk space problem is solved?
great mod. big props.
works in 1.1.5 if anyone is wondering...
I was wondering if anyone could update this to smf 2.0 ?
I'll look into updating it for 2.0.
Sorry about the delay. but this mod now has been updated for 2.0 RC2.
Unfortunately, due to the changes in how the moderation log is put together for 2.0. It is no longer possible to display the body of the deleted message or that of any modified messages as before.
Hello,
I just tried to install in 1.1.1.11 and I get this: Execute Modification ./Sources/Post.php Test failed
How do I fix that?
-Mike
Hi, can you attach that file to a post so I can have a look at it.
Don't install the mod until I do.
bro can u explain how it'll look after the removal of message .... as i cant see anything like u shown in pics
im using RC2 default curve theme
Quote from: sid2varun on March 02, 2010, 03:58:59 AM
bro can u explain how it'll look after the removal of message .... as i cant see anything like u shown in pics
im using RC2 default curve theme
bump**
There should be a link in the bottom of a post replacing the "Report to moderator" link.
ummm no such link for me there
plz see the pic attached ... i've cleared site cache also , also have enabled options from admin cp
In looking at it, I think that's normal. It won't show if it's your own post. Or in the recycle board.
thats a test post in general board by another user
Pls Upgrade To Rc3
Thank you Very Much
Updated for 2.0 RC3.
@ sid2varun
Are you still having this problem? I can't seem to reproduce it in my testing
bro .. im using pretty heavily modified RC2 .... will upgrade to final version only now ....
If it works ok on RC3 then will try on my test site in my pc ... right now im out ...
Kays, maybe make a small fix in install_20xml?
updateMemberData($row['id_member'], array('karmaBad' => '+'));
Column 'karmaBad' doesn't exists in SMF 2.0 ('karma_bad' only).
Also I think it makes sense to replace this block
$smcFunc['db_query']('', '
SELECT
subject, body, id_member, poster_name, poster_email, poster_ip, icon
FROM {db_prefix}messages
WHERE id_msg = {int:msg}
LIMIT 1',
array(
'msg' => $_REQUEST['msg'],
)
);
$row = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
on this:
$request = $smcFunc['db_query']('', '
SELECT
subject, body, id_member, poster_name, poster_email, poster_ip, icon
FROM {db_prefix}messages
WHERE id_msg = {int:msg}
LIMIT 1',
array(
'msg' => $_REQUEST['msg'],
)
);
$row = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
Errors in the log will disappear ;)
Thanks Bugo, just got a chance to update the mod. :)
Well, then add russian translation :) For SMF 1.x and 2.x separately.
I have this mod on but it does not seem to be working. The post just gets deleted instead of being replaced with the template text. What am I doing wrong or how do I delete a SPAM post so this mod gets triggered.
Thank You.
Sorry for the delay Bugo and thanks. I just noticed the translations.
The mod has been updated for 2.0 RC5. Russian translation added.
Quote from: Robert A. Rosenberg on February 16, 2011, 05:18:51 PM
I have this mod on but it does not seem to be working. The post just gets deleted instead of being replaced with the template text. What am I doing wrong or how do I delete a SPAM post so this mod gets triggered.
Thank You.
Are you clicking on the "Delete Spam Post" link at the bottom right of the post?
If so, any errors on the error log?