I've noticed that in torrent description, html is not allowed, or parsed.
It will be much more simple to have the same engine from blog for entering description for torrents.
Like, in blogs you are allowed html code (usefull for images, links, video boxes), but on torrent description you don't have that, only images, and links.
About the links, i have the [url]...[/url] tag.. inside the tag i should write the http link and it displays the entire link... how can i use it to have the link with a chosen name, like in <a href...link> chosen name </a> ?
Blog posts: 11
Added downloads: 2 Comments: 18 Forum posts: 573
HTML is not allowed becouse users can submit downloads aswell. Allowing html would also allow for XSS attacks. I could probably work around that by not allowing HTML for ordinary users.
As for link, try it like this: [ url=http://diferior.com]Diferior[/url]
as I recall, there is a BBCode tag for youtube clips..
after asking google about it, i've found several tutorials about how to make it, but i don't know where you defined the actual bbcodes... tpl_resources/skio/scripts/post.js ?
anyway, you do I fine job i won't mess with my site, maybe i will broke something...
Blog posts: 11
Added downloads: 2 Comments: 18 Forum posts: 573
I've noticed that in torrent description, html is not allowed, or parsed.
It will be much more simple to have the same engine from blog for entering description for torrents.
Like, in blogs you are allowed html code (usefull for images, links, video boxes), but on torrent description you don't have that, only images, and links.
About the links, i have the [url]...[/url] tag.. inside the tag i should write the http link and it displays the entire link... how can i use it to have the link with a chosen name, like in <a href...link> chosen name </a> ?
Added downloads: 2
Comments: 18
Forum posts: 573
As for link, try it like this: [ url=http://diferior.com]Diferior[/url]
like, the youtube <object>
we need this, because when we submit a movie or a game, it's nicer to have a trailer/gameplay video.
Added downloads: 2
Comments: 18
Forum posts: 573
as I recall, there is a BBCode tag for youtube clips..
after asking google about it, i've found several tutorials about how to make it, but i don't know where you defined the actual bbcodes... tpl_resources/skio/scripts/post.js ?
anyway, you do I fine job
Added downloads: 2
Comments: 18
Forum posts: 573
i've found one that's working, but it needs a little cleanup
in functions/text.php
before #Url auto-replace , add:
// [youtube] and [/youtube] $txt = preg_replace("#\[youtube=([0-9]+)[,]([0-9]+)[,]([0-9a-z\-_]+)](.*?)\[/youtube]#si", "<object width=\"\\1\" height=\"\\2\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\3\"></param><embed src=\"http://www.youtube.com/v/\\3\" type=\"application/x-shockwave-flash\" width=\"\\1\" height=\"\\2\"></embed></object>"."[/youtube]", $txt); $txt = str_replace("[/youtube]", "", $txt);
it's working, but it's a mess for the user, because the syntax is like this:
[youtube=width,height,id]description[/youtube]
can you modify just to be
[youtube]full_youtube_link[/youtube]
or
[youtube]video_id[/youtube]
Added downloads: 2
Comments: 18
Forum posts: 573
// [youtube] and [/youtube] # Change these to whatever $def_width = 320; $def_height = 240; $txt = preg_replace("#\[youtube\]([0-9a-z\-_]+)\[/youtube\]#si", "<object width=\"$def_width\" height=\"$def_height\"><param name=\"movie\" value=\"http://www.youtube.com/v/\\1\"></param><embed src=\"http://www.youtube.com/v/\\1\" type=\"application/x-shockwave-flash\" width=\"$def_width\" height=\"$def_height\"></embed></object>", $txt);
Called like this: [youtube]video_id[/youtube]
He would have someone to adjust in order to enter the full URL:
[youtube]http://www.youtube.com/watch?v=ThVgvMVniwY[/ youtube]
Thank you for help
Added downloads: 2
Comments: 18
Forum posts: 573