| |
Ben Account closed
Registered: Feb 2003 Posts: 163 |
User Request: HTML parser for text in trivia and the like
Just recently I tried to add a <a href=""></a> tag to a trivia text but this, I discovered, is not translated into a link to this (in this case) other scener. My request now, I reckon, simply boils down to whether the CSDb crew would like to consider implementing a (basic) HTML parser.
In the design of such a system, I can imagine you want to impose some constraints on the user, e.g. only 'internal links' to sceners, releases et cetera. So, let this not keep you from doing so :)
Thanks in advance! |
|
| |
jailbird
Registered: Dec 2001 Posts: 1578 |
Good idea indeed, how about BB code?
|
| |
Perff Administrator
Posts: 1679 |
We already have link-recognition in the forum and a few other places, meaning that if you write:
http://www.somedomain.com/path/file.html
this will automaticly be translated to an <a href...> (as you see. :) )
This could easily be added to other places like trivia etc.
But I guess we could make special CSDb-tags which would make links to internal entries. Something like:
<scener id=XXX> which will be converted to something like:
<a href="..../scener/?id=XXX>Handle-of-XXX</a>
BTW: What is BB code?? (Can't know everything. :) )
|
| |
jailbird
Registered: Dec 2001 Posts: 1578 |
Perff:
What is BB Code?
http://www.loveshack.org/forums/misc.php?s=&action=bbcode
|
| |
Ben Account closed
Registered: Feb 2003 Posts: 163 |
Quote: We already have link-recognition in the forum and a few other places, meaning that if you write:
http://www.somedomain.com/path/file.html
this will automaticly be translated to an <a href...> (as you see. :) )
This could easily be added to other places like trivia etc.
But I guess we could make special CSDb-tags which would make links to internal entries. Something like:
<scener id=XXX> which will be converted to something like:
<a href="..../scener/?id=XXX>Handle-of-XXX</a>
BTW: What is BB code?? (Can't know everything. :) )
That would be great! |
| |
Perff Administrator
Posts: 1679 |
Now you got it.
There are 4 new CSDb-tags:
<scener id="XX">
<group id="XX">
<release id="XX">
<event id="XX">
If you write a valid id instead of the XX it will be translated into a link to the current entry in CSDb with it's name as the link. If the id is not valid it will just be displayed as above.
The "'s are optional.
This should work both in the forum, in PM's and other places. If you find a spot where you think it should work, but dosn't just post about it.
There might be bugs in the parsing/converting code still. If this is the case just let me know. :)
(You can also read about this new feature in the help section: http://noname.c64.org/csdb/help.php)
/Perff
CSDb maintainer. |
| |
jailbird
Registered: Dec 2001 Posts: 1578 |
Perff, it would be nice to add a parser for forums as well:
i.e. <forum id="XX">
|