[Solved]Adding BBcode For Myvideo »  Show posts from    to     

Icy Phoenix


Old Support Topics - [Solved]Adding BBcode For Myvideo



Chicony [ Sat 20 Jun, 2009 00:55 ]
Post subject: [Solved]Adding BBcode For Myvideo
Hi there.

I want implementig the Codes for embedding "myvideo" "vimeo" and others.

Now in BBcodes are googlevideo, youtube, video (standard), quicktinme, in there.

How can i fix this?

Thanks


DWho [ Sat 20 Jun, 2009 11:50 ]
Post subject: Re: Adding BBcode
The best way is to open bbcode.php and look at how the other bbcode for example google video is coded then add new code for the video you need...

it is just a matter of copying the code and then replacing it with your code.... obliviously without removing code that's already there..



Chicony [ Sat 20 Jun, 2009 12:13 ]
Post subject: Re: Adding BBcode
Thanks i´ve done jet but its "only blank"...no video seen

please look here to see what i mean.

http://www.rc-freunde-schwarzwald.de/viewtopic.php?t=36&p=44#p44

Edit:

this Code changes i´ve done

includes/bbcb_mg.php

find

Code: [Hide] [Select]
'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'],


add after

Code: [Hide] [Select]
'L_BBCB_MG_MYVIDEO' => $lang['bbcb_mg_myvideo'],


find

Code: [Hide] [Select]
'L_YOUTUBE_HELP' => $lang['s_youtube_help'],


add after

Code: [Hide] [Select]
'L_MYVIDEO_HELP' => $lang['s_myvideo_help'],


includes/bbcb_mg_small.php

find

Code: [Hide] [Select]
'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'],


add after

Code: [Hide] [Select]
'L_BBCB_MG_MYVIDEO' => $lang['bbcb_mg_myvideo'],


find

Code: [Hide] [Select]
'L_YOUTUBE_HELP' => $lang['s_youtube_help'],


add after

Code: [Hide] [Select]
'L_MYVIDEO_HELP' => $lang['s_myvideo_help'],


includes/bbcode.php


find

Code: [Hide] [Select]
'youtube' => array(
'nested' => true,
'inurl' => true,
'allow_empty' => false,
),


add after

Code: [Hide] [Select]
'myvideo' => array(
'nested' => true,
'inurl' => true,
'allow_empty' => false,
),


find

Code: [Hide] [Select]
// FLASH, SWF, FLV, VIDEO, REAL, QUICK, STREAM, EMFF, YOUTUBE, GOOGLEVIDEO


add in line after YOUTUBE

Code: [Hide] [Select]
MYVIDEO,


find

Code: [Hide] [Select]
if( ($tag === 'flash') || ($tag === 'swf') || ($tag === 'flv') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag === 'emff') || ($tag === 'mp3') || ($tag === 'youtube') || ($tag === 'googlevideo') )


add in line after
Code: [Hide] [Select]
($tag === 'youtube') ||


Code: [Hide] [Select]
($tag === 'myvideo') ||


find

Code: [Hide] [Select]
elseif ($tag === 'youtube')
{
$html = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $content . '" /><embed src="http://www.youtube.com/v/' . $content . '" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br /><a href="http://youtube.com/watch?v=' . $content . '" target="_blank">Link</a><br />';
}


add after

Code: [Hide] [Select]
elseif ($tag === 'myvideo')
{
$html = '<object width="425" height="350"><param name="movie" value="http://www.myvideo.de/movie/' . $content . '" /><embed src="http://www.myvideo.de/movie/' . $content . '" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br /><a href="http://www.myvideo.de/watch/' . $content . '" target="_blank">Link</a><br />';
}


language/lang_german/bbcb_mg.js

find

Code: [Hide] [Select]
s_youtube_insert = 'Bitte YouTube Datei ID eingeben';


add after

Code: [Hide] [Select]
s_myvideo_insert = 'Bitte MyVideo Datei ID eingeben';


find

Code: [Hide] [Select]
s_youtube_help = 'YouTube Video-Datei einfügen: [youtube]YouTube ID[/youtube]';


add after

Code: [Hide] [Select]
s_myvideo_help = 'Myvideo Video-Datei einfügen: [myvideo]MyVideo ID[/myvideo]';


find

Code: [Hide] [Select]
var youtube = 0;


add after

Code: [Hide] [Select]
var myvideo = 0;


find

Code: [Hide] [Select]
'[youtube]','[/youtube]',


add after

Code: [Hide] [Select]
'[myvideo]','[/myvideo]',


find

Code: [Hide] [Select]
function BBCyoutube()
{
var FoundErrors = '';
var enterURL = prompt(s_youtube_insert, s_id_insert_tip);
if (!enterURL)
{
FoundErrors += s_id_insert_error;
}
if (FoundErrors)
{
alert(s_gen_error + FoundErrors);
return;
}
var ToAdd = "[youtube]"+enterURL+"[/youtube]";
PostWrite(ToAdd);
}


add after

Code: [Hide] [Select]
function BBCmyvideo()
{
var FoundErrors = '';
var enterURL = prompt(s_myvideo_insert, s_id_insert_tip);
if (!enterURL)
{
FoundErrors += s_id_insert_error;
}
if (FoundErrors)
{
alert(s_gen_error + FoundErrors);
return;
}
var ToAdd = "[myvideo]"+enterURL+"[/myvideo]";
PostWrite(ToAdd);
}



language/lang_german/bbcb_mg.php

find

Code: [Hide] [Select]
$lang['bbcb_mg_youtube'] = 'YouTube';


add after

Code: [Hide] [Select]
$lang['bbcb_mg_myvideo'] = 'MyVideo';


find

Code: [Hide] [Select]
$lang['s_youtube_help'] = 'YouTube Datei einfügen: [youtube]YouTube ID[/youtube]';


add after

Code: [Hide] [Select]
$lang['s_myvideo_help'] = 'MyVideo Datei einfügen: [myvideo]myvideo ID[/myvideo]';


templates/common/iconize.css

find

Code: [Hide] [Select]
a[href *="youtube.com/watch?"], a[href *="sevenload.com/videos/"], a[href *="metacafe.com/watch/"] {
padding: 5px 20px 5px 0;
background: transparent url(images/icons/icon_film.gif) no-repeat center right;
}



in line add

Code: [Hide] [Select]
a[href *="myvideo.de/watch/"],


templates/mg_themes/bbcb_mg.tpl

find

Code: [Hide] [Select]
<a href="javascript:BBCyoutube()"><img src="{BBCB_MG_IMG_PATH}youtube{BBCB_MG_IMG_EXT}" name="youtube" onMouseOver="helpline('youtube')" alt="{L_BBCB_MG_YOUTUBE}" title="{L_BBCB_MG_YOUTUBE}" class="bbimages" /></a>


add after

Code: [Hide] [Select]
<a href="javascript:BBCmyvideo()"><img src="{BBCB_MG_IMG_PATH}myvideo{BBCB_MG_IMG_EXT}" name="myvideo" onMouseOver="helpline('myvideo')" alt="{L_BBCB_MG_MYVIDEO}" title="{L_BBCB_MG_MYVIDEO}" class="bbimages" /></a>


images/bbcb_mg/images/gif

add myvideo.gif

myvideo

now i can embed myvideo...


DWho [ Sat 20 Jun, 2009 18:29 ]
Post subject: Re: Adding BBcode
to be honest it is not my field... maybe when MG comes back from vacation he can help...

have you searched the board for a similar add on to see if that sheds some light..



Chicony [ Sat 20 Jun, 2009 19:13 ]
Post subject: Re: Adding BBcode
i´ve search 4 hours...without fixing tipps


DWho [ Sat 20 Jun, 2009 21:26 ]
Post subject: Re: Adding BBcode
for myvideo which part are you using between the bbcode fields...?

have you a test account I can use to see what's happening...


Chicony [ Sat 20 Jun, 2009 21:37 ]
Post subject: Re: Adding BBcode
Hi in this Forum you didnt need an account.

http://www.rc-freunde-schwarzwald.de/viewforum.php?f=72

its open for all.

between myvideo Tags i have only the video ID

so the Tag is

Code: [Hide] [Select]
[myvideo]6433395[/myvideo]


spydie [ Sat 20 Jun, 2009 21:43 ]
Post subject: Re: Adding BBcode
Have you noticed that you deleted the YouTube link ??


DWho [ Sat 20 Jun, 2009 22:10 ]
Post subject: Re: Adding BBcode
also if you use the myvideo bbcode tags for example [myvideo]5605717[/myvideo] and hit preview you get a blank square block...

but if you pass over the link url the link is incorrect it comes up like this... http://www.myvideo.de/watch?v=5605717

but it should be linking to http://www.myvideo.de/watch/5605717

there must still be a problem in your code edits..


Chicony [ Sat 20 Jun, 2009 22:34 ]
Post subject: Re: Adding BBcode
DWho wrote: [View Post]
also if you use the myvideo bbcode tags for example [myvideo]5605717[/myvideo] and hit preview you get a blank square block...

but if you pass over the link url the link is incorrect it comes up like this... http://www.myvideo.de/watch?v=5605717

but it should be linking to http://www.myvideo.de/watch/5605717

there must still be a problem in your code edits..


Yeah no...ive test many other Code options..now it is so it must

But the Video is just still "white"


Chicony [ Sun 21 Jun, 2009 23:28 ]
Post subject: Re: Adding BBcode
nobody knows whats Problem???


spydie [ Sun 21 Jun, 2009 23:46 ]
Post subject: Re: Adding BBcode
sry but for me it look´s like you´ve just duplicatet the you tube link and something is incorrect in your code.

if i look at your code

Spoiler: [ Show ]


i think the foult is in here

one of this 3 links is wrong

I think i found the error

try this

Spoiler: [ Show ]



come back and tell me if that worked


Chicony [ Mon 22 Jun, 2009 08:41 ]
Post subject: Re: Adding BBcode
spydie wrote: [View Post]
sry but for me it look´s like you´ve just duplicatet the you tube link and something is incorrect in your code.

if i look at your code

Spoiler: [ Show ]


i think the foult is in here

one of this 3 links is wrong

I think i found the error

try this

Spoiler: [ Show ]



come back and tell me if that worked


Hi thanks for brainstorm...i found mistake...your code was incorrect too.

the correct code is

Code: [Hide] [Select]
elseif ($tag === 'myvideo')
{
$html = '<object width="425" height="350"><param name="movie" value="http://www.myvideo.de/movie/' . $content . '" /><embed src="http://www.myvideo.de/movie/' . $content . '" type="application/x-shockwave-flash" width="425" height="350"></embed></object><br /><a href="http://www.myvideo.de/watch/' . $content . '" target="_blank">Link</a><br />';
}


So i´ve correct all codes in my second topic and code is real "working".

So you can implement this codes in your Mods Database

greets chicony


DWho [ Mon 22 Jun, 2009 11:08 ]
Post subject: Re: Adding BBcode
can this be marked as solved..


Chicony [ Mon 22 Jun, 2009 12:33 ]
Post subject: Re: Adding BBcode
DWho wrote: [View Post]
can this be marked as solved..


ready


spydie [ Mon 22 Jun, 2009 22:07 ]
Post subject: Re: [Solved]Adding BBcode For Myvideo
But at least my code gave you a clou, or not ??

Trying and trying, thats how we learn !!!




Powered by Icy Phoenix