RAiNE: e[R]estart

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

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


Вы здесь » RAiNE: e[R]estart » Новый форум » Проба, чего уж там


Проба, чего уж там

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

1

[health=100]56454545845451[/health][magic=10]54545454[/magic]

[health=95]11111[/health]

[health=100]11111[/health]

[health=89]1111111111111111111[/health]

[health=100]11111[/health][magic=100]54545454[/magic]
[health=90]1111111111111[/health][health=80]1111111111111[/health][health=70]1111111111111[/health][health=60]1111111111111[/health][health=50]1111111111111[/health][health=40]1111111111111[/health][health=30]1111111111111[/health][health=20]1111111111111[/health][health=10]1111111111111[/health][health=0]1111111111111[/health][magic=100]54545454[/magic][magic=90]1111111111111[/magic][magic=80]1111111111111[/magic][magic=70]1111111111111[/magic][magic=60]1111111111111[/magic][magic=50]1111111111111[/magic][magic=40]1111111111111[/magic][magic=30]1111111111111[/magic][magic=20]1111111111111[/magic][magic=10]1111111111111[/magic][magic=0]1111111111111[/magic]

[health=95]111[/health]

0

2

[mybb][/mybb]

0

3

[form]..[/form]

0

4

Код:
<!---/Script FeroDaR and mkusher--!>
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[marq]",from))==-1) return str;
if((pos2=str.indexOf("[/marq]"),pos+6)==-1) return str;
newpos=str.indexOf("[marq]",pos+6)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+6,true)
if((pos2=str.indexOf("[/marq]",pos+6))==-1) return str;
str=str.substring(0,pos)+makeSpoiler(str.substring(pos+6,pos2))+str.substring(pos2+7,str.length)
if( str.indexOf("[marq]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}
function makeSpoiler(txt){
txt='<marquee>' + txt +'</marquee>'
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>
<!---/Script FeroDaR and mkusher--!>

0

5

[marq]Текст[/marq]

0

6

Код:
<script type="text/javascript">
var img1 = "https://forumstatic.ru/files/0012/e8/7a/38504.png";
var img2 = "https://forumstatic.ru/files/0012/e8/7a/97990.png";

$('#post').find("#addition-area").prepend('<div onclick="addanchor()"><img style="width: 20px!important; height: 20px!important; margin:5px -3px -5px -14px!important;" src="'+img1+'"/> <span>Вставить якорь</span></div><div onclick="anchoru()" style="padding-bottom:4px"><img style="width: 20px!important; height: 20px!important; margin:5px 0 -5px -14px!important;" src="'+img2+'"/><span>Ccылка на якорь</span></div>');
function addanchor(){
 var adnchor = '';
 adnchor = prompt("Введите название якоря", "#");
 insert("[url&" + adnchor + "]" + adnchor + "[/url]\n");
}
function anchoru(){
 var anchorp = '';
 anchorp = prompt("Введите название якоря", "#");
 var anchorc = '';
 anchorc= prompt("Введите описание якоря", "Описание");
 insert("[url=http://anchor" + anchorp + "]" + anchorc + "[/url]\n");
}
$('.post-content').each(function(){
 $(this).find('p:contains("[url&#"),div[onclick]:contains("[url&#")').each(function(){
   var str=$(this).html();
   var val = str.replace(/\[url&amp;#[^\[\]]+\]#([^\[\]]+)\[\/url\]/img,'<a name="$1"></a>');
   if(val!=str)$(this).html(val);   
 });
 $(this).find('a[href*="//anchor"]').each(function(){
   var href=$(this).attr('href');
     href = href.split('#')[1];
     if(!!href){$(this).removeAttr('target');$(this)[0].href = '#'+href;
       var str = $(this).text();
       if(str.indexOf('http://')==0)$(this).text(href);
     }
 });
});
$('.post-content').find('a[href^="#"]').live('click', function(){
    var lnk = $(this).attr('href');
    var a=$('.post-content').find('a[name="'+lnk.substr(1)+'"]');
    b = a.parents('.spoiler-box').find('div[onclick]:first').not('.visible');
    if(b.length)b.click();
    setTimeout(function(){location.replace(document.URL.split('#')[0]+lnk)},10)
    return false;
});
</script>

Задача: Передвинуть скролл к нужному месту на странице при клике на ссылку.
Актуально при длинных пояснениях к чему либо.
К примеру: В игровых описаниях, в расшифровках неких списков проставленных ссылками, в расшифровках описания ингредиентов и способа их приготовления
Аналог в HTML: http://htmlbook.ru/samhtml/yakorya

якорь - место, в которое будет передвигаться(красный якорёк) - ставим латинскими буквами на нижнем регистре название якоря
Ссылка на якорь (синий якорёк) В ссылку на якорь ставим то же самое слово, что и обозвали якорь, в Описание - своё нужноё слово

Дополнительно есть фича открывания спойлера, если сам якорь внутри спойлера или в описании спойлера
В Принципе имеется возможность переходить к якорю и с произвольной страницы
для этого вид ссылки в Сообщении такой:

Код:
[url=http://forum.mybb.ru/viewtopic.php?pid=31044#Name]Описание[/url]

Зеленым - ссылка на форум
синим - последняя группа цифр после #p при клике на дату в сообщении
красным - имя якоря

0

7

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

0

8

Код:
<style type="text/css">
#button-spoiler {background-image:url('https://upforme.ru/uploads/000c/65/17/462-1.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat}
</style>
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[spoiler]",from))==-1) return str;
if((pos2=str.indexOf("[/spoiler]"),pos+9)==-1) return str;
newpos=str.indexOf("[spoiler]",pos+9)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
if((pos2=str.indexOf("[/spoiler]",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("[spoiler]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}




function makeSpoiler(txt){
txt="<div class=quote-box style='padding:1px'><cite style='width:100%'>Спойлер <input style='width:80px;margin-left:70%;font-size:10px;' type='button' value='Показать' onclick='hideSpoiler(this)'></cite><blockquote style='display:none'>"+txt+"</blockquote></div>"
return txt}

function hideSpoiler(sp){
spoiler=sp.parentNode.parentNode.getElementsByTagName("blockquote")[0]
if(spoiler.style.display=='none'){
spoiler.style.display='inline'
sp.value='Скрыть'}
else{
spoiler.style.display='none'
sp.value='Показать'}}

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)}}
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(19).innerHTML="<img  id=\"button-spoiler\" title=\"Спойлер\" onclick=\"bbcode('[spoiler]','[/spoiler]')\" src=\"/i/blank.gif\" />"
</script>

0

9

Код:
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[health]",from))==-1) return str;
if((pos2=str.indexOf("[/health]"),pos+9)==-1) return str;
newpos=str.indexOf("[health]",pos+9)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
if((pos2=str.indexOf("[/health]",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("[health]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}


function makeSpoiler(txt){
txt="<div  style='padding:1px' bgcolor='#2070d3' width=50%><p style='width: 31%; background-color: #679ddf; color:#fff;'><nobr><b>"+txt+"</b></nobr></p></div>"
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>

0

10

Код:
<style type="text/css">
#button-spoiler {background-image:url('https://upforme.ru/uploads/000c/65/17/462-1.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat}
</style>
<script>
function addSpoiler(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[spoiler]",from))==-1) return str;
if((pos2=str.indexOf("[/spoiler]"),pos+9)==-1) return str;
newpos=str.indexOf("[spoiler]",pos+9)
if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
if((pos2=str.indexOf("[/spoiler]",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("[spoiler]")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}




function makeSpoiler(txt){
txt="<div class=quote-box style='padding:1px'><cite style='width:100%'>Спойлер <input style='width:80px;margin-left:70%;font-size:10px;' type='button' value='Показать' onclick='hideSpoiler(this)'></cite><blockquote style='display:none'>"+txt+"</blockquote></div>"
return txt}

function hideSpoiler(sp){
spoiler=sp.parentNode.parentNode.getElementsByTagName("blockquote")[0]
if(spoiler.style.display=='none'){
spoiler.style.display='inline'
sp.value='Скрыть'}
else{
spoiler.style.display='none'
sp.value='Показать'}}

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)}}
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(19).innerHTML="<img  id=\"button-spoiler\" title=\"Спойлер\" onclick=\"bbcode('[spoiler]','[/spoiler]')\" src=\"/i/blank.gif\" />"
</script>

0

11

if((pos2=str.indexOf("",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("")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}
[health]...[/health]if((pos2=str.indexOf("",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("")!=-1 && internal==false) str=addSpoiler(str,0,false)
return str}

0

12

Код:
<!--Оформление таблицы © Romych-->
<script language="javascript">
$(document).ready(function() {
$('div.post-content table').addClass('striped');
$('table.striped tr:nth-child(even)').addClass('even');
$('table.striped tr:nth-child(odd)').addClass('odd');
$('table.striped tr:first-child').addClass('first');
 });
</script>
Код:
<style>
.post-content td {background:white;} /* общий фон таблицы, в данном варианте белый */
table.striped tbody tr.first td {background:#1E90FF;text-align: center;} /* фон заголовка таблицы */
tr.even td{background:#B0E2FF;} /* фон чётных ячеек итаблицы */
table.striped tbody tr:hover td{background:#FFFAF0;} /* фон строк таблицы при наведении курсора */
tr.even td:nth-child(2n+2) {background:#bbbbff;} /* фон чётных ячеек второго столбца */
tr.odd td:nth-child(2n+2) {background:#B0E2FF;} /* фон нечётных ячеек второго столбца */
</style>

0

13

Код:
<script language="JavaScript1.2">
<!--
var ns6=document.getElementById&&!document.all?1:0

var head="display:''"
var folder=''

function expandit(curobj){
folder=ns6?curobj.nextSibling.nextSibling.style:document.all[curobj.sourceIndex+1].style
if (folder.display=="none")
folder.display=""
else
folder.display="none"
}

//-->
</script>
<SCRIPT language=JavaScript>
<!--
function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}
  function InsSM()
   {
   var table = '[table'+document.all.Bgcolor.value+document.all.Dkcolor.value+document.all.Ltcolor.value+']';

  for (var x=0; x<document.all.rows.value; x++) {
    table += "[tr]";
    for (var y=0; y<document.all.cols.value; y++) {
      table += "[td]Ячейка[/td]";
    }
    table += "[/tr]";
  }
  table += "[/table]\n";
    document.all.theCode.value=(table);
document.write('<b><font size=2 color=#555555 face=Arial, Helvetica, sans-serif>Скопируйте эти теги в ваше сообщение</font></b><br><textarea name=theCode cols=50 rows=6>'+table+'</textarea><br><input type=button name=Button value=Выделить onClick=document.all.theCode.select();document.all.theCode.focus()><br><br><br>');
document.write('<p><input type=button name=button value=Назад onClick=history.back()></p><Br><br>Скрипт написан компанией <a href=http://rusff.me target=_blank>RusFF</a>.');


}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</SCRIPT>
<h4 style='cursor:hand' onClick='expandit(this)'>Сделать таблицу</h3>
<TABLE width=300 style='display:none' style=&{head};>
  <TR>
    <TD>Строк: <INPUT maxLength=3 size=3 value=1 name=rows></TD>
    <TD>Ячеек: <INPUT maxLength=4 size=3 value=1 name=cols></TD>
    <td><INPUT type=hidden name=Bgcolor><INPUT type=hidden name=Dkcolor><INPUT type=hidden name=Ltcolor></td>
    <TD colSpan=4><A href="http://rusff.me/" target=_blank><B>RusFF ©</B></A><BR><INPUT type=hidden name=theCode> <INPUT onclick=InsSM() type=button value="Создать" name=Button2></TD>
</TR>
</TABLE>

0

14

[health=100][/health]
[magic=100][/magic]

0


Вы здесь » RAiNE: e[R]estart » Новый форум » Проба, чего уж там


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