Page 17 of 19

Re: [3.1][3.2][RC] Autolinks 1.2.5

Posted: Fri Aug 02, 2019 6:18 pm
by lixxbox
hi,

attention, i'm not a coder. :)
maybe someone can test this.

in event/listener.php

in the forloop at line 185 add something like this:

Code: Select all

// Headlines [h1]-[h4]
if (strstr($part, '<h4') || strstr($part, '<h3') || strstr($part, '<h2') || strstr($part, '<h1'))
{
	$headline = true;
}
if (!empty($headline) && strstr($part, '</h4') || strstr($part, '</h3') || strstr($part, '</h2') || strstr($part, '</h1'))
{
	$headline = false;
}
further down there is a passage like this:

Code: Select all

if (!($part{0} == '<' && $parts[$index + 1]{0} == '>') &&
!($part{0} == '[' && $parts[$index + 1]{0} == ']') &&
empty($img) && empty($code) && empty($alink) && empty($ulink) && empty($script))
change it to this (add "&& empty($headline)"):

Code: Select all

if (!($part{0} == '<' && $parts[$index + 1]{0} == '>') &&
!($part{0} == '[' && $parts[$index + 1]{0} == ']') &&
empty($img) && empty($code) && empty($alink) && empty($ulink) && empty($headline) && empty($script))

@pierredu looks like you try to not replace inside code-tags, which does not work (for me). Replace [ with <
// Code
if (strstr($part, '[code'))
{
$code = true;
}
if (!empty($code) && strstr($part, '[/code'))
{
$code = false;
}

Re: [3.1][3.2][RC] Autolinks 1.2.5

Posted: Sat Aug 03, 2019 10:03 am
by pierredu
I'll look at this when I'm back from holidays.

Re: [3.1][3.2][RC] Autolinks 1.2.5

Posted: Tue Aug 13, 2019 10:44 am
by pierredu
Your code should work.

Re: [3.1][3.2][RC] Autolinks 1.2.5

Posted: Sat Sep 21, 2019 7:28 am
by lixxbox
In your github repository you made this change also for the img-tag, which breaks your extension for everything that comes after an image. The image bbcode does not create an html-end-tag, but your code expects one.

I‘m not really sure if a rule for an img-tag is needed.

Re: [3.1][3.2][RC] Autolinks 1.2.7

Posted: Tue Sep 24, 2019 6:51 am
by pierredu
Thanks for pointing this problem.
I don't have the time now to test it really, but I commented those lines out.
The repo was updated.

Re: [3.1][3.2][RC] Autolinks 1.2.7

Posted: Thu Dec 26, 2019 4:23 pm
by thecas

Code: Select all

Fatal error: Call to a member function add_lang() on null in /home/mhd-01/www.wisp-forum.it/htdocs/ext/lmdi/autolinks/acp/autolinks_module.php on line 23
This in a new italian installation trying to access to the settings.
Thank you.

Re: [3.1][3.2][RC] Autolinks 1.2.7

Posted: Thu Dec 26, 2019 4:34 pm
by thecas

Code: Select all

<?php
/**
 *
 * @package	Extension Autolink [Italian] (from Emanuele Ing Benatti)
 * @author	Máté Bartus <bartus.mate@root.hu>
 * @author	Pierre Duhem <pierre@duhem.com>
 * @version	$Id: info_acp_autolink.php 46 2010-07-20 14:14:53Z CHItA $
 *
 **/

if (!defined('IN_PHPBB'))
{
	exit;
}

if (empty($lang) || !is_array($lang))
{
	$lang = array();
}
$lang = array_merge($lang, array(

	// Menu text and titles
	'ACP_AUTOLINKS_TITLE'			=> 'Amministrazione Autolink',
	'AUTOLINK_ADD_A_NEW_WORD'		=> 'Aggiungi nuovo Autolink',
	'RECURS_FEATURE'				=> 'Previeni sostituzione ricorsivi ',
	'RECURS_FEATURE_EXPLAIN'			=> 'Se l\'URL contiene il termine da sostituire, c\'è il rischio di una sostituzione ricorsiva con conseguente possibile malfunzionamento del link. Questa opzione elimina questa possibilità ma con un pattern matching esatto in caso di possibile sostituzione ricorsiva.',
	'TERM_ADDITION'				=> 'Aggiungi un nuovo termine',
	'TERM_ADDITION_EXPLAIN'			=> 'Questa opzione mostra un form per creare un nuovo termine.',
	'AL_FORUM_SELECTION'			=> 'Seleziona forum',
	'AL_NOSHOW_LIST'				=> 'Abilita autolinks',
	'LEGEND_ADD_TERM'				=> 'Gestione Parole',


	// Main form's words
	'ACP_AUTOLINKS_CONFIG'			=> 'Configurazione Autolink',

	'ACP_AUTOLINK_WORDS'			=> 'Gestione termini',
	'ACP_AUTOLINK_WORD'				=> 'Termini',
	'ACP_AUTOLINK_WORD_NOTE'			=> 'Qui puoi impostare la parola da sostituire al link. L\'estensione non &egrave; case sensitive.',
	'ACP_AUTOLINK_URL'				=> 'URL',
	'ACP_AUTOLINK_URL_NOTE'			=> 'Qui puoi impostare l\'URL per la parola scelta.',

	// Logs
	'LOG_AUTOLINK_WORD_ADDED'		=> 'La parola (%s) è stata correttamente aggiunta al database Autolink!',
	'LOG_AUTOLINK_WORD_EDIT'			=> 'I dettagli della parola “%s” sono stati aggiornati al database Autolink!!',
	'LOG_AUTOLIMK_WORD_DELETE'		=> '“%s” è stata rimossa dal database Autolink!',
	'LOG_AUTOLINK_CONFIG_UPDATED'		=> 'Le impostazioni di Autolink sono state aggiornate!',

	// ACP table heading words
	'AUTOLINK_NAME'				=> 'Keyword',
	'AUTOLINK_URL'					=> 'URL',
	'AUTOLINK_BLANK'				=> 'Usa il tag target=\'_blank\' per i links',
	'AUTOLINK_BLANK_EXPLAIN'			=> 'Spunta questo checkbox se vuoi aprire il link in una nuova finestra.',

	// Error messages
	'AUTOLINK_NOT_ADDED'			=> 'La parola non &egrave; stata aggiunta dall\'Autolink database!',
	'AUTOLINK_NOT_REMOVED'			=> 'La parola non è stata rimossa dall\' the Autolink database!',
	'AUTOLINK_NOT_UPDATED'			=> 'La parola non è stata aggiornata nell\'Autolink database!',
	'AUTOLINK_INVALID_ID'			=> 'Prova a modificare o rimuovere la parola con ID errato',
	'AUTOLINK_DIFFERENT_SIZE_ARRAY'	=> 'The amount of the added URLs and the rates have to be equall!',
	'INVALID_FORM_KEY'				=> 'Il formato della chiave no è valido!',
	'AUTOLINK_EMPTY_WORD_FIELD'		=> 'Devi inserire la parola (termine) nel form!',
	'AUTOLINK_EMPTY_URL_FIELD'		=> 'Devi inserire l\'URL nel form!',
	'AUTOLINK_WORD_ALREADY_EXIST'		=> 'La parola esiste gi&agrave; ;)')
);
If you want to upgrade into the next version this italian translation! ;)

Re: [3.1][3.2][RC] Autolinks 1.2.7

Posted: Fri Dec 27, 2019 7:55 am
by pierredu
Thanks for the italian translation.
I'll try to have a look today or tomorrow.

Re: [3.1][3.2][RC] Autolinks 1.2.7

Posted: Fri Dec 27, 2019 9:20 am
by thecas
And check me out my error.
Thank you so much and happy new year.

Re: [3.2][RC] Autolinks 1.3.2

Posted: Fri Dec 27, 2019 9:52 am
by pierredu
I uploaded a version 1.3.2 on Github (see first post). This should cure the problem.

Re: [3.2][RC] Autolinks 1.3.2

Posted: Tue May 12, 2020 10:16 am
by dommm063
Hi,

Do you know if this extension is working with phpbb 3.3 ?

Re: [3.2][RC] Autolinks 1.3.2

Posted: Tue May 12, 2020 1:06 pm
by pierredu
There is no reason why it wouldn't work.

Re: [3.2][RC] Autolinks 1.3.2

Posted: Tue May 12, 2020 1:34 pm
by dommm063
There are some changes in code between 3.2 and 3.3, and some extensions could not work (especially with services.yml files).

If someone has already tested/implemented it on a 3.3 forum, I would appreciate any comment/remark.
If not, I will make a test.

Thanks

Re: [3.2][RC] Autolinks 1.3.2

Posted: Tue May 12, 2020 7:00 pm
by pierredu
I just checked.
Version 1.3.2 works under 3.3.x.

Re: [3.2][RC] Autolinks 1.3.2

Posted: Thu May 14, 2020 8:46 am
by dommm063
Great. Thanks a lot.