News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Gryzor

New mod - descriptive links!

Started by Gryzor, 10:00, 10 March 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gryzor

Hello guys,


A new mod has been installed - Descriptive Links.
When enabled this will allow to convert links posted in topics to show the descriptive page title. This mod will also convert internal topic, page and board links to show the topic or message subject or the board name.

If a user posts a link outside of a URL tag (and optionally inside this tag), the mod will find it, look up the webpage, get its title, and replace the link with a properly structured bbc url using the found webpages title.
Thus,
[url=http://www.cpcwiki.eu]CPCWiki[/url]

will be transformed into
[url=http://www.cpcwiki.eu]Wiki's Title Here[/url]

If the page or title cannot be found, the URL in the post is not changed.

There's a new checkbox in the post options (when you're editing your post in the full editor) to turn it on or off. On by default.
Let's test it:

http://www.cpcwiki.eu
and http://www.cpcwiki.eu/forum/cpcwiki-discussion/donations-to-the-wiki


Will turn into:
CPCWiki
Donations to the wiki


I think it makes things look better now :)

PS Ygdrazil managed to Like this before I even finished editing :D Good start!
PS2 I just realised that it also parses URLs within the CODE tag. I'm trying to fix it, though it shouldn't be much of a bother... It just makes my explanation a bit less meaningful, but you get the idea.

ralferoo

I was having a few problems with this feature yesterday... Some of my links seemed to just get removed altogether.

Also, I suspect the server is downloading the entire page before parsing as when I posted a link to a zip file, it took ages for the post to submit. It might be worth limiting the download the maybe 64KB as the title is usually in the first couple of hundred bytes of a page...

Gryzor

#2
Hm, let's do a test. Maybe it was something of the moment:
Lotharek`s Lair


As far as the zip thing goes, maybe you're right, and it'd make sense. Could you give me the link?

[EDIT] yup, it works now...
[EDIT2] And, here's the link you tried yesterday, let's see...
test
Yes, it disappears if you don't enter something as a specified name!

ralferoo

#3
The zip file was the one in this post: Help with Tatung Einstein 256 joystick port

It still worked fine so it's not really a problem, I'd just hate for your bandwidth to get hosed by this feature downloading megs and megs of files unnecessarily...

Gryzor

#4
Hm, let's see how long it takes for me...
http://www.tatungeinstein.co.uk/images/hardwaremanual.zip

[EDIT] Hm, yes, it does take some time. I reported it to the developer... thanks!!!

PS I also edited your link, why was it wrong? I just pasted the target url and it was parsed just fine...

TFM

TFM wants to be installed as new mod too ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

Other projects are in line, but if you send me your brain specs I'll see if I can interface it with the forum software.

TFM

Quote from: Gryzor on 08:09, 29 March 12
Other projects are in line, but if you send me your brain specs I'll see if I can interface it with the forum software.

Tried it with the CPC already, but the Z80 was too high developped. My brain is driven mechanical (a hamster moves bone-switches and so on...). Interfacing will stay a dream  :laugh:
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Powered by SMFPacks Menu Editor Mod