Page 1 of 5

th23 Autolinks

Posted: Fri Aug 01, 2008 1:57 am
by Extensions Robot
Modification name: th23 Autolinks
Author: th23
Modification description: This modification enables you to specify key words and a related URL for each one. Whenever these words are used in a posting, your specified link is automatically included.
Modification version: 1.2.4
Tested on phpBB version: 3.0.2

Download file: th23_autolinks_1_2_4.zip
File size: 44.66 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--

th23 Autolinks

Posted: Fri Aug 01, 2008 1:57 am
by A_Jelly_Doughnut
Modification validated/released

Notes:

th23 Autolinks

Posted: Fri Aug 01, 2008 1:57 am
by th23
Many thanks for the validation :)

Re: th23 Autolinks

Posted: Tue Aug 05, 2008 5:49 pm
by Doctor Love
This is the perfect MOD for my forum, except for one thing; the links aren't underlined, and I use non-standard link colors. Is this a LINK setting situation on my part or can you modify the MOD to underline the links?

Thank you in advance !

Re: th23 Autolinks

Posted: Tue Aug 05, 2008 5:52 pm
by SAFFLEUR
Doctor Love wrote:This is the perfect MOD for my forum, except for one thing; the links aren't underlined, and I use non-standard link colors. Is this a LINK setting situation on my part or can you modify the MOD to underline the links?

Thank you in advance !
There is a css file for the auto links, should be able to change it there.

Re: th23 Autolinks

Posted: Tue Aug 05, 2008 8:06 pm
by Pleex
I had an error after installing that the db th23_autolinks wasn't found. I added the columns manually and now it works just fine.

Re: th23 Autolinks

Posted: Tue Aug 05, 2008 8:53 pm
by Doctor Love
SAFFLEUR wrote:
There is a css file for the auto links, should be able to change it there.
I tried changing "text decoration" from "none" to "underline" in the autolink css file and it didn't work, but changing "links.css" as follows did work:

/* proSilver Link Styles
---------------------------------------- */

a:link { color: #898989; text-decoration: underline; }
a:visited { color: #898989; text-decoration: none; }
a:hover { color: #d3d3d3; text-decoration: underline; }
a:active { color: #d2d2d2; text-decoration: underline; }

Re: th23 Autolinks

Posted: Tue Aug 05, 2008 9:11 pm
by Metzle
Hi,

great Mod! Installation very easy and it works fine.

If there's an interest of having a german translation, take a look here at MetziMods.

Edit:

I had to notice that there's a problem with one of my selfcreated BBCodes.

Code: Select all

BBCode:
[mail={EMAIL}]{TEXT}[/mail]

HTML:
<a href="mailto:{EMAIL}">{TEXT}</a>
Everytime there's used a word in an e-mailadress, which is also used by the Mod as autolink word, i can't use the BBCode because the Mod links the word in the e-mailadress.

Anybody knows a solution for this problem?

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 3:33 pm
by mrshermanoaks
Nice job - great mod.

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 4:14 pm
by Doctor Love
Everytime there's used a word in an e-mailadress, which is also used by the Mod as autolink word, i can't use the BBCode because the Mod links the word in the e-mailadress.

Anybody knows a solution for this problem?
Yes, th23 will have to fix it, but you could ease the problem by using short phrases instead of single words in your autolink list.

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 4:56 pm
by Metzle
Great solution to fix it ;)

Then I'll be waiting for the fix and ease the problem with short phrases till it will be fixed ;)

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 5:34 pm
by th23
Doctor Love wrote:Yes, th23 will have to fix it...
Guys, I am sorry to say...but it's not easy / possible to fix that behaviour for custom BB Codes as it fully depends on the BB Code / involved variables / involved HTMl replacement / etc. in which order the replacements are done.

Whenever there are custom BB Codes involved I am afraid, but you will have to manually edit the "includes/th23_autolinks.php" file and add the custom BB Code at the respective position :geek:

@Metzle: For your specific custom BB Code have a look onto where the URL BB Code is handled... that should be the similar locations...

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 6:20 pm
by Metzle
th23 wrote: @Metzle: For your specific custom BB Code have a look onto where the URL BB Code is handled... that should be the similar locations...
Hi,

great! I've fixed it.

Open: includes/th23_autolinks.php

Find:

Code: Select all

'/\[attachment.*?:' . $th23_autolinks_uid . '\].*?\[\/attachment:' . $th23_autolinks_uid . '\]/i',
After-Add:

Code: Select all

'/\[mail.*?:' . $th23_autolinks_uid . '\].*?\[\/mail:' . $th23_autolinks_uid . '\]/i',
Thx to you, th23 :)

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 8:58 pm
by prophetUK
I get the following error when trying to activate this via the module in ACP:

Code: Select all

SQL ERROR [ mysqli ]

Duplicate entry 'th23_autolinks_forum_ids' for key 1 [1062]

SQL

INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('th23_autolinks_forum_ids', '-', 0)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/functions.php
LINE: 156
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_th23_autolinks.php
LINE: 388
CALL: set_config()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_th23_autolinks->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
Any ideas? I entered the SQL query as instructed using PHPMyAdmin. Not had problems executing SQL before...

Re: th23 Autolinks

Posted: Thu Aug 07, 2008 9:07 pm
by th23
prophetUK wrote:I get the following error...
Any ideas?
Just purge the cache and you're fine :)