Page 2 of 5

Re: [BETA] Local URL To Text

Posted: Sun Dec 28, 2014 2:04 pm
by ___Martin
Updated to version Beta2. Since I changed the vendor and package name to all lowercase, unfortunately you have to reinstall the extension.

Please follow these steps if you already have installed the previous version:
  1. Note your settings in the ACP on the Extensions > Local URL To Text > Settings page.
  2. Disable the extension in the ACP on the Customise > Manage Extensions page.
  3. Delete data for the extension on the same page.
  4. Delete the folder /ext/Martin/LocalUrlToText and all contained files.
  5. Delete the folder /ext/Martin (should be empty since this is my first extension).
  6. Create new folders /ext/martin/localurltotext (all lowercase!).
  7. Download the extension from the repository and unpack it to this folder.
  8. Enable the extension on the Customise > Manage Extensions page.
  9. On the Extensions > Local URL To Text > Settings page, fill in your noted values from step 1.
M.Gaetan89 wrote:When replacing a link to a user profile, would it be possible to colorized the link with the user's group color?
Thanks, I will consider adding this feature. It is possible to use HTML code like <span style="color: red;">{USER_NAME}</span> as a text replacement for user profile links, but the group color is not currently available. I will look into implementing it.

Schtorsch wrote:EDIT: Seems to be an extension for external links. Disabled -> now the mod works fine. :)
I have to search a better mod for external links...
Thank you for the feedback. I plan to release another extension that opens external links in new browser windows, perhaps you would like to check that extension when I release it. :)

Re: [BETA] Local URL To Text

Posted: Sun Dec 28, 2014 2:05 pm
by HiFiKabin
Schtorsch wrote:Hm, I tested the extension and get the correct result at my first post.
From the second post it doesn´t work for me. At preview it looks correct - but if I send the posting the link is the URL and not the topic title...

Whats going wrong?

EDIT: Seems to be an extension for external links. Disabled -> now the mod works fine. :)
I have to search a better mod for external links...
I am using it with ELONW enabled without a problem

Image
image post

Re: [BETA] Local URL To Text

Posted: Sun Dec 28, 2014 5:10 pm
by Schtorsch
ELONW is okay - but that mod opens my lightbox-links also in new tabs...
But I don´t want that. So I use only the mod "External Links" - and it works for now.

Re: [BETA] Local URL To Text

Posted: Sun Dec 28, 2014 5:25 pm
by Nully
___Martin wrote:
Nully wrote:Is it different from Convert Local Url To Link Name?
viewtopic.php?f=456&t=2277841
Yes. HAMMER663's extension converts the local URL links when submitting a message to the database, e.g. when posting a reply, so the posting of the member is modified. My extension does not alter the messages, but rather replaces the local URL links when viewing the message.

This implies that while HAMMER663's extension is called only once when submitting messages, my extension is called for every view of a message. To reduce the load, my extension tries to minimize database queries.

This also implies that the link texts that HAMMER663's extension creates could be out of date. Imagine a topic that someone posts a link to, but then a while later the topic is renamed. The link texts of HAMMER663's extension will still contain the old topic title, while the link texts of my extension will display the new title.

Another difference would be that in the current version of HAMMER663's extension you (as board admin) are not able to customize the way the text links are created.
Thank you for your good explanation.

Re: [BETA] Local URL To Text

Posted: Sun Dec 28, 2014 6:19 pm
by Wolfsblvt
This extension sound very good. I had something similar installed for 3.0.x and wanted it back for 3.1.x, but the other extension didn't provided what I needed.

So I'll try this soon, great so see that someone had done this (:

Re: [BETA] Local URL To Text

Posted: Tue Dec 30, 2014 10:59 pm
by ___Martin
New version 1.0.0-beta3 released. As I changed the version numbering scheme and the migration file, please reinstall the extension as described here: viewtopic.php?p=13866056#p13866056
M.Gaetan89 wrote:Nice extension!
When replacing a link to a user profile, would it be possible to colorized the link with the user's group color?
Implented - added a new replacement {USER_COLOUR} for member profile links and for post links.
This is filled with the user colour (in hexadecimal, like #AA0000) if the user has a special colour, otherwise with inherit.
You can use this example for member profile links: <span style="color: {USER_COLOUR}">{USER_NAME}</span>

Also implented a version check, and did some small fixes.

Re: [BETA] Local URL To Text

Posted: Wed Dec 31, 2014 12:38 am
by Volksdevil
Ah this looks great, but It's a shame it won't work when External Links - URL Manager viewtopic.php?f=456&t=2270671 is installed.

Edit: If I remove the classes from the extension I linked to, and hard code them into the phpBB css then all is well :D Seems to work great so far, good work!

Re: [BETA] Local URL To Text

Posted: Wed Dec 31, 2014 10:15 am
by draky
Very nice :)

Small suggestion : grabe <title> from external links to display text instead of URL :) so it will always provide links with title of target, inside or outside forum ;)

Re: [BETA] Local URL To Text

Posted: Wed Dec 31, 2014 10:21 am
by ___Martin
Volksdevil wrote:Ah this looks great, but It's a shame it won't work when External Links - URL Manager viewtopic.php?f=456&t=2270671 is installed.

Edit: If I remove the classes from the extension I linked to, and hard code them into the phpBB css then all is well :D Seems to work great so far, good work!
Thanks for bringing this to my attention. I will have a look at the linked extension and see if I can modify Local URL To Text to work with External Links - URL Manager "out of the box".
draky wrote:Very nice :)

Small suggestion : grabe <title> from external links to display text instead of URL :) so it will always provide links with title of target, inside or outside forum ;)
Hmm.. For this to achieve, the extension had to fetch the linked URL and try to parse it and find a <title> within the fetched resource.
Sorry, this is out of scope of this extension. Besides that I see security problems with an extension automatically trying to fetch external URLs that users post - this could be exploited e.g. for banner ad click fraud.

Re: [BETA] Local URL To Text

Posted: Wed Dec 31, 2014 10:36 am
by M.Gaetan89
___Martin wrote:Implented - added a new replacement {USER_COLOUR} for member profile links and for post links.
This is filled with the user colour (in hexadecimal, like #AA0000) if the user has a special colour, otherwise with inherit.
You can use this example for member profile links: <span style="color: {USER_COLOUR}">{USER_NAME}</span>

Also implented a version check, and did some small fixes.
Great, thank you!

In case someone is looking for the correct style for the colored username, use this:

Code: Select all

<span class="username-coloured" style="color: {USER_COLOUR};">{USER_NAME}</span>

Re: [BETA] Local URL To Text

Posted: Sun Feb 22, 2015 6:10 pm
by Kharaz
I remember using something similiar in my old phpBB 3.0 board, so it's nice being able to use it again. Nevertheless I have one little problem with your extension. :?

Would it be possible to make it work for the profile fields in "viewtopic" too? I'm managing a Pen-and-Paper board where users can put the url to their character-topic in a custom profile field and it would be awesome, if the url would be something like "character xyz" instead of "viewtopic.php?f=11&p=1329". :oops:

Image <--- Image

Re: [BETA] Local URL To Text

Posted: Mon Feb 23, 2015 8:56 am
by FomenkoAndrey
Ah this looks great, but It's a shame it won't work when External Links - URL Manager viewtopic.php?f=456&t=2270671 is installed.
the same ext http://www.phpbbguru.net/community/topic42372.html stable and it works perfect with viewtopic.php?f=456&t=2270671

Re: [BETA] Local URL To Text

Posted: Tue Mar 03, 2015 4:07 pm
by Galixte de EzCom
Hi,

here the French language pack.

Re: [BETA] Local URL To Text

Posted: Sat Apr 04, 2015 6:34 pm
by koraldon
Great extension
Just one request - can you update to include automatic version check, per https://wiki.phpbb.com/Extension_meta_data
Thanks :)

Re: [BETA] Local URL To Text

Posted: Thu May 21, 2015 7:53 am
by MelcomB56
Hi There,

realy great extension! I love it !

Any question, is there an extension which makes the same with external links ?

Greetings

Melcom