YAFLogo

Posted by: sinbad911 - Saturday, 28 June 2008 09:51:12
how to create a new bbcode such as [audio][/audio] or [video][/video] to play a media file (*.mp3,*.wma, *.avi, *.wmv) i want to post media file on my forum to view online, can u help me:?:

Posted by: jhawley - Monday, 30 June 2008 17:16:13
The code to add a bbcode is the easy part.The hard part is knowing what the HTML code is that the bbcode translates into. Do you know what the HTML is to add the file types your looking for? If so, post it here.

Posted by: sinbad911 - Monday, 30 June 2008 18:19:46
this code for mp3, wma files: [quote] [/quote] this code for avi, wmv files: [quote] [/quote] width and height can optional (as [[b]img[/b]][/[b]img[/b]] tag)

Posted by: jhawley - Tuesday, 1 July 2008 13:43:01
Please note: I changed the tag names to [mp3wma] and [aviwmv] because there are a ton of video/audio formats, and this will probably not work for all of them(quicktime and realaudio come to mind). You need to edit the bbcode.cs file, add the following code, recompile it, then copy the new binarys onto your web server. This goes around line 84 (just before the line with "r_youtube" ) : [code] static private Regex r_mp3wma = new Regex(@"\[mp3wma\](?(.*?))\[/mp3wma\]", m_options); static private Regex r_aviwmv = new Regex(@"\[aviwmv\](?(.*?))\[/aviwmv\]", m_options); [/code] This goes around line 187 (just before "// youtube" ) : [code] // mp3wma NestedReplace(ref bbcode, r_mp3wma, "
", new string[] { "inner" }); // aviwmv NestedReplace(ref bbcode, r_aviwmv, "
", new string[] { "inner" }); [/code]

Posted by: jhawley - Tuesday, 1 July 2008 14:24:15
Oh one more thing.. when using these, it would be best to provide a full url to the file, not just the filename like the one you listed in the sample code. something like: [code][mp3wma]http://www.somewebserver.com/media/music.mp3[/mp3wma][/code]

Posted by: trigun - Thursday, 24 July 2008 15:38:38
Hi, I can't open the solution/project in Visual Studio 2005. Is there a particular version that I should use to recompile the project for the newly added bbcodes? One more thing is that how can I display the [BB/] icon beside the other tools? In my forum, I can use the tags [youtube] [/youtube] to embed youtube videos on posts but I type it manually because the [BB/] button is not visible. [url=www.itchytech.com]www.itchytech.com[/url] Please help. Thanks in advance....

Posted by: Jaben - Thursday, 24 July 2008 16:07:32
All these features are in the new version of YAF.

Posted by: continienzo - Friday, 25 July 2008 04:55:37
[quote=Jaben]All these features are in the new version of YAF.[/quote] I still can't see the [bb/] button in the 1.9.3 beta released... Even if I update the forum with the repository version :(

Posted by: juju - Tuesday, 24 November 2009 23:45:56
Very newbie here. Is there a way to hide/disable click on the spoiler bbcode if the user is not authenticated? Thanks all.

Posted by: NELSON Bahe - Wednesday, 13 January 2010 05:39:49
are bbcodes used in these kind or media files or embed codes?

Posted by: johncocyan09 - Sunday, 24 January 2010 16:19:06
BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: To make a piece of text bold enclose it in [b][/b], e.g. [b]Hello[/b] will become Hello For underlining use [u][/u], for example: [u]Good Morning[/u] becomes Good Morning To italicise text use [i][/i], e.g. This is [i]Great![/i] would give This is Great!