Icy Phoenix

     
 

[Solved]Adding BBcode For Myvideo

[Solved]Adding BBcode For Myvideo

Article
Reply with quote    Download Post  
Post [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



 
Last edited by Chicony on Mon 22 Jun, 2009 12:32; edited 1 time in total 
Chicony - View user's profile Send private message  
Chicony [ Sat 20 Jun, 2009 00:55 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


[Solved]Adding BBcode For Myvideo

Comments
Reply with quote    Download Post  
Post 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..

   



 
DWho - View user's profile Send private message  
DWho [ Sat 20 Jun, 2009 11:50 ]
Reply with quote    Download Post  
Post 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: [Download] [Hide] [Select]
    'L_BBCB_MG_YOUTUBE' => $lang['bbcb_mg_youtube'],


add after

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


find

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


add after

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


includes/bbcb_mg_small.php

find

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


add after

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


find

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


add after

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


includes/bbcode.php


find

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


add after

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


find

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


add in line after YOUTUBE

Code: [Download] [Hide] [Select]
MYVIDEO,


find

Code: [Download] [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: [Download] [Hide] [Select]
($tag === 'youtube') ||


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


find

Code: [Download] [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: [Download] [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: [Download] [Hide] [Select]
s_youtube_insert = 'Bitte YouTube Datei ID eingeben';


add after

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


find

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


add after

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


find

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


add after

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


find

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


add after

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


find

Code: [Download] [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: [Download] [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: [Download] [Hide] [Select]
$lang['bbcb_mg_youtube'] = 'YouTube';


add after

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


find

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


add after

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


templates/common/iconize.css

find

Code: [Download] [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: [Download] [Hide] [Select]
a[href *="myvideo.de/watch/"],


templates/mg_themes/bbcb_mg.tpl

find

Code: [Download] [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: [Download] [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...



 
Last edited by Chicony on Mon 22 Jun, 2009 08:46; edited 2 times in total 
Chicony - View user's profile Send private message  
Chicony [ Sat 20 Jun, 2009 12:13 ]
Reply with quote    Download Post  
Post 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..

  



 
DWho - View user's profile Send private message  
DWho [ Sat 20 Jun, 2009 18:29 ]
Reply with quote    Download Post  
Post Re: Adding BBcode 
 
i´ve search 4 hours...without fixing tipps



 
Chicony - View user's profile Send private message  
Chicony [ Sat 20 Jun, 2009 19:13 ]
Reply with quote    Download Post  
Post 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...



 
DWho - View user's profile Send private message  
DWho [ Sat 20 Jun, 2009 21:26 ]
Reply with quote    Download Post  
Post 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: [Download] [Hide] [Select]
[myvideo]6433395[/myvideo]




 
Chicony - View user's profile Send private message  
Chicony [ Sat 20 Jun, 2009 21:37 ]
Reply with quote    Download Post  
Post Re: Adding BBcode 
 
Have you noticed that you deleted the YouTube link ??



 
spydie - View user's profile Send private message  
spydie [ Sat 20 Jun, 2009 21:43 ]
Reply with quote    Download Post  
Post 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..



 
DWho - View user's profile Send private message  
DWho [ Sat 20 Jun, 2009 22:10 ]
Reply with quote    Download Post  
Post 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 - View user's profile Send private message  
Chicony [ Sat 20 Jun, 2009 22:34 ]
Reply with quote    Download Post  
Post Re: Adding BBcode 
 
nobody knows whats Problem???



 
Chicony - View user's profile Send private message  
Chicony [ Sun 21 Jun, 2009 23:28 ]
Reply with quote    Download Post  
Post 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



 
spydie - View user's profile Send private message  
spydie [ Sun 21 Jun, 2009 23:46 ]
Reply with quote    Download Post  
Post 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: [Download] [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



 
Chicony - View user's profile Send private message  
Chicony [ Mon 22 Jun, 2009 08:41 ]
Reply with quote    Download Post  
Post Re: Adding BBcode 
 
can this be marked as solved..



 
DWho - View user's profile Send private message  
DWho [ Mon 22 Jun, 2009 11:08 ]
Reply with quote    Download Post  
Post Re: Adding BBcode 
 
DWho wrote: [View Post]
can this be marked as solved..


ready



 
Chicony - View user's profile Send private message  
Chicony [ Mon 22 Jun, 2009 12:33 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next
 




 


 

  cron