Форум для теста

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

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


Вы здесь » Форум для теста » Новый форум » Скрипты


Скрипты

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

1

настраиваемый профиль (слева будет, или справа)

HTML верх

<div id="profileSide"></div>
<script type="text/javascript">
function saveCookie(side){
var c_date = new Date();
c_date.setTime(c_date.getTime()+99999999999)
date = c_date.toGMTString();
document.cookie="profileSide="+side+"; expires="+date
}

function getSide(side){
if(side==0 && document.cookie.indexOf("profileSide")!=-1){
    side = document.cookie.substring(document.cookie.indexOf("profileSide=")+12, document.cookie.indexOf("profileSide=")+13)
}
if(side=="L"){
    document.getElementById("profileSide").innerHTML="";
} else if(side=="R"){
    document.getElementById("profileSide").innerHTML="<s"+"tyle type=\"text/css\">.punbb .post h3 span {border-right: 1px solid transparent;border-left: none;padding: 0.5em 1em;display: block; text-align: right;margin-right: 19em;margin-left: 0;}.punbb .post h3 strong {float: left;text-align: left;}.punbb .post .post-author, .pl-email, .pl-website {float: right;}.punbb .post-body {margin-right: 19em;margin-left: 0;border-right: 1px solid;border-left: none;}.punbb .post-links {margin-right: 19em;margin-left: 0em;border-right: 1px solid transparent;border-left: none;}.punbb .post-links ul {margin-right: -19em;margin-left: 0em;text-align: left;}.post-rating {float: left;}</st"+"yle>";
}
}
getSide(0)
</script>

В форму ответа

<select>
<option selected="selected">--Отображение профиля--</option>
<option onclick="saveCookie('L'); getSide('L')">|--Слева</option>
<option onclick="saveCookie('R'); getSide('R')">Справа--|</option>
</select>

0

2

Подсветка раздела при наведении

HTML низ

<style type="text/css">
td.tcl:hover {background: #ccc !important;}
</style>

0

3

Позволяет выделять BB кодом цитату

В форму ответа

<script type="text/javascript">
var a=document.getElementsByTagName("a")
for (i = 0; i<a.length; i++){
   if(a[i].href.indexOf("post.php?tid=") != -1){
      t = a[i].href.substring(a[i].href.indexOf('=')+1)
   }
}
var m = new Array();
var z = new Array();
for (w = 0; w<a.length; w++){
   if(a[w].href.indexOf("#p") != -1){
        m[w] = a[w].href.substring(a[w].href.indexOf('#p')+2)
           for (e=0; e<w; e++){
              m.shift()
           }
z.push(m[0])
   }
}
var c = new Array();
q=0
var arr=document.getElementsByTagName("li")
while(q<arr.length){
   if(arr[q].className=="pl-quote"){
        c.push(q)
   }
   q++
}
var cv = new Array ();
  for(y=0;y<c.length;y++){
    cv.push(y)
}
for(w=0; w<cv.length; w++){
name=arr[c[w]].innerHTML
arr[c[w]].innerHTML=name+" <a href='/post.php?tid="+t+"&qid="+z[w]+"' title='Ответить на сообщение'>Ответить</a> ";
}
</script>

0


Вы здесь » Форум для теста » Новый форум » Скрипты