CPCWiki forum

General Category => CPCWiki Discussion => Topic started by: Gryzor on 10:00, 10 March 12

Title: New mod - descriptive links!
Post by: Gryzor on 10:00, 10 March 12
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 (http://www.cpcwiki.eu)
Donations to the wiki (http://www.cpcwiki.eu/forum/cpcwiki-discussion/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.
Title: Re: New mod - descriptive links!
Post by: ralferoo on 08:06, 28 March 12
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...
Title: Re: New mod - descriptive links!
Post by: Gryzor on 08:21, 28 March 12
Hm, let's do a test. Maybe it was something of the moment:
Lotharek`s Lair (http://www.lotharek.pl/product.php?pid=18)


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 (http://www.zxsoftware.co.uk/8bitgamer/?cat=36)
Yes, it disappears if you don't enter something as a specified name!
(http://www.zxsoftware.co.uk/8bitgamer/)
Title: Re: New mod - descriptive links!
Post by: ralferoo on 10:20, 28 March 12
The zip file was the one in this post: Help with Tatung Einstein 256 joystick port (http://www.cpcwiki.eu/forum/other-retro/help-with-tatung-einstein-256-joystick-port/msg40029/#msg40029)

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...
Title: Re: New mod - descriptive links!
Post by: Gryzor on 10:33, 28 March 12
Hm, let's see how long it takes for me...
http://www.tatungeinstein.co.uk/images/hardwaremanual.zip (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...
Title: Re: New mod - descriptive links!
Post by: TFM on 16:53, 28 March 12
TFM wants to be installed as new mod too ;D
Title: Re: New mod - descriptive links!
Post by: 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.
Title: Re: New mod - descriptive links!
Post by: TFM on 22:51, 29 March 12
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:
Powered by SMFPacks Menu Editor Mod