Screencast BBCode from PhpBB

Started by PML100, March 20, 2014, 07:53:25 AM

Previous topic - Next topic

PML100

I have successfully converted my PhpBB forum onto an SMF forum.

But one of the main things that I can't replicate is being able to embed Screencast videos into the forum which I achieved on my PhpBB forum via a custom BBCode.

This was the BBCode I used:

[SCT]{TEXT}[/SCT]

The HTML 'replacement':

<iframe class="tscplayer_inline embeddedObject" name="tsc_player" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="{TEXT}" height="480" width="640" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

It doesn't appear you can create custom BBCodes in the same way on SMF and after a search I couldn't find a mod that achieved this (either being able to create a custom BBCode or directly embed a Screencast video).

Would appreciate any help in this regard.


margarett

What do you usually add as {TEXT} there? I assume a custom BBC with the same content should be able to work.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PML100

Quote from: margarett on March 20, 2014, 08:48:13 AM
What do you usually add as {TEXT} there? I assume a custom BBC with the same content should be able to work.

It's just the specific video http link specified by Screencast i.e. unique for each video. An example being (with some changes for privacy etc):

http://www.screencast.com/users/xxxx/39eaebfb-7f66-48e5-b23a-9992afdfdd/embed

margarett

And a custom BBC can't handle that? I think it should be able to...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PML100

Quote from: margarett on March 20, 2014, 09:04:08 AM
And a custom BBC can't handle that? I think it should be able to...

I'm new to SMF and I couldn't find a way you could create custom BBCodes like you can in PhpBB i.e. this is how I would do it in PhpBB?


margarett

Unfortunately there isn't such a tool in SMF. You have to do it in code, really.

Something like:
Sources/Subs.php, find:

array(
'tag' => 'u',
'before' => '<span class="bbc_u">',
'after' => '</span>',
         ),

Add after:

array(
'tag' => 'sct',
'type' => 'unparsed_content',
'before' => '<iframe class="tscplayer_inline embeddedObject" name="tsc_player" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="',
'after' => '" height="480" width="640" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',
),

Warning: highly untested :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PML100

Quote from: margarett on March 20, 2014, 10:10:19 AM
Unfortunately there isn't such a tool in SMF. You have to do it in code, really.

Something like:
Sources/Subs.php, find:

array(
'tag' => 'u',
'before' => '<span class="bbc_u">',
'after' => '</span>',
         ),

Add after:

array(
'tag' => 'sct',
'type' => 'unparsed_content',
'before' => '<iframe class="tscplayer_inline embeddedObject" name="tsc_player" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="',
'after' => '" height="480" width="640" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',
),

Warning: highly untested :P

Thanks, tested and I just get a blank screen when I use the BBCode.

Many thanks for trying to help though.

margarett

Something I did wrong, of course :P

Can you please PM me a valid screencast link so that I can test it?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

margarett

Here ya go:

array(
'tag' => 'sct',
'type' => 'unparsed_content',
'content' => '<div style="text-align:center;margin:auto;padding:5px;">&nbsp;
<iframe name="tsc_player" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="$1" height="400" width="640" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>',
'block_level' => true,
),


This should allow you to have your previous videos embedded. Some notes:
* It triggers a "post empty" error if you just post an embedded link (no idea why :P )
* Everyone can use this
* And there is no verification of user input (dangerous). But, according to your phpBB screen above, it wasn't performed also :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PML100

Quote from: margarett on March 20, 2014, 08:04:03 PM
Here ya go:

array(
'tag' => 'sct',
'type' => 'unparsed_content',
'content' => '<div style="text-align:center;margin:auto;padding:5px;">&nbsp;
<iframe name="tsc_player" scrolling="no" frameborder="0" type="text/html" style="overflow:hidden;" src="$1" height="400" width="640" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>',
'block_level' => true,
),


This should allow you to have your previous videos embedded. Some notes:
* It triggers a "post empty" error if you just post an embedded link (no idea why :P )
* Everyone can use this
* And there is no verification of user input (dangerous). But, according to your phpBB screen above, it wasn't performed also :P

Many thanks, works perfectly.  :)


Advertisement: