News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Notify Modification Last Post

Started by M-DVD, January 06, 2009, 07:45:29 AM

Previous topic - Next topic

M-DVD

I see nothing wrong with that file. I don't see what that shows the error.

Try uninstalling and reinstalling.  :-\

victoryrock

Thanks for all your help M-DVD.

I ended up doind in and delete some code that had been duplicated somehow.  THe MOD works great now.

VR
Quote from: M-DVD on February 17, 2009, 07:07:33 PM
I see nothing wrong with that file. I don't see what that shows the error.

Try uninstalling and reinstalling.  :-\

M-DVD

I'm glad that is working fine.

Thanks for your comment and thank you for using  :D

DeviDarkL

#23
Great Mod ;)

Portuguese_pt translations (normal & utf8)

Modifications.portuguese_pt.php
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// MOD Notify Modification Last Post
$txt['ModifyLastPostMail'] = 'Activar notificação por email quando o último post é editado';
$txt['ModifyLastPostMail_sub'] = 'Enviar notificação para os utilizadores que estão subscriptos no tópico';
$txt['ModifyLastPostBump'] = 'Bump(ar) o tópico quando o último post é editado';
$txt['ModifyLastPostBump_sub'] = 'Esta opção também mostra o icon (ver a opção a seguir)';
$txt['ModifyLastPostIcon'] = 'Mostrar icon "New"';
$txt['ModifyLastPostIcon_sub'] = 'Mostrar icon "New" quando o último post foi modificado.';
$txt['notification_modify_subject'] = 'Resposta modificada: %s';
$txt['notification_modify'] = 'O último post ao tópico que te subscreves-te foi modificado por %s.' . "\n\n" . 'Vê a resposta em: ';]]></add>
</operation>
</file>

<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
// MOD Notify Modification Last Post
$txt['ModifyLastPostMail'] = 'Activar notificação por email quando o último post é editado';
$txt['ModifyLastPostMail_sub'] = 'Enviar notificação para os utilizadores que estão subscriptos no tópico';
$txt['ModifyLastPostBump'] = 'Bump(ar) o tópico quando o último post é editado';
$txt['ModifyLastPostBump_sub'] = 'Esta opção também mostra o icon (ver a opção a seguir)';
$txt['ModifyLastPostIcon'] = 'Mostrar icon "New"';
$txt['ModifyLastPostIcon_sub'] = 'Mostrar icon "New" quando o último post foi modificado.';
$txt['notification_modify_subject'] = 'Resposta modificada: %s';
$txt['notification_modify'] = 'O último post ao tópico que te subscreves-te foi modificado por %s.' . "\n\n" . 'Vê a resposta em: ';]]></add>
</operation>
</file>


EmailTemplates.portuguese_pt.php
<file name="$languagedir/EmailTemplates.portuguese_pt.php" error="skip">
<operation>
<search position="after"><![CDATA[
/*
@additional_params: happy_birthday]]></search>
<add><![CDATA[
// MOD Notify Modification Last Post
// Traslate this
$search = array ('Resposta ao Tópico', 'Uma resposta foi colocada');
$replace = array ('Reposta modificada', 'A última resposta foi modificada');

// Do not touch this
$sub_type_arr = array ('', '_body', '_once', '_body_once');
foreach ($sub_type_arr as $sub_type)
$txt['emails']['notification_modify' . $sub_type] =
str_replace($search, $replace, $txt['emails']['notification_reply' . $sub_type]);
]]></add>
</operation>
</file>
<file name="$languagedir/EmailTemplates.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
/*
@additional_params: happy_birthday]]></search>
<add><![CDATA[
// MOD Notify Modification Last Post
// Traslate this
$search = array ('Resposta ao Tópico', 'Uma resposta foi colocada');
$replace = array ('Reposta modificada', 'A última resposta foi modificada');

// Do not touch this
$sub_type_arr = array ('', '_body', '_once', '_body_once');
foreach ($sub_type_arr as $sub_type)
$txt['emails']['notification_modify' . $sub_type] =
str_replace($search, $replace, $txt['emails']['notification_reply' . $sub_type]);
]]></add>
</operation>
</file>

M-DVD

Thanks, your translations have been uploaded :)

Kimmie

1. Your description says members will get an "email" notification when their post is edited. WIll it send them an "email" or a "pm"? (if its an email, is there a setting to chage it so that they get a pm instead of an email?)

2. Is there an option to "exclude" non post count groups (i.e. staff) from getting a notification when someone edits their post? (I have several threads for staff that I edit all the time to update them for the staff and I dont want them getting an email every single time)

M-DVD

Hi.

Currently only is mail.

But I think you have a confusion with the function of this MOD.

When a "new reply" is posted in an topic, the members receive an email notification (if the member are subscribed to the topic, and if they had already visited the topic).

However, if the member(*) modify the (his) last post in the topic (for example: to add more information that he forgot, or to change the message), in this case we don't received notice. So, if you already visited this topic, you don't know of this change.

(*) or a moderator/adm.

The only way to know, is if the person send a new reply, rather than modify his post... Or with this MOD :)

Kimmie

#27
Quote from: M-DVD on April 20, 2009, 08:53:01 PM
Hi.

Currently only is mail.

But I think you have a confusion with the function of this MOD.

When a "new reply" is posted in an topic, the members receive an email notification (if the member are subscribed to the topic, and if they had already visited the topic).

However, if the member(*) modify the (his) last post in the topic (for example: to add more information that he forgot, or to change the message), in this case we don't received notice. So, if you already visited this topic, you don't know of this change.

(*) or a moderator/adm.

The only way to know, is if the person send a new reply, rather than modify his post... Or with this MOD :)


So basically the only thing this mod does is notifies the people that are subscribed to that thread that the very last post has been modified? Unfortunately, since this wouldnt happen very often, it wouldnt deem useful on my site but thanks anyways :). I was hoping it was a mod that sent a pm to a member if staff had to modify their post.  I dont like the email feature because most email providers think that email from a server is spam and dont deliver it to peoples inboxes which is why most people dont even get the initial notification - the mailer daemon automatically deletes it (Yahoo and Hotmail are bad about not delivering mail).

MIAUS

Hi,

thanks a lot for this Mod, it's just what I was missing! BUT why is it limited to edits in the LAST posts only? It would be great, if any edit could bump a topic - maybe this could be a future option?

Here is a german translation for the Mod:
//   MOD Notify Modification Last Post
$txt['ModifyLastPostMail'] = 'Email schicken, wenn letzter Beitrag editiert wurde';
$txt['ModifyLastPostMail_sub'] = 'Nachricht an Mitglieder schicken, die das Thema abonniert haben';
$txt['ModifyLastPostBump'] = 'Thema nach oben "bumpen" wenn letzter Beitrag editiert wurde';
$txt['ModifyLastPostBump_sub'] = 'Diese Option zeigt ein zusätzliches Icon (siehe nächste Option)';
$txt['ModifyLastPostIcon'] = 'Zeige Icon "Neu"';
$txt['ModifyLastPostIcon_sub'] = 'Zeige Icon "Neu" wenn der letzte Beitrag editiert wurde.';
$txt['notification_modify_subject'] = 'Antwort editiert: %s';
$txt['notification_modify'] = 'Der letzte Beitrag eines Themas, dass du beobachtest wurde editiert von %s.' . "\n\n" . 'Lies die Änderung hier nach: ';

M-DVD

Quote from: MIAUS on May 04, 2009, 08:28:04 PM
Hi,

thanks a lot for this Mod, it's just what I was missing! BUT why is it limited to edits in the LAST posts only? It would be great, if any edit could bump a topic - maybe this could be a future option?

Here is a german translation for the Mod:


Thanks I have uploaded your translation :D

vika.vedy

#30
Hi, M-DVD
I installed your mod on latest 1.1.9 SMF and found it causes some issues

1. first with quickedit function. if your made quick edit of any last message once, then you cannot call quickedit again without page refresh, because of changed MSG_ID in DB, but not changed msg_id param in javascript quickedit call function: onclick="modify_msg(msg_id, cur_session_id)"

2. second with MYSQL error: "Duplicate entry \xxxxxx\' for key 1" when updating last message ID in case of new message from other user came earlier than UPDATE statement with ++$modSettings['maxMsgID'] remembered in memory.
it happens on this place:

// Bump Topic?
if ($modSettings['ModifyLastPostBump'])
{
$msgOptions['id'] = ++$modSettings['maxMsgID'];
// Change ID Last Messsage
db_query("
UPDATE {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m
SET b.ID_LAST_MSG = {$msgOptions['id']},
b.ID_MSG_UPDATED = {$msgOptions['id']},
t.ID_LAST_MSG = {$msgOptions['id']}" . (!isset($row[2]) ? ",
t.ID_FIRST_MSG = {$msgOptions['id']}" : '') . ",
m.ID_MSG = {$msgOptions['id']},
m.ID_MSG_MODIFIED = {$msgOptions['id']}
WHERE b.ID_BOARD = {$topicOptions['board']}
AND t.ID_TOPIC = {$topicOptions['id']}
AND m.ID_MSG = {$row[0]['ID_MSG']}"
,__FILE__,__LINE__
);


so, I have to uninstall this mod because of my forum stay little buggy with these issues  :(

can you correct these little bugs?


M-DVD

Quote from: vika.vedy on June 17, 2009, 11:48:31 AM
Hi, M-DVD
I installed your mod on latest 1.1.9 SMF and found it causes some issues

1. first with quickedit function. if your made quick edit of any last message once, then you cannot call quickedit again without page refresh, because of changed MSG_ID in DB, but not changed msg_id param in javascript quickedit call function: onclick="modify_msg(msg_id, cur_session_id)"

Yes, it is a known problem, however, I didn't know how to implement the solution, and I thought "I'm the only one uses the QuickModify, and I don't like the Bump... yes, this can wait :p"

Really, it need to change the ID, not only in the modify_msg function.

PS: Fixed.

Quote from: vika.vedy on June 17, 2009, 11:48:31 AM
2. second with MYSQL error: "Duplicate entry \xxxxxx\' for key 1" when updating last message ID in case of new message from other user came earlier than UPDATE statement with ++$modSettings['maxMsgID'] remembered in memory.
it happens on this place:

Does this happen a lot?
ie, What¡¡?? is this ever happened sometime!?.

Honestly, I didn't expected this to be possible to happen. The maxMsgID have to change, while the script is running; after has been read the maxMsgID, and before will be rewrite with the bump. Imagine, in tenths of seconds. :o

Anyway, have been fixed. In a few hours I upload the new package.

Thanks very much  :)

M-DVD

#32
Update Notify Modication Last Post v1.3:
===========================


Changes:

  • Fix bug with Bump and QuickModify - Thanks vika.vedy by report
  • Fix bug that avoids the bump if another user creates a message at the same time - Thanks vika.vedy by report
  • English, English_British, Spanish_Es, Spanish_Latin, Portuguese_Portugal, German in the package

How do I upgrade?

  • Uninstall the previous version
  • Install the new
  • Make HardRefresh or Clean Temporary Internet Files - Isn't neccesary edit templates files

=======================================

Cambios:

  • Corregido bug entre Bump y QuickModify - Thanks vika.vedy by report.
  • Corregido bug que evitaba el bumpeo si en ese mismo momento otro usuario creaba un mensaje nuevo - Thanks vika.vedy by report.

¿Como actualizar?

  • Desintalar la anterior versión
  • Instalar la nueva
  • Hacer HardRefresh o limpiar los archivos temporales de internet - No es necesario editar archivos templates

vika.vedy


vika.vedy

I attached russian language part here.

vika.vedy

mmm... for quick reply doesn't work because of very small error, this code:
Quote
      $modSettings['maxMsgID'] = ++$msgOptions['id'];
      // Change ID Last Messsage
      db_query("
         UPDATE {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m
            SET b.ID [nofollow]_LAST_MSG = {$msgOptions['id']},
               b.ID [nofollow]_MSG_UPDATED = {$msgOptions['id']},
               t.ID [nofollow]_LAST_MSG = {$msgOptions['id']}" . (!isset($row[2]) ? ",
               t.ID [nofollow]_FIRST_MSG = {$msgOptions['id']}" : '') . ",
               m.ID [nofollow]_MSG = {$msgOptions['id']},
               m.ID [nofollow]_MSG_MODIFIED = {$msgOptions['id']}
            WHERE b.ID [nofollow]_BOARD = {$topicOptions['board']}
               AND t.ID [nofollow]_TOPIC = {$topicOptions['id']}
               AND m.ID [nofollow]_MSG = {$row[0]['ID_MSG']}"
         ,__FILE__,__LINE__
      );
      // Conservate Attachment
      db_query("
         UPDATE {$db_prefix}attachments
            SET ID_MSG = {$msgOptions['id']}
            WHERE ID_MSG = {$row[0]['ID_MSG']}
            LIMIT {$modSettings['attachmentNumPerPostLimit']}"
         ,__FILE__,__LINE__
      );
      // Change maxMsgID settings
      updateSettings(array('maxMsgID' => $msgOptions['id']), true);
      // Compatibility for Quick Modify
      $context['msg_bumped'] = $msgOptions['id'];

should be:
Quote
      $old_msg_id = $msgOptions['id'];
      $modSettings['maxMsgID'] = ++$msgOptions['id'];
      // Change ID Last Messsage
      db_query("
         UPDATE {$db_prefix}boards AS b, {$db_prefix}topics AS t, {$db_prefix}messages AS m
            SET b.ID [nofollow]_LAST_MSG = {$msgOptions['id']},
               b.ID [nofollow]_MSG_UPDATED = {$msgOptions['id']},
               t.ID [nofollow]_LAST_MSG = {$msgOptions['id']}" . (!isset($row[2]) ? ",
               t.ID [nofollow]_FIRST_MSG = {$msgOptions['id']}" : '') . ",
               m.ID [nofollow]_MSG = {$msgOptions['id']},
               m.ID [nofollow]_MSG_MODIFIED = {$msgOptions['id']}
            WHERE b.ID [nofollow]_BOARD = {$topicOptions['board']}
               AND t.ID [nofollow]_TOPIC = {$topicOptions['id']}
               AND m.ID [nofollow]_MSG = {$row[0]['ID_MSG']}"
         ,__FILE__,__LINE__
      );
      // Conservate Attachment
      db_query("
         UPDATE {$db_prefix}attachments
            SET ID_MSG = {$msgOptions['id']}
            WHERE ID_MSG = {$row[0]['ID_MSG']}
            LIMIT {$modSettings['attachmentNumPerPostLimit']}"
         ,__FILE__,__LINE__
      );
      // Change maxMsgID settings
      updateSettings(array('maxMsgID' => $msgOptions['id']), true);
      // Compatibility for Quick Modify
      $context['msg_bumped'] = $old_msg_id;

I suppose...

Good reason to add russian lang, doesn't it?  ;)

M-DVD

Quote from: vika.vedy on June 24, 2009, 08:25:33 AM
I attached russian language part here.

Thanks, your translation have been uploaded :D

Quote from: vika.vedy on June 24, 2009, 09:02:27 AM
mmm... for quick reply doesn't work because of very small error, this code:
...
Good reason to add russian lang, doesn't it?  ;)

This package was uploaded by mistake. It wasn't the final 1.2. Sorry.

Have been fixed :-[

And yes, have been added :P

drhamza

very nice mod, good job bro
i wonder if it can be developed so that any modification in any post, not only the LAST post, gives a notification.... the (new) icon being linked to the modified post......
keep it up

robinrobin

Would this mod by any chance perhaps be able to be modified so that it bumps the FIRST post of a topic? That would be great for topics where the first post is updated often, like in developer update topics.

I don't see the point with bumping a topic just because the latest post was edited. The latest post of a topic is usually made by a regular member who has nothing to do with the topic itself, so why it would be important to bump the last posts edit is beyond my understanding.

Also, we need your help with the list of contributions in posts in the Contributions mod, M-DVD.  O:)

GrayFiend

Hi.
Firstly, I want to thank the author for this great mod. :)
Secondly, I have few remarks about it. :-[

1) Russian translation is not applicable for forums with cp_1251 chartable because both sections are encoded with utf8 in your mod.
2) The e-mail messages were not translated to Russian. It's here:
$search = array ('Topic reply', 'появился новый ответ от пользователя');
$replace = array ('Reply modified', 'сообщение было отредактировано пользователем');

3) May be will be better don't send email about changes in a topic if they were made during of 'Courtesy edit wait time' when it doesn't marked like edited?
Currently mod sends notification in any case.

Advertisement: