Welcome Guest. Please Login or Register  


You are here: Index > Advanced Electron Forums > Mods > Topic : Dailymotion , Youtube , Myspace and Vimeo

A2 Hosting

News:

Group Message
Hello Guest,

Welcome to the AEF Board. AEF is getting better and better and is also becoming more popular.
Take a few seconds to Register, its free, and it inspires us to work harder and improve on whatever we can improve on.
Give us some feedback, and tell your buddies about AEF!

Thanks,
The AEF Team



Threaded Mode | Print  

 Dailymotion , Youtube , Myspace and Vimeo, Embed Dailymotion , Youtube , Myspace and Vimeo bbc_codes in posts (14 Replies, Read 21054 times)
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
First step
Find in the root/forum/themes/default/texteditor_theme.php <- OPEN THIS
then search this line:
Code
<td class="bbc" width="22" onmouseover="this.className='bbcon'" onmouseout="this.className='bbc'"><a onclick="javascript:<?php echo $object;?>.wrap_bbc('[flash=200,200]', '[/flash]');" href="javascript:void(0);" title="Flash"><img src="<?php echo $theme['images'];?>bbc/flash.gif" alt="Flash" /></a></td>

add after :
Code
<td class="bbc" width="22" onmouseover="this.className='bbcon'" onmouseout="this.className='bbc'"><a onclick="javascript:<?php echo $object;?>.wrap_bbc('[youtube]', '[/youtube]');" href="javascript:void(0);" title="youtube"><img src="<?php echo $theme['images'];?>bbc/youtube.gif" alt="youtube" /></a></td>

Code
<td class="bbc" width="22" onmouseover="this.className='bbcon'" onmouseout="this.className='bbc'"><a onclick="javascript:<?php echo $object;?>.wrap_bbc('[dailymotion]', '[/dailymotion]');" href="javascript:void(0);" title="dailymotion"><img src="<?php echo $theme['images'];?>bbc/dailymotion.gif" alt="dailymotion" /></a></td>

save and close;
step two,
we have to upload dailymotion.gif and youtube.gif in root/forum/themes/default/images/bbc/ <- here
Step three,
We have to enable the buttons by clicking them; to do that we have to find in the root/forum/themes/default/js/ <- there are two files we have to change
first texteditor.txt <- OPEN THIS
then search in the line
Code
else if(tag=='[flash]'){this.wrap('[flash]','[/flash]') }

and add after theese
Code
else if(tag=='[youtube]'){this.wrap('[youtube]','[/youtube]& #039;)}else if(tag=='[dailymotion]'){this.wrap('[dailymotion]','[/d ailymotion]')}

save and close;
second texteditor.js
add after
Code
else if(/\[flash=([0-9]+),([0-9]+)\]/.test(tag)){this.wrap(tag,'[/flash]')}

Code
else if(/\[youtube]/.test(tag)){this.wrap(tag,'[/youtube]')}else if(/\[dailymotion]/.test(tag)){this.wrap(tag,'[/dailymotion]')}
< /div>

save and close;


Irc-ro.net :6667
Board Image


Edited by cristrixy : July 30, 2011, 11:02 pm

-----------------------
:D
IP: --   

Dailymotion and Youtube
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
Step four,
Now we have to insert the replacement codes ; to do that we need to find root/main/functions/bbc_functions.php <-OPEN THIS
insert after this code:

Code
if (!$globals['parsebbc']) {
        return $text;
    }

Code
$text = preg_replace("/\[youtube\](.*)youtube.com\/watch\?v=(.*)\[\/youtube\]/i ",
"<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"[url=http://www.youtube.com/v///2&hl=de&fs=1/]http://www.yo utube.com/v/\\2&hl=de&fs=1\[/url]">
</param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"[url=http://www.youtube.com/v///2&hl=de&fs=1/]http://www.yout ube.com/v/\\2&hl=de&fs=1\[/url]"
type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>", $text);

Code
$text = preg_replace('/\[dailymotion]([a-zA-Z0-9_-]+)\[\/dailymotion\]/i',
'<object height="344" width="425"><param name="movie" value="[url=http://www.dailymotion.com/swf//1]http://www.dailymotion.com/sw f/\1[/url]">
</param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"</param><embed src="[url=http://www.dailymotion.com/swf//1]http://www.dailymotion.com/swf/ \1[/url]"
type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="344" width="425"></embed></object>',$text);


the upper codes must be  in one line
and voila, you are done!enjoy :)

Edited by cristrixy : July 30, 2011, 11:03 pm

-----------------------
:D
IP: --   

Dailymotion and Youtube
SAFAD
Group: Administrator
Post Group: Elite Member
Posts: 279
Status:
Quite interesting !
Vasily will like this for sure

-----------------------
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer
My Blog
IP: --   

embed myspace video and vimeo
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
Useing the same method as before we can enable the codes wich you'll find
lower, in order to activate myspace and vimeo videos in posts.

Quote
$text = preg_replace('/\[myspace]([A-Za-z0-9_]+)\[\/myspace\]/i','<wid th="225" height="144"><param name="allowFullScreen" value="true"/><param name="wmode" value="transparent"/><param name="movie" value="http://mediaservices.myspace.com/services/media/embed.aspx/\\m=$ 1,t=1,mt=video" /><embed src="http://mediaservices.myspace.com/services/media/embed.aspx/\\m=$ 1,t=1,mt=video" "width="225" height="144" allowFullScreen="true"  type="application/x-shockwave-flash"  wmode="transparent"></embed>',$text);


and
Quote
$text = preg_replace('/\[vimeo]([A-Za-z0-9_]+)\[\/vimeo\]/i','<width=& quot;225" height="144"><param name="allowFullScreen" value="true"/><param name="wmode" value="transparent"/><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$1&amp;server=vimeo.c om&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;co lor=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=$1&amp;server=vimeo.c om&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;co lor=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" "width="225" height="144" allowFullScreen="true"  type="application/x-shockwave-flash"  wmode="transparent"></embed>',$text);


For questions you can post here or you can join us an the AEF irc channel
on server irc-ro.net : port 6667, 6668

Board Image 

Enjoy








Edited by cristrixy : August 1, 2011, 8:10 pm

-----------------------
:D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
VasiliyRS
Group: Support
Post Group: Working Member
Posts: 212
Status:
Thank you. Dailymotion is exactly what i need. I started to like Dailymotion more than youtube.

-----------------------
For quick AEF help join our IRC channel :
http://anelectron.com/board/index.php?tid=6469
Contribute to AEF: https://github.com/AEFGroup/Advanced-Electron-Forum

Board Image
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
11minutes
Group: Member
Post Group: Newbie
Posts: 19
Status:
Quote From : cristrixy July 30, 2011, 10:36 pm
Step four,
Now we have to insert the replacement codes ; to do that we need to find root/main/functions/bbc_functions.php <-OPEN THIS
insert after this code:

Code
if (!$globals['parsebbc']) {
        return $text;
    }

Code
$text = preg_replace("/\[youtube\](.*)youtube.com\/watch\?v=(.*)\[\/youtube\]/i ",
"<object width=\"425\" height=\"344\"><param name=\"movie\" value=\"[url=http://www.youtube.com/v///2&hl=de&fs=1/]http://www.yo utube.com/v/\\2&hl=de&fs=1\[/url]">
</param><param name=\"allowFullScreen\" value=\"true\"></param><embed src=\"[url=http://www.youtube.com/v///2&hl=de&fs=1/]http://www.yout ube.com/v/\\2&hl=de&fs=1\[/url]"
type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"425\" height=\"344\"></embed></object>", $text);

Code
$text = preg_replace('/\[dailymotion]([a-zA-Z0-9_-]+)\[\/dailymotion\]/i',
'<object height="344" width="425"><param name="movie" value="[url=http://www.dailymotion.com/swf//1]http://www.dailymotion.com/sw f/\1[/url]">
</param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"</param><embed src="[url=http://www.dailymotion.com/swf//1]http://www.dailymotion.com/swf/ \1[/url]"
type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="344" width="425"></embed></object>',$text);


the upper codes must be  in one line
and voila, you are done!enjoy :)


What do You mean with - the upper codes must be  in one line? Also there i can find 2 codes the same in this file with
Code
if (!$globals['parsebbc']) {

        return $text;

    }

Thanks in adwance
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
RE 11MINUTES: one line 4 code ;why becose it may change your php file or the code will result null;
see the bbcode.txt
Board Image

Edited by cristrixy : January 15, 2012, 10:20 pm

-----------------------
:D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
11minutes
Group: Member
Post Group: Newbie
Posts: 19
Status:
Thanks, but i will better do nothing with that  :D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
if you wanna do changes 4 you forum you have to learn it;
:D
on irc-ro.net forum is the script active dailymotion youtube  facebook and vimeo

Edited by cristrixy : September 27, 2011, 11:34 am

-----------------------
:D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
11minutes
Group: Member
Post Group: Newbie
Posts: 19
Status:
You can answer this? - What do You mean with - the upper codes must be  in one line? Also there i can find 2 codes the same in this file with
Sometimes the mistakes are overpriced  :D
Everyone needs to do he do the best  ;-D
And actually with translations i have problems.. Still forums don't like Latvian āščņķīūē in some places. Ehhh, not my world :D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
Rune
Group: Member
Post Group: Newbie
Posts: 1
Status:
can u reload that text.. coz its not working for me as i am getting errors

forums/main/functions/bbc_functions.php on line 146
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
cristrixy
Group: Universal Moderator
Post Group: Working Member
Posts: 211
Status:
try to follow the bbcode.txt
and open it with notepad++


-----------------------
:D
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
11minutes
Group: Member
Post Group: Newbie
Posts: 19
Status:
Yes, I did it Board Image
All working, only want to mention that it works with normal youtube link of video (not share link as I tried all the time).
IP: --   

Dailymotion , Youtube , Myspace and Vimeo
antros
Group: Member
Post Group: Newbie
Posts: 9
Status:
it works  like a charm :)
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Members who read this topic
, candidosa2, Enver02, kumarullal, storm, VasiliyRS, ghazi119, SAFAD, ShaunY, cristrixy, Insaneboi, haylau, KeycleAmeby, GamingChitChat, tekkknakk, pochudoek, cris, Huyakinsb, CruzBishop, CymnStoomiSob, tasnor, clailslah, Toksacromma, newimaging, rocketsurgeon, 11minutes, Rune, AminBully, sachin, Knele, Sammael, Prime_8, nexgenforum, liquidbroadcast123, gaguns, jpbravo, xteensx, antros


Users viewing this topic
1 guests, 0 users.

A2 Hosting

All times are GMT. The time now is December 8, 2019, 7:40 am.

  Powered By AEF 1.1.0 Preview © 2007-2011 AEF Group. All rights reservedQueries: 13  |  Page Created In:0.119