News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Reason For Editing Mod

Started by Nibogo, May 23, 2006, 12:44:11 AM

Previous topic - Next topic

tormi

Are we certain this works for 1.1.7?

Whimsical

I've installed this and got it running on 1.1.7 without any problems

thank you, a very useful mod! :)

tripl3r

Yes this does work for 1.1.7
only trouble i had was with the Source/post.php not writing automatically so did it manually

get your Source/post.php

find:
$msgOptions['modify_name'] = addslashes($user_info['name']);

}


Replace with:

$msgOptions['modify_name'] = addslashes($user_info['name']);
}
$msgOptions['edit_reason'] = addslashes(strtr(htmlspecialchars(isset($_POST['edit_reason']) ? $_POST['edit_reason'] : ''), array("\r" => '', "\n" => '', "\t" => '')));

echo '
<tr>
<td valign="top" align="right">
<b>Reason For Edit:</b>
</td>
<td>
<input type="text" name="edit_reason" size="50" value="" />
</td>
</tr>';



do it for every occurance there should be like 3.

floydpink

#283
Great mod that I've been using for ages and is now working in 1.1.8
One small issue though. If you press TAB from the main text box the focus moves to SAVE rather than Reason for edit and then SAVE. As a power user, it's very annoying having to always use the mouse to be able to then enter a reason!
It's easy to set the ReasonForEdit text box into the tabindex, but then ana dditional problem arises in that the number of TABs needed to get to from thte main edit text box to SAVE is different on the New and Modify Topic screens. To overcome this, a dummy additional tabindex is needed on the new topic screen to mimic the ReasonForEdit tab when it is not dislayed.
themes/default/ post.template.php
Find: <input type="text" name="edit_reason" size="50" value="" />

Replace with: <input type="text" name="edit_reason" size="50" value="" tabindex="', $context['tabindex']++, '" />

Find: // If the admin has enabled the hiding of the additional options - show a link and image for it.
if (!empty($settings['additional_options_collapsable']))
echo '
<tr>
<td colspan="2" style="padding-left: 5ex;">
<a href="javascript:swapOptions();"><img src="', $settings['images_url'], '/expand.gif" alt="+" id="postMoreExpand" /></a> <a href="javascript:swapOptions();"><b>', $txt['post_additionalopt'], '</b></a>

Replace with: // If the admin has enabled the hiding of the additional options - show a link and image for it.
if (!empty($settings['additional_options_collapsable']))
echo '
<tr>
<td colspan="2" style="padding-left: 5ex;">
<a href="javascript:swapOptions();"><img src="', $settings['images_url'], '/expand.gif" alt="+" id="postMoreExpand" /></a><a href="javascript:swapOptions();" ';
// Floyd INSERT - Reason For Edit Mod bugfix: for new posts force a dummy tabindex on Additional Options so that the same number of tab presses is needed to get from edit text to save/preview buttons
if ($context['is_new_post'])
echo '
tabindex="', $context['tabindex']++, '"';
echo '
><b>', $txt['post_additionalopt'], '</b></a>

Molten Bear

This is a nice and helpful mod.  Any chance it might be updated to work in 2.0?

Thanks for considering.

General_Naga

Quote from: Molten Bear on February 14, 2009, 12:05:03 PM
This is a nice and helpful mod.  Any chance it might be updated to work in 2.0?

Thanks for considering.

+1 A SMF 2.0 version would be great. This is one of those "must have" mods!

Mai Pen Rai

Quote from: General_Naga on February 20, 2009, 10:09:48 AM


+1 A SMF 2.0 version would be great. This is one of those "must have" mods!

I agree
Mai Pen Rai - means "No worries" in Thai

Mai Pen Rai.se

ttuu

Have the option to charge users to insert reason and when they did not cause il get you receive an error message "You must put a reason to edit a message"
?

ttuu

Quote from: ttuu on April 26, 2009, 04:32:32 PM
Have the option to charge users to insert reason and when they did not cause il get you receive an error message "You must put a reason to edit a message"
?
bump

bork


Does anyone know if there is there any alternative to this mod for SMF 2.0?

iceman~

A wise monkey never monkies with another monkey's monkey

General_Naga

I think to be honest it will require a new mod to be created as I think winrules is just too busy to do it. Any volunteers? :)

Nibogo

Quote from: General_Naga on June 19, 2009, 03:26:56 PM
I think to be honest it will require a new mod to be created as I think winrules is just too busy to do it. Any volunteers? :)

I send a PM to him asking if I can take over this mod, If I do I will do the SMF 2.0 Version ;)

General_Naga

Best news I've heard all week! This is just one of those must have mods which adds something you can't do without once you've tried it ;)

Nibogo

Please translators help me with this strings with utf8 support please:

// Reason for editing mod
$txt['reason'] = 'Reason';
$txt['reason_edit'] = 'Reason For Edit';
$txt['permissionname_reason_edit'] = 'Set Reason for edit';
$txt['permissionhelp_reason_edit'] = 'Set if the membergroup is allowed to put the reason for edit their own posts.';
// Reason for editing mod END


winrules says of is ok if I take over this mod and is already finished I just need add more languages

FragaCampos

Here's the Portuguese translation:

// Reason for editing mod
$txt['reason'] = 'Motivo';
$txt['reason_edit'] = 'Motivo Para Editar';
$txt['permissionname_reason_edit'] = 'Escreva o Motivo Para Editar';
$txt['permissionhelp_reason_edit'] = 'Escolha se quer que determinado grupo tenha permiss&atilde;o para escrever o motivo para editar as suas pr&oacute;prias mensagens.';
// Reason for editing mod END


:)

movingmagic

// Reason for editing mod
$txt['reason'] = 'Reden';
$txt['reason_edit'] = 'Reden voor aanpassing';
$txt['permissionname_reason_edit'] = 'Instellen reden voor aanpassing';
$txt['permissionhelp_reason_edit'] = 'Instellen of de ledengroep permissie heeft om de reden voor aanpassing in de eigen posts te plaatsen.';
// Reason for editing mod END

Nibogo

#297
Changelogs:
2.0 - 22 June 2009
o Added Permission for "Set Reason for Edit"
o Added Support for SMF 2.0
o Now Developed by NIBOGO
o Changed all the text now using languages strings
o Added spanish, spanish_es, spanish_latin, portuguese and dutch all with utf8 support

VERY IMPORTANT!!

If you are using a 1.x version of this mod and want to upgrade please do this things:

1. Remove all the code MANUALLY

2. Delete the mod in the package manager

3. Install this new version

PD: If you uninstall using the package manager you will delete all the data of this mod so you need to do this or replace the package in the Packages dir with a new one without the uninstall

Sakae

Good MOD.

But it's not working for me.

Apply Filter: Only show the errors of this type  Type of error: Critical
Apply Filter: Only show the error messages of this URL http://www.tigrelog.com.br/index.php?action=jsmodify;topic=4833;sesc;xml
Apply Filter: Only show the errors with the same message
The database value you're trying to insert does not exist: var_edit_reason
Function: modifyPost
Apply Filter: Only show the errors from this file
Arquivo: **/Sources/Subs-Post.php
Linha: 2475
http://www.tigrelog.com.br
l: simple p: machines

General_Naga

NIBOGO your a god amougst men!

Thank you so much for taking over this mod.

Mod works fine on my forum - I needed to manually add the second of the Display.php changes but apart from that it went perfectly :)

Advertisement: