у вас есть скрипт, чтобы в посты можно было вставлять аудио?
вопрос по скрипту
Страница: 1
Тема закрыта
Сообщений 1 страница 2 из 2
Поделиться209.07.2011 17:38:24
практика
Здравствуйте.
практика написал(а):
у вас есть скрипт, чтобы в посты можно было вставлять аудио?
Код:
<!--audio плеер v.1-->
<style type="text/css">
#button-play {background-image:url('http://img31.imageshack.us/img31/1875/sound.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat}
</style>
<script language="javascript">
function tag_play()
{var FoundErrors = '';
var enterURL = prompt("Введите ссылку на на музыку с playfile.ru, yandex.ru, filehoster.ru, zippyshare.com или прямую ссылку формата .mp3 ", "http://");
if (!enterURL)
{FoundErrors += " " + error_no_url;}
if (FoundErrors)
{alert("Ошибка!" + FoundErrors);
return;}
insert("[audio]" + enterURL + "[/audio]");}
if ((document.URL.indexOf("viewtopic.php")!=-1) || (document.URL.indexOf("post.php")!=-1)){
elm=document.getElementsByTagName("div")
for(x in elm)
{
if(elm[x].className=="post-content")
{
post = elm[x].innerHTML;
if(post.indexOf("http://playfile.ru")) {
player = /\[audio\](.*?)\/get\/(\d+)\/\[\/audio\]/g
elm[x].innerHTML = elm[x].innerHTML.replace(player, "<br /><embed src='http://playfile.ru/images/player.swf' flashvars='st=http://playfile.ru/images/player_style_audio.inc&file=http://playfile.ru/load/$2/' type='application/x-shockwave-flash' id='videoplayer757' wmode='transparent' width='230' height='36'>")
}
if(post.indexOf("http://static.video.yandex.ru/lite-audio")) {
player = /\[audio\]\[flash=([0-9]+)\,([0-9]+)\,(.*?)\/lite-audio\/(.*?)\[\/audio\]/g
elm[x].innerHTML = elm[x].innerHTML.replace(player, "<br /><embed src='http://static.video.yandex.ru/lite-audio/$4' type='application/x-shockwave-flash' width='300' height='72' allowFullScreen='true' scale='noscale'/>")
}
if(post.indexOf("http://www.filehoster.ru")) {
player = /\[audio\]http:\/\/www\.filehoster\.ru\/files\/(.*?)\[\/audio\]/g
elm[x].innerHTML = elm[x].innerHTML.replace(player, "<br /><embed src='http://www.filehoster.ru/player/' flashvars='dataurl=$1' type='application/x-shockwave-flash' width='350' height='50' allowFullScreen='sameDomain' wmode='transparent'>")
}
if(post.indexOf("zippyshare.com")) {
player = /\[audio\]http:\/\/www(\d+)\.zippyshare\.com\/v\/(\d+)\/file\.html\[\/audio\]/g
elm[x].innerHTML = elm[x].innerHTML.replace(player, "<br /><embed type='application/x-shockwave-flash' src='http://www.zippyshare.com/mediaplayer/mediaplayer.swf?file=http://www$1.zippyshare.com/downloadMusic%3Fkey%3D$2xx&type=flv' quality='high' menu='false' wmode='transparent' allowscriptaccess='always' height='20' width='400' name='mp3player' border='0' style='margin-bottom: 6px;'/>")
}
if(post.indexOf(".mp3")) {
player = /\[audio\](.*?)\[\/audio\]/g
elm[x].innerHTML = elm[x].innerHTML.replace(player, "<br /><embed src='http://www.demo-music.ru/pleer/pleer4.swf' type='application/x-shockwave-flash' allowscriptaccess='always' wmode='transparent' flashvars='comment=demo-music.ru&st=http://www.demo-music.ru/pleer/style_pleer.txt&file=$1' width='470' height='33'>")
}
}}}
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(15).innerHTML="<img src='/i/blank.gif' img title='Загрузить музыку' id='button-play' onclick=\"tag_play()\"/>"
</script>Тема закрыта
Страница: 1
Похожие темы
| Ваши вопросы по скриптам | Новые возможности форума/Скрипты | 07.12.2013 |
| Вопрос по скрипту | Корзина | 29.08.2007 |
| Общие вопросы по Администрированию. | Архив | 17.08.2008 |
| Спрос и поиск новых скриптов.... | Новые возможности форума/Скрипты | 12.01.2014 |
| Общие вопросы по Оформлению | Архив | 24.03.2009 |