Autoresponse reply first message

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Scam Warning
Post Reply
entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Autoresponse reply first message

Post by entriti » Fri Jul 13, 2018 12:42 pm

Hi,

We want to create an autoresponse message when a user post a new topic. We expect that a message from a generic user (like support or something like that) reply his first post and say something like "Thanks for contact us, An especialist going to reply ASAP". We need only in this first message, not in the middle of a conversation.

We were reading the documentation in phpbb and We found:

Code: Select all

$user->session_create($user);
		$auth->acl($user->data);
		$user->setup();
And we can reply that first post with the phrase we want, but the problem is the user logged lose his session. De you know how to keep the previus version?

We don´t found the problem and how to solve.

How do you to create the new session and you don´t lose the previus one? Any ideas?

Thankyou very much.

User avatar
david63
Jr. Extension Validator
Posts: 14551
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Autoresponse reply first message

Post by david63 » Fri Jul 13, 2018 12:51 pm

There is nothing within phpBB that will do what you are wanting - you will need an extension to do that.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Ger
Recognised Extension Developer
Posts: 1592
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Autoresponse reply first message

Post by Ger » Mon Jul 16, 2018 9:35 am

Yeah, this would probably need to be an extension. Seems like it won't be a very hard one to write and I can probably use some stuff I already wrote for my Feed Post Bot extension.

Am I right in that you need:
  1. An ACP option where you can select a user and enter a message to be posted
  2. Perhaps an option per forum to check/uncheck whether or not this autoresponder should be enabled?
  3. And of course something that makes above actually happen ;)
My extensions: Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

User avatar
AmigoJack
Registered User
Posts: 5262
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Autoresponse reply first message

Post by AmigoJack » Mon Jul 16, 2018 2:39 pm

Speaking as a customer: don't do this! It will not help making me feel valued, but rather be treated by robots, thus having even less hope in getting a response than I had initially. Whenever I see such a thing in board or as an email reply I know I already wasted my time.

It's like changing a tracker ticket's status from "new" to "in progress" without actually working on it just to not let it escalate - it's missing the point of the whole system.
The worst thing about censorship is ███████████

User avatar
Ger
Recognised Extension Developer
Posts: 1592
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Autoresponse reply first message

Post by Ger » Tue Jul 17, 2018 12:46 pm

entriti wrote:
Fri Jul 13, 2018 12:42 pm
Mention
Ger wrote:
Mon Jul 16, 2018 9:35 am
Am I right in that you need:
  1. An ACP option where you can select a user and enter a message to be posted
  2. Perhaps an option per forum to check/uncheck whether or not this autoresponder should be enabled?
  3. And of course something that makes above actually happen ;)
If you want to I can look into it, but I need to know what you want exactly.
My extensions: Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: Autoresponse reply first message

Post by entriti » Wed Jul 18, 2018 9:34 am

Hi Ger,
Am I right in that you need:
An ACP option where you can select a user and enter a message to be posted
Perhaps an option per forum to check/uncheck whether or not this autoresponder should be enabled?
And of course something that makes above actually happen ;)

So yes because currently PHPBB does not support it. I need a solution, the way I do not know.


Need I said in the initial post. Steps:

1. Login with normal user
2. New topic
3. Login with automatic user ("bot")
4. Reply user2/bot : is first post and say something like ""Thanks for contact us"
5. Normal user write: "I need X"
6. BOT read the message, if understand the message, answer.


The problem is found when the bot user replies, the normal user is disconnected (destroy_session I do not know why...)

Thanks Ger ;)

entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: Autoresponse reply first message

Post by entriti » Wed Jul 18, 2018 9:41 am

My code if you need:

viewtopic.php:

we have tried with:

session_save_path($phpbb_root_path. '/cache/tmp');
$user->session_create($user);
$auth->acl($user->data);
$user->setup();

But it does not save the session in the cache either.

I have tried all the variables with this system of $ user-> session_create ($ user), with the user bot, session_begin, ... but nothing. I think we should rule out this way of posting and find a different one.


thanks

User avatar
AmigoJack
Registered User
Posts: 5262
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Autoresponse reply first message

Post by AmigoJack » Wed Jul 18, 2018 1:58 pm

entriti wrote:
Wed Jul 18, 2018 9:34 am
3. Login with automatic user ("bot")
This is not needed at all: "logging in" is a concept for humans, whereas in your case you just want to create a post which is associated to a different user, which can be achieved by temporarily changing this:

Code: Select all

$user-> data['user_id']

entriti wrote:
Wed Jul 18, 2018 9:41 am

Code: Select all

$user->session_create($user);
Calling the method of an object and handing over that very object itself doesn't make sense in the first place. Doesn't look like you understood the basics of programming - better leave it to others.
The worst thing about censorship is ███████████

User avatar
Ger
Recognised Extension Developer
Posts: 1592
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: Autoresponse reply first message

Post by Ger » Wed Jul 18, 2018 2:47 pm

I've created a small extension here: viewtopic.php?f=456&t=2479446

This will be expanded later.
My extensions: Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update and Modern Quote
Newest: Quoted Where + anonymize

Like my work? Buy me a coffee to keep it coming. :ugeek:
-Available for custom work-

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: new.new, YoOoster, zorni and 7 guests