Auto Respond

Started by Suki, April 14, 2011, 10:41:42 PM

Previous topic - Next topic

Illori

odd issue i face even with updates of the mod. my user is the auto-responder, when a new thread is posted and a reply made the last thread in the board is marked unread even though i have read it already, or is it that the last thread with the auto reply in it is not being marked read, i am not sure which. so every time i return to the board that uses the mod there is always at least 2 threads i need to read and the older one will not be marked read until i read the newer thread(s) that were auto responded.

Suki

Probably because this mod set the response message as unread:

Sources/AutoRespond.php:

'mark_as_read' => false,

change that to true.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Illori

that did not really fix it, now new posts are marked read before i get a chance to read them, instead of the last auto replied thread being marked read after i read it.

Suki

Sorry, you totally lost me.

well, regarding of who made the response, the response will be treated as unread, even for the person who created the response.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Illori

lets say person x makes a thread at 2pm and is auto replied to, i check the forum at 3pm and read the thread, later at 4pm person y makes a thread and it is auto replied to, i check the forum at 4:30 both threads are marked as unread [new icon next to them] even though i read the first thread already. i go and read both threads again and at 5pm another user makes a thread and is auto replied to, i check it later and 2 threads need to be read where the older thread i have already read hours before.

Suki

OK, I'll take a look at this a bit further.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

OK, new version.

Now you have the ability to set multiple custom replies for one or multiple boards.

Note, since this new version creates a new separate table for the responses, on upgrade you won't be keeping the old response message.

This was tested only on php 5.3, older versions may have conflicts.

to upgrade just uninstall the old version and install the new one.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

snooks


Sabrewulv

Brilliant and thank you. Just installed on our forums and it works fine. Thanks again for this mod.

Robert.


Suki

New version:

ChangeLog

-12/01/12
   Renamed template names to avoid conflicts with other mods.
   Added a remove file to manually remove the hooks if necesary.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Mstcool

Hi,
i cant find this on the mod tab anymore i saw it before
where it is?


EDIT: Nvm found it, its really good thanks bro!

Yiorgos

#92
Excellent mode Suki, thank you for sharing.

I direct users to introduce them selfs, and I use your auto respond mode to welcome them.

May I ask for an additional configuration parameter ...

Time delay for posting the auto respond (numerical representing time in X minutes, XX seconds)
I mean the auto-respond will be made available automatically and immediately, but the smf_messages.poster_time will be 60~180 seconds or more, different. Now it is 1 second.

Let's say a user posted on 14:22:00
I like to create a virtual delay of about 2 minutes and thirty six seconds.
The auto respond post_time to be  14:24:36 

That will make it look more "human" response.


Adding the above proposed parameter, we  may create more than one auto respond messages for the same topic and apply different time delay to them...

www.sdtv.gr


Abandoned modifications that I corrected to apply on SMF 2.0 Gold
Simple Awards System  To award good members
Limit Posts Per Day  for over-posting members

Mstcool

#93
Yiorgos
lol when u said i use it to welcome people yea i have the same idea and will use it for tht soon to :)

Suki

I will see about that, I don't know exactly how can I implement a delay to the hook.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Yiorgos

Quote from: Suki on March 13, 2012, 02:09:06 PM
I will see about that, I don't know exactly how can I implement a delay to the hook.

@ Suki Regarding the time_delay

I managed to create the code though I am not very proud of my coding skills.
What I actually did is:
  1.  I added to the Global variables of function AutoRespond() , (AutoRespond.php line 407) ,  the $smcFunc

  2.  After the creation of the Auto_Respond_post (AutoRespond.php line 488), I run a $smcFunc['db_query']...UPDATE... and increase the smf_messages.poster_time.

I attach AutoRespond.php that produce 132 seconds (2 minutes and 12 seconds) delayed autorespond message.
To run the code, just replace the .../Sources/AutoRespond.php (Make sure you backup the original file first)
Attached AutoRespond.php produces no error log.

You are welcome to improve the code and include it in your official releases.

www.sdtv.gr


Abandoned modifications that I corrected to apply on SMF 2.0 Gold
Simple Awards System  To award good members
Limit Posts Per Day  for over-posting members

Suki

But that doesn't really creates a delay, the message is still created right away and the user can see it right away.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Yiorgos

Quote from: Yiorgos on March 13, 2012, 01:06:09 PM
Excellent mode Suki, thank you for sharing.

I direct users to introduce them selfs, and I use your auto respond mode to welcome them.

May I ask for an additional configuration parameter ...

Time delay for posting the auto respond (numerical representing time in X minutes, XX seconds)
I mean the auto-respond will be made available automatically and immediately, but the smf_messages.poster_time will be 60~180 seconds or more, different. Now it is 1 second.

Let's say a user posted on 14:22:00
I like to create a virtual delay of about 2 minutes and thirty six seconds.
The auto respond post_time to be  14:24:36 

That will make it look more "human" response.


Adding the above proposed parameter, we  may create more than one auto respond messages for the same topic and apply different time delay to them...



Quote from: Suki on March 15, 2012, 10:08:53 AM
But that doesn't really creates a delay, the message is still created right away and the user can see it right away.

Yes !
You are right Suki
I am sorry for not making very clear my request.

I did not ask for a real delay...
You can see that in my quote above (colored red).
I should have ask for a virtual_time_delay.

Any way, such an approach is enough for my needs.

Quote from: Yiorgos on March 13, 2012, 01:06:09 PM
I direct users to introduce them selfs, and I use your auto respond mode to welcome them.

If a virtual_time_delay field will be provided for (in) any "Add a new message" form, then I will be able to create 2 or even 3 autoresponded welcome-messages, from different persons (Moderators), (for the same Board/Topic), and that would make my new forum members impressed and happy for been so welcomed!!

You are welcome If you like, to incorporate it and improve it by adding a user defined field for the virtual_time_delay in the form "Add a new message"

Again thank you for making available such a helpful mod.

www.sdtv.gr


Abandoned modifications that I corrected to apply on SMF 2.0 Gold
Simple Awards System  To award good members
Limit Posts Per Day  for over-posting members

Shambles

Quote from: ErrorlogMethods with the same name as their class will not be constructors in a future version of PHP; OharaDBClass has a deprecated constructor

To avoid the deprecation warning in PHP7.1

Sources/OharaDB.class.php
Code (Find) Select
function OharaDBClass($table)

Code (Replace with) Select
function __construct($table)


Thanks for the mod - it's been really useful.

Suki

New version:

2.0.2 May 2017
- Change license to Mozilla 2.0
- Remove deprecated constructor
- Add English utf8 language
- Update the template
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: