[ABD] Autorespond to new topic

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

[ABD] Autorespond to new topic

Post by Ger »

Extension Name: Autorespond
Author: Ger

Extension Description:
This extension creates an auto-reply message to newly created topics, useful sometimes for service oriented boards.

Features:
  • Define options per forum
  • Define a user and a message to be posted
  • Use tokens to parse specific topic variables like username/title and such
Extension Version: 1.0.0-RC

Extension Download: https://github.com/GerB/autoresponder

Translations:
Dutch and English included.
Last edited by Ger on Tue Aug 21, 2018 9:48 am, edited 5 times in total.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [DEV] Autorespond to new topic

Post by Ger »

Please note; at the moment this extension has all it's config predefined in the event listener as it's more a proof of concept. ACP options will come later.
Last edited by Ger on Mon Jul 23, 2018 6:42 am, edited 1 time in total.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [DEV] Autorepond to new topic

Post by </Solidjeuh> »

Can it also include a {nickname} option?
Like: Hello {nickname}, welcome to ....

Or is it the option that is yet to come "Define a user and a message to be posted" ?
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [DEV] Autorepond to new topic

Post by Ger »

That option is now only for the user that's posting the auto-reply. But I think the message posted could have some variables as well. Haven't thought about it yet so if you have some ideas, please drop them here. :)
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
User avatar
eunaumtenhoid
Registered User
Posts: 1007
Joined: Wed Jun 03, 2009 12:46 am
Location: ????

Re: [DEV] Autorepond to new topic

Post by eunaumtenhoid »

NICE work^^ waitin for more news
My translations of the extensions for Brazilian Portuguese
https://github.com/phpBBTraducoes
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [BETA] Autorespond to new topic

Post by Ger »

First BETA release is now available. You can set options in the ACP now on a per forum basis (ACP->forums->edit forum)
Froddelaar wrote: Wed Jul 18, 2018 3:41 pm Can it also include a {nickname} option?
Like: Hello {nickname}, welcome to ....

Or is it the option that is yet to come "Define a user and a message to be posted" ?
I've created several tokens for now:
{topic_title}: Topic title
{poster_username}: Username of the user that starts a new topic
{ar_username}: Uername of for the user posting the auto-reply
{board_url}: Link to your board
{topic_url}: Link to the topic
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: [3.2][BETA] Autorespond to new topic

Post by entriti »

I'm trying to use this mod, but when I call the function --> pb::autoreply_post($subject, $forum_id, $topic_id, $data_bot) answer the forum with my user.

How could I modify this behavior? I want a different user to answer ("bot user").


Add picture.

Image

Thanks!
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Autorespond to new topic

Post by Ger »

entriti wrote: Wed Jul 25, 2018 10:23 am when I call the function --> pb::autoreply_post($subject, $forum_id, $topic_id, $data_bot)
That's not a function within this extension. The main stuff happens here: https://github.com/GerB/autoresponder/b ... er.php#L89

It takes only the $event as a parameter. As you can see I switch user when I submit the auto-reply. You can see how I do that here.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: [3.2][BETA] Autorespond to new topic

Post by entriti »

Hi Ger,

2 questions:

- Because you use Symfony?
- Where do I download symfony? (or add your dir symfony)

Thanks :D
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][BETA] Autorespond to new topic

Post by david63 »

entriti wrote: Thu Jul 26, 2018 9:27 am - Where do I download symfony? (or add your dir symfony)
You do not need to do anything with Symfony - it is part of the phpBB package
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: [3.2][BETA] Autorespond to new topic

Post by entriti »

main_listern.php have:
/**
* @ignore
*/
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

Return this:

Code: Select all

Fatal error: Uncaught exception 'Symfony\Component\DependencyInjection\Exception\InvalidArgumentException' with message 'A service definition must be an array or a string starting with "@" but NULL found for service "autoresponder.listener" in C:\wamp64\www\phpBB3\config\production/container\../../default/container/services.yml. Check your YAML syntax.' in C:\wamp64\www\phpBB3\vendor\symfony\dependency-injection\Loader\YamlFileLoader.php:148 Stack trace: #0 C:\wamp64\www\phpBB3\vendor\symfony\dependency-injection\Loader\YamlFileLoader.php(126): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinition('autoresponder.l...', NULL, 'C:\\wamp64\\www\\p...') #1 C:\wamp64\www\phpBB3\vendor\symfony\dependency-injection\Loader\YamlFileLoader.php(71): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->parseDefinitions(Array, 'C:\\wamp64\\www\\p...') #2 C:\wamp64\www\phpBB3\vendor\symfony\config\Loader\FileLoader.php(101): Symfony\Component\DependencyInjection\Loader\YamlFileLoader->load('C:\\wamp64\\ww in C:\wamp64\www\phpBB3\vendor\symfony\config\Loader\FileLoader.php on line 122

And my services.yml:
autoresponder.listener:
class: phpbb\event\main_listener
arguments:
- '@user'
- '@auth'
- '@dbal.conn'
- '@request'
tags:
- { name: event.listener }
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Autorespond to new topic

Post by Ger »

What version of phpBB you have?

Almost every extension for phpBB uses events and thus Symfony. If this doesn't work for you, you must have done something wrong.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
entriti
Registered User
Posts: 8
Joined: Fri Jul 13, 2018 12:26 pm

Re: [3.2][BETA] Autorespond to new topic

Post by entriti »

viewtopic.php:
include($phpbb_root_path . 'event/main_listener.' . $phpEx);
pb::post_autorespond_message('reply');

Result:
Fatal error: Call to undefined method pb::post_autorespond_message() in C:\wamp64\www\phpBB3\viewtopic.php on line 2471
In my workspace i have main_listener.php in C:\wamp64\www\phpBB3\event


If add your service (services.yml rename services_autoresponder.yml):

Code: Select all

C:\wamp64\www\phpBB3\config\default\container\services.yml
imports:
    - { resource: services_autoresponder.yml }

The requested environment production is not available.
my version is phpbb 3.2


thanks!
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: [3.2][BETA] Autorespond to new topic

Post by david63 »

Forgive me for asking a basic question - but do you know how to install an extension? If not I suggest that you follow the link in my signature
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Ger
Registered User
Posts: 2108
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] Autorespond to new topic

Post by Ger »

It seems to me you are approaching this way differently than how extensions should be integrated. Or at least how they're intended to be integrated. As david63 says, please follow the regular way of installing extensions by uploading it to ./ext/ger/autoresponder and hit the install button in ACP. It's also described in the readme.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-
Locked

Return to “Abandoned Extensions”