help Integrating Authorizedforurls extension?


no_avatar
robbie787
 
Mensajes: 9
Registrado: Mar Jun 02, 2020 1:00 pm
 Vie Jul 10, 2020 2:49 pm • a través de Web
One good thing I learn from the mchat extension is it has the authorized for urls extension integrated. I am trying to do the same with cbb follower. If you are unaware of how authorized for urls works. It basically stops certain groups from posting website urls and spamming.

The following code is what I got from the mchat extension to how they integrated it. But when I look at the cbb follower code I get a bit confused to where it would go.

In MCHAT services.yml file they have

Código: Seleccionar todo
- '@?rmcgirr83.authorizedforurls.listener'


That is placed in the core directory of the yml.

Then it goes on to the php code. In the main mchat.php are the following codes to integrate (authorized for urls)

Código: Seleccionar todo
use rmcgirr83\authorizedforurls\event\listener as authorizedforurls;


Código: Seleccionar todo
public function __construct(authorizedforurls $authorized_for_urls = null)


Código: Seleccionar todo
$this->authorized_for_urls   = $authorized_for_urls;



The question I have is which files of cbb follower do I put these codes to integrate authorizedforurls? As cbb follower has a much larger code base. I have tried a few combinations but with errors. Any help would be greatly appreciated.

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados