[ABD] th23 Autolinks - v1.2.0

Any abandoned MODs will be moved to this forum.

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

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

[ABD] th23 Autolinks - v1.2.0

Post by th23 » Fri Mar 21, 2008 6:02 pm

Description:
Predefined words / phrases used in postings / private messages (PMs) are automatically linked to a specified URL.

Note:
Performance heavily relies on the number of autolinks to be done in active topic / shown posts, not on the number of phrases described to be linked, e.g.
  • ~0.135s (10 links in DB - 5 replacements done)
  • ~0.145s (2000 links in DB - 5 replacements done)
  • ~5.436s (2000 links in DB - 2000 replacements done)
Bugs / ToDos:
n/a

Tokens:
th23 start - autolinks
th23 end - autolinks

Files (Function/Frontend):
common.php [Change]
posting.php [Change]
viewtopic.php [Change]
includes/cache.php [Change]
includes/constants.php [Change]
includes/message_parser.php [Change]
includes/th23_autolinks.php [Add]
includes/ucp/ucp_pm_compose.php [Change]
includes/ucp/ucp_pm_viewmessage.php [Change]
styles/prosilver/theme/stylesheet.css [Change]
styles/prosilver/theme/th23_autolinks.css [Add]

Files (ACP):
adm/style/acp_th23_autolinks.html [Add]
includes/acp/acp_th23_autolinks.php [Add]
includes/acp/info/th23_autolinks.php [Add]
language/en/acp/common.php [Change]
language/en/acp/th23_autolinks.php [Add]

Files (subsilver2 - No Support!):
styles/subsilver2/theme/stylesheet.css [Change]

Config Entries:
th23_autolinks [Add] (0 = not activated / 1 = activated)
th23_autolinks_posts [Add] (show autolinks in posts: 0 = no / 1 = yes)
th23_autolinks_forum [Add] (activate / deny autolinks in specified forums: 1 = everywhere / 2 = allow / 3 = deny)
th23_autolinks_forum_ids [Add] (string containing allowed / denied forum ids)
th23_autolinks_pms [Add] (show autolinks in pms: 0 = no / 1 = yes)
th23_autolinks_preview [Add] (show autolinks in preview: 0 = no / 1 = yes)
th23_autolinks_code [Add] (show autolinks within code bbcode tags: 0 = no / 1 = yes)
th23_autolinks_user [Add] (autolink user names: 0 = no / 1 = yes)
th23_autolinks_user_expire [Add] (seconds for user name caching to expire)
th23_autolinks_title [Add] (text)
th23_autolinks_css [Add] (text)

Database:
[prefix]_th23_autolinks [Add Table]
id (mediumint(8)) [Add Field]
text (varchar(255)) [Add Field]
url (varchar(255)) [Add Field]
sort (mediumint(8)) [Add Field]

Status:
v1.2.0

Download available HERE

---

Change log:
  • Updates since version 1.0.5 (downloaded 18 times):
    • [New feature] Using cache functionality of phpBB to reduce query load
    • [New feature] Introduce option to replace words in other occurances, e.g. private messages (PMs) and preview (excluding message history)
    • [New feature] Possibility to choose BBCodes that should be excluded from replacement, e.g. no replacement / insert of links within "code" [suggestion provided by ecwpa]
    • [New feature] Option to specify certain forums, that the replacements should be done / or should be excluded (both ways possible) [suggestion provided by kevinroxx]
    • [New feature] Sorting of search phrases in the backend to be able to influence order of replacement
    • [New feature] Automatically links user names to profiles [suggestion provided by Spaniel]
    • [New feature] Special handling of local links, e.g. session handling
    • [New feature] Remove check for validity of autolink URL in backend (enables easy handling of local links / administrators should know how to enter a valid URL)
    • [New feature] Text to be autolinked allows now "<", ">", "[", "]" and "/" characters
    • [New feature] Clean up ACP pages - add structure, streamline detailed descriptions / notes / hints
    • [Bug fix] Text to be autolinked is not allow to be a single white-spaces anymore (" "), it is still allowed within a phrase, e.g. "to be linked"
  • Updates since version 1.0.4 (downloaded 1 time):
    • [New feature] Full UTF-8 support
    • [New feature] Added subsilver2 support
  • Updates since version 1.0.3 (downloaded 14 times):
    • [Bug fix] Corrected MOD packaging issues and SQL syntax
  • Updates since version 1.0.2 (downloaded 0 times):
    • [Bug fix] Very minor change in the install XML (messed up tags)
  • Updates since version 1.0.1 (downloaded 23 times):
    • [Bug fix] Minor changes for compliance with coding guidelines / XML structure
  • Updates since version 1.0.0 (downloaded 4 times):
    • [Bug fix] Change in the XML documentation / license
---

Comments most welcome :)
Last edited by th23 on Fri Apr 25, 2008 9:34 am, edited 9 times in total.
Life is what happens...while you're busy making other plans!

mdvaldosta
Registered User
Posts: 353
Joined: Sat Mar 26, 2005 12:26 am
Contact:

Re: [DEV] th23 Autolinks

Post by mdvaldosta » Fri Mar 21, 2008 6:05 pm

Way, way, way cool. Looking foward to this.

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [DEV] th23 Autolinks

Post by ecwpa » Fri Mar 21, 2008 11:06 pm

wonderful, just what i was looking for long time ago!

seems like it convert in some times text to urls inside code bbcode

i should add

desc (varchar(255)) [Add Field]

as a description to the url, for the alt="{text}" part of it

and maybe a class atribute for class="{text}" so you can have a custome css for that url!
carefull, not english speaker native here

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: [DEV] th23 Autolinks

Post by th23 » Sat Mar 22, 2008 7:56 am

ecwpa wrote: seems like it convert in some times text to urls inside code bbcode
Not sure I understand your comment...from my perspective it should convert words within (some) bbcodes. For sure not within URL, IMG as it would ruin the links already in there. Or do you mean something else?
ecwpa wrote: desc (varchar(255)) [Add Field] as a description to the url, for the alt="{text}" part of it
and maybe a class atribute for class="{text}" so you can have a custome css for that url!
Both options are there, but not on a per link basis...do you need to customize each and every link via CSS? Or does that fit your needs?

Cheers
th23
Life is what happens...while you're busy making other plans!

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: [DEV] th23 Autolinks

Post by th23 » Sat Mar 22, 2008 9:43 am

mdvaldosta wrote:Looking foward to this.
I might have a RC ready sometime this weekend...backend is key for that - and its making progress :) See screenshot below for some backend feeling...
Image
Life is what happens...while you're busy making other plans!

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [DEV] th23 Autolinks

Post by ecwpa » Sat Mar 22, 2008 4:35 pm

sorry, im not that good in english yet :P

i meant the [code] bbcode, check the test post i made in your site

about the css class, i meant that you can choose the class for every autolink, in example:

autolink: hardware - link: mysite.com/hardware - class: green
autolink: software - link: mysite.com/hardware - class: blue
autolink: phpbb - link: mysite.com/hardware - class: blue
autolink: mirc - link: mysite.com/hardware - class: blue
autolink: hard drives - link: mysite.com/hardware - class: green

with that you can have customize css for every link, i would use 2 or 3, maybe more


also it would be good to disable autolinks in certain post, like disabling bbcodes, smilies, etc
carefull, not english speaker native here

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

[RC] th23 Autolinks - RC released

Post by th23 » Sun Mar 23, 2008 3:30 pm

Find a link to a RC in the first posting :)

Looking forward to your comments...
Life is what happens...while you're busy making other plans!

User avatar
Ruyan Ve
Registered User
Posts: 41
Joined: Thu Dec 20, 2007 3:15 am
Location: Germany

Re: [RC] th23 Autolinks

Post by Ruyan Ve » Sun Mar 23, 2008 4:37 pm

geil

Gonna give it a try! Thank you! :)
Man is the cruelest animal.

kevinroxx
Registered User
Posts: 94
Joined: Fri Dec 14, 2007 9:57 pm

Re: [RC] th23 Autolinks

Post by kevinroxx » Sun Mar 23, 2008 5:23 pm

Sounds pretty interesting. Is it possible you could add the following option to specify which forums these links will occur in?

For example, if I have two forum topic categories called "Submit" and "Help", can I only allow the links to appear in the postings of the Submit catorgory or vice versa. So basically each forum category will have the option yes/no to allow auto links in the postings.
I will try and install this mod a little later on today,
Thank you and Happy Easter

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: [RC] th23 Autolinks

Post by th23 » Mon Mar 24, 2008 8:31 am

kevinroxx wrote:Is it possible you could add the following option to specify which forums these links will occur in?
Right now this is not possible/planned. I will put it on the feature request list for later... If, it would reauire some more changes...
Life is what happens...while you're busy making other plans!

dreamer2007
Registered User
Posts: 42
Joined: Sat Jul 21, 2007 10:52 am

Re: [RC] th23 Autolinks

Post by dreamer2007 » Mon Mar 24, 2008 7:16 pm

Hi, thanks, but i have this error :

when i activate the mod (th23 Autolinks - Settings -> activé ) i have this error page :

Code: Select all

Erreur générale
SQL ERROR [ mysql4 ]

Duplicate entry 'th23_autolinks' for key 1 [1062]

SQL

INSERT INTO phpbb4_config (config_name, config_value, is_dynamic) VALUES ('th23_autolinks', 1, 0)

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal_mysql->sql_error()

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

FILE: includes/acp/acp_th23_autolinks.php
LINE: 276
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()
Last edited by dreamer2007 on Mon Mar 24, 2008 8:24 pm, edited 1 time in total.

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: [RC] th23 Autolinks

Post by th23 » Mon Mar 24, 2008 7:41 pm

dreamer2007 wrote:...when i activate the mod (th23 Autolinks - Settings -> activé ) i have this error page :

Code: Select all

...
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('th23_autolinks', 1, 0)
...
FILE: includes/acp/acp_th23_autolinks.php
LINE: 276
CALL: set_config()
Strage... that script is not even taking care of inserting those value. Have you inserted the "th23_autolinks" value manually before?

If so, please delete it (e.g. via phpmyadmin) manually and try enabling the module again...
Life is what happens...while you're busy making other plans!

dreamer2007
Registered User
Posts: 42
Joined: Sat Jul 21, 2007 10:52 am

Re: [RC] th23 Autolinks

Post by dreamer2007 » Mon Mar 24, 2008 8:24 pm

Strage... that script is not even taking care of inserting those value. Have you inserted the "th23_autolinks" value manually before?

If so, please delete it (e.g. via phpmyadmin) manually and try enabling the module again...
Euh ... perhaps ! i try to delete it using phpmyadmin but i can not ! :? i have this screeshot

Image

User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: [RC] th23 Autolinks

Post by th23 » Wed Mar 26, 2008 9:44 am

If you have access to phpmyadmin there should be a option to delete the line with the respective entry ("x" before the line).

Unfortunately, I could not reproduce the error... Anybody else expecting that behaviour?
Life is what happens...while you're busy making other plans!

Spaniel
Registered User
Posts: 159
Joined: Sun Dec 30, 2007 3:51 am

Re: [RC] th23 Autolinks

Post by Spaniel » Sat Mar 29, 2008 7:34 am

This is a pretty fantastic Mod. I've always found such a feature very useful on all kinds of sites but never seen it on a phpBB forum... can't wait to try it out on a phpbb site.

One way I think this could be developed is if it automatically made any username posted into a message into a link to the user's profile. This would either mean adding each profile individually to the list or having an automated system.

Would such a system be possible as an add-on? :)


At the moment i have bbcode set up to do that but having to explain how bbcode works to every new member will probably get very repetitive very quickly so your Mod could really solve that issue.

Locked

Return to “[3.0.x] Abandoned MODs”