выпьем кофеишки

Объявление

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

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


Вы здесь » выпьем кофеишки » один кусочек сахара » Поиск скриптов


Поиск скриптов

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

1

Любимая мелодия в профиле

Автор: Romych

Инструкция:
Создаём дополнительное поле в Админке.
Название: Любимая мелодия.
Поясняющий текст:

Здесь предлагается разместить вашу любимую на данный момент мелодию, и она будет отображаться у вас профиле. Просто загрузите мелодию воспользовавшись кнопкой загрузки и вставьте полученную ссылку в текстовое поле.
        пример ссылки на загруженную мелодию -  <a href="http://klopp.net.ru/musicbox/i/1012/c3/391f2232603e756103c1b0eb2ba117.mp3">like the morning sunrise</a>

Тип поля: Текстовое поле
Длина: 300
Расположение: Под названием
Естественно, разрешаем пользователям заполнять это поле.
Далее в Настройках админки размещаем сам скрипт в html-низ:

Код:
<script language="javascript">
if(window.location.href.indexOf("profile.php?section=fields")!=-1){$('fieldset').map(function(){var Pole=$(this).find('legend:has(span:contains("Любимая мелодия"))');$(Pole).after('<td id="melody" style=\'background-image:url("http://uploads.ru/i/W/Q/P/WQPBO.gif");background-position:center center;background-repeat:no-repeat;cursor: pointer;border:none;\'  title="Загрузить любимую мелодию"></td>');var Vis=$(this).find('p.inputfield input').val();if(Vis=='undefined'||Vis==null){return false;};if(Vis.indexOf(".mp3")!=-1){var plr=/<a href=\"(http:\/\/[^\s<"]+?\.mp3)\">(.*?)<\/a>/gi;Vis=Vis.replace(plr,'<embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="200" height="24">');$(this).append(Vis);};});$('#melody').click(function(){$('body').append('<div class="my" align="center" id="melobox" style="width:480px;padding:8px;position:fixed;top:25%;right:35%;z-index:900;"><strong>Загрузить музыку</strong><span style="display:block;cursor:pointer;float:right;margin:0;color:#B22222;font-size:16px;" title="Закрыть" onclick="var zz=document.getElementById(\'melobox\');zz.parentNode.removeChild(zz);"><b>&nbsp;  X</b></span><br><iframe src="http://klopp.net.ru/musicbox/" width="478" height="250" frameborder="no" marginheight="3" scrolling="no"></iframe><br>Скопируйте полученный HTML-код ссылки</div>');});};$('td#profile-right li:has(span:contains("Любимая мелодия"))').map(function(){var Ku=$(this).find('strong').html();if(Ku.indexOf(".mp3")!=-1){plr=/&lt;a href=\"(http:\/\/[^\s<"]+?\.mp3)\"&gt;(.*?)&lt;\/a&gt;/gi;Ku=Ku.replace(plr,'<embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="200" height="24">');};$(this).find('strong').html(Ku);});$('div.post-author ul').find('li[class^="pa-fld"]:contains("Любимая мелодия")').map(function(){var lm=$(this).html();if(lm=='undefined'||lm==null){return false;};if(lm.indexOf(".mp3")!=-1){var plr=/Любимая мелодия:<br>&lt;a href=\"(http:\/\/[^\s<"]+?\.mp3)\"&gt;(.*?)&lt;\/a&gt;/gi;lm=lm.replace(plr,'Любимая мелодия:<br><embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="180" height="24">');};$(this).html(lm);});
</script>

Важная деталь: скрипт заточен под название дополнительного поля Любимая мелодия, если хочется какое-то своё словосочетание, то надо его вставить по всему скрипту вместо Любимая мелодия.
http://s2.uploads.ru/rn8co.png

НАШ СЛУЧАЙ
Код:
<script language="javascript">
if(window.location.href.indexOf("profile.php?section=fields")!=-1){$('fieldset').map(function(){var Pole=$(this).find('legend:has(span:contains("пью кофе под"))');$(Pole).after('<td id="melody" style=\'background-image:url("http://uploads.ru/i/W/Q/P/WQPBO.gif");background-position:center center;background-repeat:no-repeat;cursor: pointer;border:none;\'  title="Загрузить любимую мелодию"></td>');var Vis=$(this).find('p.inputfield input').val();if(Vis=='undefined'||Vis==null){return false;};if(Vis.indexOf(".mp3")!=-1){var plr=/<a href=\"(http:\/\/[^\s<"]+?\.mp3)\">(.*?)<\/a>/gi;Vis=Vis.replace(plr,'<embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="200" height="24">');$(this).append(Vis);};});$('#melody').click(function(){$('body').append('<div class="my" align="center" id="melobox" style="width:480px;padding:8px;position:fixed;top:25%;right:35%;z-index:900;"><strong>Загрузить музыку</strong><span style="display:block;cursor:pointer;float:right;margin:0;color:#B22222;font-size:16px;" title="Закрыть" onclick="var zz=document.getElementById(\'melobox\');zz.parentNode.removeChild(zz);"><b>&nbsp;  X</b></span><br><iframe src="http://klopp.net.ru/musicbox/" width="478" height="250" frameborder="no" marginheight="3" scrolling="no"></iframe><br>Скопируйте полученный HTML-код ссылки</div>');});};$('td#profile-right li:has(span:contains("пью кофе под"))').map(function(){var Ku=$(this).find('strong').html();if(Ku.indexOf(".mp3")!=-1){plr=/&lt;a href=\"(http:\/\/[^\s<"]+?\.mp3)\"&gt;(.*?)&lt;\/a&gt;/gi;Ku=Ku.replace(plr,'<embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="200" height="24">');};$(this).find('strong').html(Ku);});$('div.post-author ul').find('li[class^="pa-fld"]:contains("пью кофе под")').map(function(){var lm=$(this).html();if(lm=='undefined'||lm==null){return false;};if(lm.indexOf(".mp3")!=-1){var plr=/пью кофе под:<br>&lt;a href=\"(http:\/\/[^\s<"]+?\.mp3)\"&gt;(.*?)&lt;\/a&gt;/gi;lm=lm.replace(plr,'пью кофе под:<br><embed src="https://forumstatic.ru/files/000e/8b/b7/80759.swf" type="application/x-shockwave-flash" allowscriptaccess="always" wmode="transparent" flashvars="playerID=audioplayer_2&amp;bg=0xffcc66&amp;slider=0x003366&amp;soundFile=$1&amp;titles=$2" width="180" height="24">');};$(this).html(lm);});
</script>

2

Смайлы с комментариями

Автор: rps
Забавная безделушка, начало которой идёт из темы "Адаптировать phpBB-шный бб-код для наших форумов" на форуме поддержки. Идея эта впервые реализована на php-bb форумах, rps адаптировал её для нашей платформы.
Суть скрипта в том, что он позволяет оставлять мысли в виде текста и наиболее подходящего к нему смайла. Возможно, таким образом будет удобно флудить...
ХТМЛ-верх:

Код:
<script type="text/javascript">
FORUM.set('editor.think', { name : 'Добавить мысли', onclick : function() {make_code(); } } );
</script>
<style type="text/css">
td#button-think {
 background: url(http://st1.bbcorp.ru/i/information.png) no-repeat center !important;
 }

#think-area {
  position: absolute;
  z-index: 1000;
  top: 43px;
  right: 15px;
  padding: 1.5em;
  width: 500px;
}

#div_smiles p {
  padding-bottom: 0 !important;
}

#div_smiles span {
  display: inline;
}

.think_table {
  width: auto !important;
  table-layout: auto !important;
}

td.think_td {
  margin: 0; 
  padding: 0.2em !important;
  border-style: none !important;
}

.think_content {
  background-color: #eeee6f; 
  color: #000; 
  border-radius: 16px; 
  -webkit-border-radius: 16px; 
  -khtml-border-radius: 16px; 
  -moz-border-radius: 16px; 
  -o-border-radius: 16px; 
  border: 1px solid #fff; 
  padding: 3px 5px !important; 
  font-size: 1em;
}

#textarea, #input {
  width: 100%;
}

#close_button {
  margin-left: 15px;
}

.standart_smile {
  padding: 2px;
  cursor: pointer;
}

#hidden_link {
  text-decoration: none;
  border-bottom: 1px dotted;
}

.thought {
  padding-right: 7px;
  background: transparent url(http://s1.uploads.ru/i/D6VpZ.png) no-repeat top right;
  display: inline-block;
}
</style>

ХТМЛ-низ:

Код:
<script type="text/javascript">
var div; var i = 0; var t; var inp; var ta; var max = 10; var def_text = "Мысль потерялась..."; var def_smile = "http://s1.uploads.ru/i/t2jJV.gif";

var pic = new Array();
pic.push("http://www.kolobok.us/smiles/standart/acute.gif");
pic.push("http://www.kolobok.us/smiles/standart/ireful3.gif");
pic.push("http://www.kolobok.us/smiles/standart/blum2.gif");
pic.push("http://www.kolobok.us/smiles/standart/black_eye.gif");
pic.push("http://www.kolobok.us/smiles/standart/bad.gif");
pic.push("http://www.kolobok.us/smiles/standart/secret.gif");
pic.push("http://www.kolobok.us/smiles/standart/yahoo.gif");
pic.push("http://www.kolobok.us/smiles/standart/whistle2.gif");
pic.push("http://www.kolobok.us/smiles/standart/facepalm.gif");
pic.push("http://www.kolobok.us/smiles/standart/this.gif");
pic.push("http://www.kolobok.us/smiles/standart/agree.gif");
pic.push("http://www.kolobok.us/smiles/standart/black_eye.gif");
pic.push("http://www.kolobok.us/smiles/standart/grin.gif");
pic.push("http://www.kolobok.us/smiles/standart/help.gif");
pic.push("http://www.kolobok.us/smiles/standart/polling.gif");
pic.push("http://www.kolobok.us/smiles/standart/smoke.gif");
pic.push("http://www.kolobok.us/smiles/standart/sorry2.gif");
pic.push("http://www.kolobok.us/smiles/standart/umnik.gif");
pic.push("http://www.kolobok.us/smiles/standart/yu.gif");
pic.push("http://www.kolobok.us/smiles/standart/drinks.gif");


function make_div() {
 var fs; var z = 0; var new_div;
 fs = document.getElementsByTagName("div");
 for (z in fs) {
  if (fs[z].className == "fs-box hashelp") {
   new_div = document.createElement("div");
   new_div.id = "think-area";
   new_div.className = "container";
   new_div.style.display = "none";
   fs[z].appendChild(new_div);
  }
 }
}

function make_think(x) {
 var reg; var think; var j = 0; res = x.innerHTML; var smile; var text;
 reg = new RegExp("\\[think=([^\\]]+)\\]([^\\[\\]]+)\\[/think\\]", "g");
 if (reg.test(res)) {
  think = res.match(reg);
  for (j in think) {
   smile = think[j].substring(think[j].indexOf('[think=') + 7, think[j].indexOf(']'));
   text = think[j].substring(think[j].indexOf(']') + 1, think[j].indexOf('[/think]'));
   res = res.replace('[think=' + smile + ']' + text + '[/think]', '<table class="think_table" cellpadding="0" cellspacing="0"><tr><td class="think_td"><div class="think_content">' + text + '</div><span class="thought"><img src="' + smile + '" alt="" /></span></td></tr></table>');
  }
 }
 return res;
}

function make_bb_code() {
 t = document.getElementById("textarea").value;
 if (t == "") t = def_text;
 inp = document.getElementById("input").value;
 if (inp.indexOf("http://") == -1) inp = def_smile;
 bbcode('[think=' + inp + ']' + t + '','[/think]');
 changeVisibility('think-area');
}

function make_code() {
 var h = 0;
 changeVisibility('think-area');
 ta = document.getElementById("think-area");
 ta.innerHTML = "<textarea id='textarea' rows='5'>Введите текст мысли</textarea>";
 ta.innerHTML += "<div id='div_smiles'><p id='conteiner_smiles'><span id='visible_smiles'></span><span id='hidden_smiles' style='display: none;'></span></p><a id='hidden_link' style='cursor: pointer;' title='Показать или скрыть эмоции' onclick='document.getElementById(\"hidden_smiles\").style.display = (document.getElementById(\"hidden_smiles\").style.display == \"none\" ? \"inline\" : \"none\");'>Больше эмоций</a></div><br />";
 ta.innerHTML += "<input type='text' id='input' value='Вставьте ссылку на смайл' /><br /><br />";
 for (h in pic) {
  if (h < max) document.getElementById("visible_smiles").innerHTML += "<img class='standart_smile' src='" + pic[h] + "' alt='Эмоции' title='Нажмите, чтобы добавить' onclick='document.getElementById(\"input\").value = this.src;' />";
  else document.getElementById("hidden_smiles").innerHTML += "<img class='standart_smile' src='" + pic[h] + "' alt='Эмоции' title='Нажмите, чтобы добавить' onclick='document.getElementById(\"input\").value = this.src;' />";
 }
 ta.innerHTML += "<input type='button' class='button' value='Добавить' id='bb_buton' onclick='make_bb_code();' />";
 ta.innerHTML += "<input type='button' class='button' value='Закрыть' id='close_button' onclick='changeVisibility(\"think-area\");' />";
}

make_div();
div = document.getElementById("pun-main").getElementsByTagName("div");
for (i in div) {
 if (div[i].className == "post-content") div[i].innerHTML = make_think(div[i]);
}
</script>

Теперь немного о настройках.
В ХТМЛ-верх располагается скрипт создания новой кнопки в форме ответа и стиль всех элементов. При необходимости, можно поменять иконку

Код:
td#button-think {
 background: url(http://st1.bbcorp.ru/i/information.png) no-repeat center !important;
 }

на свою.
В ХТМЛ-низ доступны для изменения следующие параметры:

Код:
var max = 10;

Устанавливает число смайлов, показываемых по умолчанию в форме. Остальные будут скрыты и доступны по клику на ссылку "Больше эмоций".

Код:
var def_text = "Мысль потерялась...";

Устанавливает стандартный смайл-эмоцию, если пользователь не указал его.

Код:
var pic = new Array();

Набор смайлов-эмоций (в стандартном наборе 20 штук). Можно добавлять свои или удалить ненужные.
Спасибо mkusher за советы при разработке.
Скриншоты:

http://s2.uploads.ru/4c7C0.png
http://s3.uploads.ru/9tUcr.png

3

выделить код
Код:
<script type="text/javascript">
function select_text(elem) {
	if(window.getSelection) {   
var s=window.getSelection();   
if(s.setBaseAndExtent){   
	s.setBaseAndExtent(elem,0,elem,elem.innerText.length-1);   
}
else {   
	var r=document.createRange();   
	r.selectNodeContents(elem);   
	s.removeAllRanges();   
	s.addRange(r);
}   
	}
	else if(document.getSelection){   
var s=document.getSelection();   
var r=document.createRange();   
r.selectNodeContents(elem);   
s.removeAllRanges();   
s.addRange(r);   
	}
	else if(document.selection){   
var r=document.body.createTextRange();   
r.moveToElementText(elem);   
r.select();
	}   
}
</script>
<script type="text/javascript">
var div = document.getElementById('pun-main').getElementsByTagName('div');
for(x in div){
	if(div[x].className=='code-box'){
div[x].getElementsByTagName('strong')[0].innerHTML = '<a href="#" onclick="select_text(this.parentNode.parentNode.childNodes[1].getElementsByTagName(\'pre\')[0]); return false;">Выделить код</a>';
	}
}
</script>
счетчик символов
Код:
<script type="text/javascript">
if ((document.URL.indexOf("viewtopic.php") != -1) || (document.URL.indexOf("post.php") != -1) || (document.URL.indexOf("edit.php") != -1)) {
var repl = document.getElementById("main-reply");
var submit = document.getElementsByTagName("p")
for (var i=0; i<submit.length; i++){
if (submit[i].className == "formsubmit")
submit[i].innerHTML = "<span id=\"plng\" style=\"border: 1px solid; padding: 2px 3px;\">Написано символов: <b>0</b></span>" + submit[i].innerHTML;
}
repl.onkeyup = repl.onkeydown = repl.onfocus = repl.onblur = function(){
document.getElementById("plng").innerHTML ="Написано символов: <b>" + (repl.value.length) + "</b>";
}}
</script>

4

уведомление о новом лс со звуком.

Ставить в html низ.

Код:
<script language="JavaScript"> 
if((document.getElementById("navpm").innerHTML.indexOf("(") != -1) && (document.URL.indexOf("messages.php") == -1)) {
document.write("<div id='messanger' class='section' style='position: fixed; right: 40%; top: 35%; z-index: 1000; width: 320px; height: 110px;'><h2 style='background-color: #08440c; color: #000; text-align: center;'>Оповещение</h2><div class='container' style='padding: 15px; text-align: center; background-color: #ebeaf0;'><span>Вам пришло новое личное сообщение</span><br /><br /> <span style='color: green;'>Чтобы прочесть его, нажмите на эту кнопку.</span><br /><br /><br /><a class='mess' onclick=\"window.open(href='/messages.php'); return false\" style='background-color: rgb(125, 158, 112); border-style: none; cursor: pointer; font-size: 20px;' >&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;</a></div><embed height='1' width='1' type='application/x-shockwave-flash' wmode='transparent' quality='high' src='http://promobil.kiev.ua/engine/classes/flashplayer/media_player.swf?MediaLink=http://promobil.kiev.ua/uploads/files/1188937250_icq.mp3&amp;defaultMedia=1&amp;showPlayButton=false&amp;playOnStart=true'></div>");}
$(function(){$('.mess').click(function(){
$('#messanger').toggle();}); });
</script>
Новое уведомление о сообщении

ставить в html низ. Прелесть кода в том, что можно самостоятельно изменять картинку.
Действие скрипта: слева на экране будет появляться картинка с уведомлением. Закрывается при нажатии на крестик.
пример действия:
http://s1.uploads.ru/JNiVY.png

код:

Код:
<div class="container"><div id=alertMess style="display:none;width: ШИРИНА КАРТИНКИpx; height: [b]ВЫСОТА КАРТИНКИ[/b]px;/* border:brown 1px solid;*/ top:42%;margin-left:-105px;position:fixed;z-index:100;"><img id=CloSandHid src=[b]"КАРТИНКА ЗАКРЫВАЮЩЕГО КРЕСТИКА[/b]" style="position:absolute;z-index:100;"/><img class=MyMessag src=[b]"КАРТИНКА САМОГО СООБЩЕНИЯ"[/b]/></div><script>function MiguN1(){$("#alertMess .MyMessag").fadeTo(1600,0.03,function(){$(this).fadeTo(1500,1,function(){return false});return false});return false}function setcookie(a,b,c){if(c){var d=new Date();d.setTime(d.getTime());d=new Date(d.getTime()+c*1000*60)}if(a&&b)document.cookie=a+'='+b+(c?'; expires='+d.toGMTString():'');else return false}function getcookie(a){var b=new RegExp(a+'=([^;]){1,}');var c=b.exec(document.cookie);if(c){c=c[0].split('=')}else{return false}return c[1]?c[1]:false}function timerZap(){timerID=setTimeout("MiguN1();timerZap();",3200);return}$("#CloSandHid").click(function(){setcookie("CloSandHid",true,15);if(getcookie("CloSandHid")){$("#alertMess").hide()}});if(!getcookie("CloSandHid")){$(document).ready(function(){if($("#navpm").text().indexOf("(")!=-1){timerID=setTimeout("$('#alertMess').fadeIn(2300);timerZap()",2300)}})}
</script></div>
</div

>

Уведомления о новом личном письме на форуме

HTML-низ

выглядет так https://forumupload.ru/uploads/0000/0a/f2/68797-1.gif

Код:
<script type="text/javascript">
var nrisunok="https://forumupload.ru/uploads/0000/0a/f2/68797-1.gif";
if( (document.getElementById("navpm").innerHTML.indexOf("(") != -1))
{ 
document.getElementById("navpm").innerHTML="<img src='"+nrisunok+"'> "+document.getElementById("navpm").innerHTML;
};
</script>

выглядеть так
https://forumupload.ru/uploads/0000/0a/f2/294914-1.jpg

Код:
<script type="text/javascript">
str = document.getElementById("navpm").innerHTML
loc = new String(document.location)
if( (str.indexOf("(") != -1) &&  loc.indexOf('messages.php')==-1)
{  
  count = parseInt(str.substring(str.indexOf("(")+1,str.indexOf(")")))
  if (count==1) text="  У вас есть 1 новое сообщение"
  else if (count>1 && count<5) text=" У вас есть " +count+" новых сообщения"
  else text="У вас есть " +count+" новых сообщений"
  msg =  "<div id=\"new-mes\" class=\"container\" style=\"position: absolute; z-index=2; left: 40%; text-align: center;\">"
  msg += text
  msg += "<br><a href=\"\" onclick=\"document.location.replace('messages.php'); document.getElementById('new-mes').style.display='none';return false;\">( Посмотреть личные сообщения )</a>"
  msg +="<br><br><a href=\"\" onclick=\"document.getElementById('new-mes').style.display='none'; return false\"><center>( Закрыть окно )</center></a>\r\n"  
  msg += "</div>"
  document.getElementById("pun-status").innerHTML += msg
}
</script>

5

ветовыделение групп

!-- Цветовыделение групп -->
<script type="text/javascript">
var arr=document.links
var arr1=new Array ("Медузия", "Арей", "Дафна", "Gamer")
var arr2=new Array ("Диметра", "Катерина Лоткова", "Юля Северова", "Таня")
var arr3=new Array ("…")
for (x in arr)
{for (y in arr1)
{if (arr[x].innerHTML==arr1[y])
{
arr[x].innerHTML="<font color='red'>"+arr[x].innerHTML+"</font>"}
}}
for (x in arr)
{for (j in arr2)
{if (arr[x].innerHTML==arr2[j])
{
arr[x].innerHTML="<font color='blue'>"+arr[x].innerHTML+"</font>"}}}
for (x in arr)
{for (l in arr3)
{if (arr[x].innerHTML==arr3[l])
{
arr[x].innerHTML="<font color='green'>"+arr[x].innerHTML+"</font>"}}}
</script>

______________________________________________________
var arr3=new Array ("…") - группы определенного цвета. Эту строку размножаете, столько, сколько надо групп, давая каждой номер:
var arr4=new Array ("…")
var arr5=new Array ("…")
и т.д.
жирным выделены названия цветов, меняете на свое.

6

HTML-низ
убирает "отредактировано"

Код:
<style type="text/css">
.lastedit {display:none}
</style>

Убрать надпись "Объявление"

Код:
<style>
#pun-announcement h2 {display: none;}
#pun-announcement .container {padding-top: 1em}
</style>

7

ПИАР_ВХОД ТЕКСТОМ:
Код:
<script type="text/javascript">
PiarNik="Реклама";
PiarPas="1111";
var L="<div id=\"PR_loginDiv\" style=\"display:none;\">\
<form id=\"form_login\" name=\"login\" method=\"post\" action=\"login.php?action=in\" onsubmit=\"return check_form()\">\
<fieldset>\
<input type=\"hidden\" name=\"form_sent\" value=\"1\"/>\
<input type=\"text\" id=\"fld1\" name=\"req_username\" size=\"21\" maxlength=\"25\"/>\
<input type=\"text\" id=\"fld2\" name=\"req_password\" size=\"7\" maxlength=\"16\"/>\
<input type=\"submit\" class=\"button\" name=\"login\"/>\
</fieldset>\
</form>\
</div>\
<li id=\"navpiar\"><span id=spMyimg><a onclick=\"PiarIn()\">Пиар-Вход</a></span></li>";
if($("#navlogin").html()!=null){
$("#navlogin").after(L) //navlogin
$("#PR_loginDiv #fld1").val(PiarNik)
$("#PR_loginDiv #fld2").val(PiarPas)
function PiarIn () {$("#PR_loginDiv input[type='submit']").click();}
}
</script>
ПИАР_ВХОД КАРТИНКОЙ:
Код:
<style>.Myimge {position:absolute;margin-top:-14px;}</style>
    <script type="text/javascript">
    PiarNik="PR";
    PiarPas="1111";
    var L="<div id=\"PR_loginDiv\" style=\"display:none;\">\
    <form id=\"form_login\" name=\"login\" method=\"post\" action=\"login.php?action=in\" onsubmit=\"return check_form()\">\
    <fieldset>\
    <input type=\"hidden\" name=\"form_sent\" value=\"1\"/>\
    <input type=\"text\" id=\"fld1\" name=\"req_username\" size=\"21\" maxlength=\"25\"/>\
    <input type=\"text\" id=\"fld2\" name=\"req_password\" size=\"7\" maxlength=\"16\"/>\
    <input type=\"submit\" class=\"button\" name=\"login\"/>\
    </fieldset>\
    </form>\
    </div>\
    <span id=spMyimg><img class=\"Myimge\"  title=\"Быстрый вход для 'Пиарщиков'\" onclick=\"PiarIn()\" src=\"http://savepic.ru/2867133.png\" onmouseover=\"this.src='http://savepic.ru/2857917.png' \" onmouseout=\"this.src='http://savepic.ru/2867133.png'\" /></span>";
    if($("#navlogin").html()!=null){
    $("#navlogin").append(L) //navlogin
    $("#PR_loginDiv #fld1").val(PiarNik)
    $("#PR_loginDiv #fld2").val(PiarPas)
    function PiarIn () {$("#PR_loginDiv input[type='submit']").click();}
    }
    </script>

8

Разделение важных и обычных тем на блоки
HTML низ

Код:
<script type="text/javascript">
<!--
if (document.URL.indexOf("viewforum")!=-1){
var trs=document.getElementById('pun-main').getElementsByTagName("table")[0].rows
for (io=1; io<=(trs.length-1); io++){
if ((trs[io].className.indexOf("isticky")!=-1)&&(trs[io+1].className.indexOf('isticky')==-1))
{var normal=document.getElementById('pun-main').getElementsByTagName("table")[0].insertRow(io+1)
for(j=0;j<4;j++){
nl=normal.insertCell(0)
nl.className="tc2"
nl.innerHTML="&nbsp;"
nl.style.borderLeft="0px"}
nl.innerHTML="<b>Темы форума</b>"
nl.style.textAlign="left"
}}}
-->
</script>

9

Плеер для форума (в профиль)

Заходим Администрирование - Поля профиля.
Создаем поле:

Остальное по желанию.
Название:                                           Можно написать любое название.     
Тип поля:                                            Текстовое поле.
Длина:                                                999
Расположение:                                   Под  названием.

Далее заходим в Профиль - Дополнительно и вставляем в поле код плеера:

<object type="application/x-shockwave-flash" data="http://flv-mp3.com/i/pic/ump3player_500x70.swf" height="27" width="180"><param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="http://flv-mp3.com/i/pic/ump3player_500x70.swf" /><param name="FlashVars" value="way=http://music.mp3&amp;swf=http://flv-mp3.com/i/pic/ump3player_500x70.swf&amp;w=180&amp;h=27&amp;time_seconds=0&amp;autoplay=0&amp;q=&amp;skin=bs&amp;volume=50&amp;comment=" /></object>

Красным - ссылка на mp3 файл.

10

Медальки на форум в профиле, в топике

В HTML низ
<style>
/****************************************************************/
/*CSS  МЕДАЛЬКИ В ПРОФИЛЬ(ТОПИК) */
/****************************************************************/
span.tooltip4:hover span {
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: url(http://savepic.org/1942239.png);
background-origin: padding-box;
background-position: 0% 0%;
background-repeat: repeat;
background-size: auto;
border-bottom-left-radius: 17px;
border-bottom-right-radius: 17px;
border-top-left-radius: 17px;
border-top-right-radius: 17px;
box-shadow: 0px 5px 15px;
color: #000000;
display: inline;
position: absolute;
}
span.tooltip4 span {
background-attachment: scroll;
display: none;
margin-left: -25px;
margin-top: -45px;
padding-bottom: 10px;
padding-left: 15px;
padding-right: 15px;
padding-top: 6px;
width: auto;
}
.awards {
cursor:pointer;
cursor:hand;
margin:2px;
}
img.Flug {
cursor:pointer;
cursor:hand;
float:left;
margin: -4px 0 -31px -21px;
}
</style>
<div id=Myawrd style="display:none;">
<!--
=================================================
//НОМЕР НАГРАДЫ    // ЗА ЧТО    // CCЫЛКА НА КАРТИНКУ
//=================================================-->
<p>1,За доблестный Труд,http://savepic.org/1963976.gif</p>
<p>2,Спасателю утопающих,http://savepic.org/1953736.gif</p>
<p>3,Лучшему модератору,http://savepic.org/1950664.gif</p>
<p>4,За доблестный Труд,http://savepic.org/1956808.gif</p>
<p>5,За доблестный Труд,http://savepic.org/1954760.gif</p>
<p>6,За доблестный Труд,http://savepic.org/1944520.gif</p>
<p>7,За доблестный Труд,http://savepic.org/1942472.gif</p>
<p>8,За доблестный Труд,http://savepic.org/1941448.gif</p>
<p>9,За доблестный Труд,http://savepic.org/1939400.gif</p>
<p>10,За достижения культмассовой работе,http://savepic.org/1927112.gif</p>
<p>11,Лучшему администратору,http://savepic.org/1919944.gif</p>
<p>12,Лучшему Летающему Юзеру,http://savepic.org/1925064.gif</p>
<p>13,Змею Искусителю форума,http://savepic.org/1914824.gif</p>
<p>14,Ветерану-Инвалиду в положенный срок,http://savepic.org/1960907.gif</p>
<p>15,За непревзойденную унылость постов,http://savepic.org/1966027.gif</p>
<p>16,Лучшему ISQ-Трепло форума,http://savepic.org/1945547.gif</p>
</div>
<script type="text/javascript">
var NumPole=1; //Номер доп поля c наградками;
var listMedal=[];
$("#Myawrd p").each(function(j){
listMedal[j]=[];listMedal[j]=$(this).html().split(',')});
var NamFld = '.pa-fld'+NumPole;
var FlugIm= '<img width=51 class=Flug src="http://savepic.org/1911734.png" />';
var awSTrt = '<span class=tooltip4><img width="23" class=awards src="';
$("div.post-author "+ NamFld).each(function () {
if($(this).html()!=null){
  var L = $(this).html().replace(/^.+http://imagiart.ru/img/smilies/MyBB/light/sad.gif?:[\s]|<br>)/ig,'')
    var L0=$(this).html().replace(/^(.+http://imagiart.ru/img/smilies/MyBB/light/smile.gif[\s\S]*$/igm,'$1')+'<br>';$(this).html(L0)
    var Thisaw = L.split(',');
for (j=0; j< Thisaw.length; j++){
     Dp='';var x=Thisaw[j];x=x.replace(/(\d+)#.+$/img,'$1');Dp=(Thisaw[j].replace(x,'')).replace(/^#/i,'');
      for (i=0; i< listMedal.length-1; i++){ //alert(Thisaw[j]+","+listMedal[0])
       if(x==listMedal[i][0]){L=awSTrt+listMedal[i][2]+'"><span>'+listMedal[i][1]+' '+Dp+'<br>'+FlugIm+'</span></span>';
    $(this).append(L);break;}
      }
};}
});
</script>

Выделенное красным, - если нужно меняем на своё.

<p>N,Лучшему ISQ-Трепло форума,http://savepic.org/1945547.gif</p>
Размножаем сколько нужно
(N - номер награды - пишем по порядку

В выбранном Доп.поле, после прописанного имени поля, ниже строкой, - появятся наши награды
Прописанные в данном поле таким макаром
4,2,10
(Номер награды, прописываемый в Доп.Поле, - выбирается из списка в первой колонке Скрипта
Зы:  Если кому нужно => 23  - ширина медальки, cм. скрипт.

Дополнения
Пункт - Медалько - за что, можно дополнить конкретному пользователю, непосредственно в поле награды Профиля,
прописывая после цифры награды решетку #И тут Своё добавочное Описание
Пример прописи в Поле:
1,3#Раздела"Поле Чудес",4
Итог будет=> Лучшему модератору Раздела"Поле Чудес
!!Внимание: - В доп Описании награды - должны отсутствовать дополнительные запятые
тестим - скриншотим - отписываемся:
*Стиль можно перетащить в свой Стиль
*в конец любого Окна без тегов [i]<style>
Источник
http://forum.mybb.ru/viewtopic.php?id=6902&p=48#p703880


Вы здесь » выпьем кофеишки » один кусочек сахара » Поиск скриптов


Рейтинг форумов | Создать форум бесплатно