News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

where would I insert this simple code? ( Youtube for SMF)

Started by bostonb, May 05, 2010, 02:56:22 AM

Previous topic - Next topic

bostonb

.brian gave me this code in an Aeva thread that has since been locked, but I never did get an answer on what file this simple modification would go into?

it is a simple way to get Youtube function in SMF without having to install aeva or anything like that

anyone know which file he is talking about modifying when he mentions "line 997"??

thanks


If anyone needs a simple solution...

Start a new line on 997, paste this code and have your users only paste the Video ID. Sure it requires your users to have an IQ higher than 80 but at least you won't have any issues with URL's and the like.




array(
'tag' => 'youtube',
'before' => '<embed src="http://www.youtube.com/v/',
'after' => '&&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>',
),



example:



Simple, basic, does the job.[/i]


bostonb

mods, you can remove this topic if you want, I just solved the problem myself


if you want to leave the topic so it can help others, the solution is:

the above mod goes in the "subs.php" file in the sources, and it is actually a ways below line 997 (at least in smf 1.1.10) , there is a big alphabetically arranged array with all the tags, so put it in the spot at the end after the 'white' tag

Kays

You should be able to do it the same way once you upgrade to 2.0 since that hasn't changed.

Moving this to SMF coding discussion and marking it as solved.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: