Форум А и О (скрипты, дизайн, общение)

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Форум А и О (скрипты, дизайн, общение) » Общие вопросы и ответы » Добавление видео в сообщения


Добавление видео в сообщения

Сообщений 1 страница 5 из 5

1

Скрипты

Код:
<!--Загрузка на РУТЬЮБЕ-->
<style>
#button-rutube {background-image:url('http://img227.imageshack.us/img227/9287/rutubepp0.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>

<script type="text/javascript">
function tag_url2()
{var FoundErrors = '';
var enterURL = prompt("Введите окончание ссылки на Rutube Video", "");
var enterTITLE = prompt("Напишите описание данного ролика", "Посмотрите интересное видео");
if (!enterURL)
{FoundErrors += " " + error_no_url;}
if (FoundErrors)
{alert("Ошибка!" + FoundErrors);
return;}
insert('[rutube1]' + enterURL + '[/rutube1]\n' + enterTITLE + '');}

if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(17).innerHTML="<img src='/i/blank.gif' title='Вставить rutube' id='button-rutube' onclick=\"tag_url2()\">"
</script>


    <script>
    function addSpoiler(str,from,internal){
    var pos=0,pos2=0,newpos=0
    if((pos=str.indexOf("[rutube1]",from))==-1) return str;
    if((pos2=str.indexOf("[/rutube1]"),pos+9)==-1) return str;
    newpos=str.indexOf("[rutube1]",pos+9)
    if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
    if((pos2=str.indexOf("[/rutube1]",pos+9))==-1) return str;
    str=str.substring(0,pos)+makeSpoiler(str.substring(pos+9,pos2))+str.substring(pos2+10,str.length)
    if( str.indexOf("[rutube1]")!=-1 && internal==false) str=addSpoiler(str,0,false)
    return str}

    function makeSpoiler(txt){
    txt="<br><embed src=\"http://video.rutube.ru/"+txt+"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed><br>"
    return txt}

    if(document.URL.indexOf("viewtopic.php")!=-1){
    elm=document.getElementById("pun-main").getElementsByTagName("div")
    for(x in elm) if(elm[x].className=="post-content"){
    var post=elm[x]
    post.innerHTML=addSpoiler(post.innerHTML,0,false)}}
    </script>

КАК ДОБАВИТЬ ВИДЕО С РУТЬЮБА????)))

ЖМЕМ КНОПКУ- И ВСТАВЛЯЕМ КОНЦОВКУ, ПРИМЕР


//rutube.ru/tracks/565814.html?v=f631d5340b39653cd56fe6a74eed07bb
  -ЭТО НЕПРАВИЛЬНО)))))

НАДО ТАК-f631d5340b39653cd56fe6a74eed07bb

[rutube1]f631d5340b39653cd56fe6a74eed07bb[/rutube1]
Посмотрите интересное видео

0

2

Кнопка YouTube(Все браузеры)

Код:
<style>
#button-youtube {background-image:url('http://img98.imageshack.us/img98/1641/youtubeua3.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(15).innerHTML="<img src='/i/blank.gif' title='Вставить YouTube' id='button-youtube'  onclick=\"bbcode('[youtube]', '[/youtube]');\"/>"
</script>

Кнопка RuTube(Все браузеры)

Код:
<style>
#button-rutube {background-image:url('http://img227.imageshack.us/img227/9287/rutubepp0.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='/i/blank.gif' title='Вставить RuTube' id='button-rutube'  onclick=\"bbcode('

');\"/>"
</script>

Этим кодом можно убрать кнопку ютьюбе с панели-

Код:

<style type="text/css">
#button-youtube {display:none}
</style>

0

3

Майл видео

ПЕРВОЕ-КНОПКА МАЙЛ

Код:
<style>
#button-mailvideo {background-image:url('http://i046.radikal.ru/0805/28/c3e523638ec3.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
function tag_url1()
{var FoundErrors = '';
var enterURL = prompt("Введите окончание ссылки на Mail.ru", "");
var enterTITLE = prompt("Напишите описание данного ролика", "Посмотрите интересное видео");
if (!enterURL)
{FoundErrors += " " + error_no_url;}
if (FoundErrors)
{alert("Ошибка!" + FoundErrors);
return;}
insert('[mailru1]' + enterURL + '[/mailru1]\n[size=10]' + enterTITLE + '[/size]');}

if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(16).innerHTML="<img src='/i/blank.gif' title='Вставить mailvideo' id='button-mailvideo' onclick=\"tag_url1()\">"
</script>

САМ СКРИПТ

Код:
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[mailru1]",from))==-1) return str;
if((pos2=str.indexOf("[/mailru1]"),pos+9)==-1) return str;
newpos=str.indexOf("[mailru1]",pos+9)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
if((pos2=str.indexOf("[/mailru1]",pos+9))==-1) return str;
str=str.substring(0,pos)+makeSpoiler(str.substring(pos+9,pos2))+str.substring(pos2+10,str.length)
if( str.indexOf("[mailru1]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}

function makeSpoiler(txt){
txt="<br><embed src=\"http://img.mail.ru/r/video2/player_v2.swf?par="+txt+"\" type=\"application/x-shockwave-flash\" width=\"452\" height=\"385\"  allowScriptAccess=\"always\"></embed><br>"
return txt}


if(document.URL.indexOf("viewtopic.php")!=-1){
elm=document.getElementById("pun-main").getElementsByTagName("div")
for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addSpoiler(post.innerHTML,0,false)}}
</script>



Теги:

[mailru1]-[/mailru1]

Как добавлять видео


под видеороликом есть маленькая кнопочка  <A>

Жмем на нее и получаем несколько кодов.

Нам нужно-ДЛЯ ВСТАВКИ НА САЙТ,рядом жмем на папочку- код копируется.

Вид кода

<object width=585 height=367><param name="allowScriptAccess" value="always" /><param name="movie" value="http://img.mail.ru/r/video2/player_v2.swf?par=http://content.video.mail.ru/mail/vasiliska_pre/1/$18$0$139&page=2&imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username=vasiliska_pre&albumid=1&id=18&catalogurl=http://video.mail.ru/themes/humor" /><embed src=http://img.mail.ru/r/video2/player_v2.swf?par=http://content.video.mail.ru/mail/vasiliska_pre/1/$18$0$139&page=2&imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username=vasiliska_pre&albumid=1&id=18&catalogurl=http://video.mail.ru/themes/humor type="application/x-shockwave-flash" width=585 height=367 allowScriptAccess="always"></embed></object>

ОТСЕКАЕМ ВСЕ...ДО ВЫДЕЛЕННОЙ ЧАСТИ

http://content.video.mail.ru/mail/vasiliska_pre/1/$18$0$139&page=2&imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username=vasiliska_pre&albumid=1&id=18&catalogurl=http://video.mail.ru/themes/humor type="application/x-shockwave-flash" width=585 height=367 allowScriptAccess="always"></embed></object>

Далее, идем на форум, жмем в сообщении на кнопку добавляния майлролика

И добавляем в открывшееся окошко это-

http://content.video.mail.ru/mail/vasiliska_pre/1/$18$0$139&page=2&imaginehost=video.mail.ru&perlhost=video.mail.ru&alias=mail&username=vasiliska_pre&albumid=1&id=18&catalogurl=http://video.mail.ru/themes/humor type="application/x-shockwave-flash" width=585 height=367 allowScriptAccess="always"></embed></object>

Можно удалить "посмотрите интересное видео", просто нажмите делет

и жмем ОК.

ВСЕ. ЛЮБУЕМСЯ РОЛИКОМ

0

4

Добавление ролика с Video.Google.com

Кнопка

Код:
<style>
#button-google {background-image:url('http://img134.imageshack.us/img134/2993/googlevideowc9.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>

Сам скрипт

    <script>
    function addSpoiler(str,from,internal){
    var pos=0,pos2=0,newpos=0
    if((pos=str.indexOf("[google1]",from))==-1) return str;
    if((pos2=str.indexOf("[/google1]"),pos+9)==-1) return str;
    newpos=str.indexOf("[google1]",pos+9)
    if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
    if((pos2=str.indexOf("[/google1]",pos+9))==-1) return str;
    str=str.substring(0,pos)+makeSpoiler(str.substring(pos+9,pos2))+str.substring(pos2+10,str.length)
    if( str.indexOf("[google1]")!=-1 && internal==false) str=addSpoiler(str,0,false)
    return str}

    function makeSpoiler(txt){
    txt="<br><embed style=\"width:400px; height:326px;\" id=\"VideoPlayback\" type=\"application/x-shockwave-flash\" src=\"http://video.google.com/googleplayer.swf?docId="+txt+"&hl=en\" flashvars=\"\"> </embed><br>"
    return txt}

    if(document.URL.indexOf("viewtopic.php")!=-1){
    elm=document.getElementById("pun-main").getElementsByTagName("div")
    for(x in elm) if(elm[x].className=="post-content"){
    var post=elm[x]
    post.innerHTML=addSpoiler(post.innerHTML,0,false)}}
    </script>

Идем на гугл, берем код ролика-

<embed id=VideoPlayback src=http://video.google.ru/googleplayer.swf?docid=-8747771040963036196&hl=ru&fs=true style=width:400px;height:326px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash> </embed>

в сообщение в кнопку добавляем это-

-8747771040963036196&hl=ru&fs=true style=width:400px;height:326px allowFullScreen=true allowScriptAccess=always type=application/x-shockwave-flash> </embed>

то есть после второго знака равно(=)

Жмем ок, и любуемся на ролик

0

5

Добавление ролика с video.yahoo.com

Кнопка

Код:
<style>
#button-yahoovideo {background-image:url('http://img440.imageshack.us/img440/8933/yahoojd0.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='/i/blank.gif' title='Вставить Yahoo Video' id='button-yahoovideo'  onclick=\"bbcode('[yahoo12]', '[/yahoo12]');\"/>"
</script>

Сам скрипт

Код:
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[yahoo12]",from))==-1) return str;
if((pos2=str.indexOf("[/yahoo12]"),pos+9)==-1) return str;
newpos=str.indexOf("[yahoo12]",pos+9)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
if((pos2=str.indexOf("[/yahoo12]",pos+9))==-1) return str;
str=str.substring(0,pos)+makeSpoiler(str.substring(pos+9,pos2))+str.substring(pos2+10,str.length)
if( str.indexOf("[yahoo12]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}

function makeSpoiler(txt){
txt="<br><embed src=\"http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.0.45\" type=\"application/x-shockwave-flash\" width=\"512\" height=\"323\" allowFullScreen=\"true\" flashVars=\"id="+txt+"&lang=en-US&intl=us&thumbUrl=\" ></embed><br>"
return txt}


if(document.URL.indexOf("viewtopic.php")!=-1){
elm=document.getElementById("pun-main").getElementsByTagName("div")
for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addSpoiler(post.innerHTML,0,false)}}
</script>


Как добавлять?

Жмем на ссылку-http://video.yahoo.com/network/101306353?v=6158340

Смотрим ролик...нравицца)) жмем на конвертик на ролик- октрываюцца ссылки

Нам нужна первая ссылка (LINK)

http://video.yahoo.com/watch/6158340/15993839

Для того чтобы добавить видео в пост на форум нам нужно всего лишь последнии цифры

а именно http://video.yahoo.com/watch/6158340/15993839,

И вставляем  выделенное жирным в теги [yahoo12]15993839[/yahoo12].

Радуемся http://www.kolobok.us/smiles/standart/pleasantry.gif

0


Вы здесь » Форум А и О (скрипты, дизайн, общение) » Общие вопросы и ответы » Добавление видео в сообщения


Сервис форумов BestBB © 2016-2020. Создать форум бесплатно