ConectarseRegistrarse
0

Temas

Monedas

Likes

0
Debes de estar Registrado y comentar para ver el enlace de descarga
Pulsa en Me Gusta para desbloquear contenidos ocultos y Agradecer por este aporte
Logros y Medallas obtenidos por

Temas Similares


Respuestas

avatar
Usuario
Usuario

Angeloid
avatarAngeloid
Usuario
Ver perfil de usuario
el Miér 06 Jun 2012, 4:21 pm

Hola voy a hablar de la nueva herramienta que abre y cierra las categorías y una herramienta básica

Panel de control - Módulos - HTML & JAVASCRIPT - Gestión de código JavaScript

crear un nuevo JavaScript y poner el código

JAVASCRIPT



Código:
function insertText(a){var c=localStorage.getItem("fasave"+a);if(c===null){$("#savep div[onClick^=insertText("+a+")]").remove()}else{if($("#savep select").val()==1){localStorage.removeItem("fasave"+a),localStorage.removeItem("fasavet"+a),$("#savep div[onClick^=insertText("+a+")]").remove()}else{if($("#savep select").val()==2){var b=localStorage.getItem("fasavet"+a),b=prompt("Título do salvamento :",b?b:"");b!==null&&(b==""?(localStorage.removeItem("fasavet"+a),$("#savep div[onClick^=insertText("+a+")]").text('"'+c.substr(0,30).replace(/</g,"<").replace(/>/g,">")+(c.length>30?"...":'"'))):(localStorage.setItem("fasavet"+a,b),$("#savep div[onClick^=insertText("+a+")]").text(b)))}else{replaceTxt(c)}}}}function replaceTxt(a){var c=$("#text_editor_textarea");if(c.length){start=c.attr("selectionStart");end=c.attr("selectionEnd");stop=c.attr("scrollTop");sleft=c.attr("scrollLeft");text=c.val();for(var b=[""],e=/^([\s\S]*?)(((\$\$)+)(\$?)|(\$))0([\s\S]*)$/,d;d=a.match(e);){b[b.length-1]+=d[1],d[6]=="$"||d[4]==""?b[b.length]="":b[b.length-1]+=d[3].substr(0,d[3].length/2)+"0",a=d[7]}b[b.length-1]=a;e=text.substring(start,end);a=b[0];d=a.length;for(var f=1;f<b.length;f++){a+=e,a+=b[f]}c.attr({value:text.substr(0,start)+a+text.substr(end),selectionStart:start+d,selectionEnd:b.length>1?end+d:start+d,scrollTop:stop,scrollLeft:sleft})}}function saveExport(){for(var a=localStorage.getItem("fasave-length")===null?0:localStorage.getItem("fasave-length"),c="[",b=0;b<a;b++){var e=localStorage.getItem("fasave"+b);if(e!==null){var d=localStorage.getItem("fasavet"+b);c!="["&&(c+=",");c+=(d===null?"":escape(d)+":")+escape(e)}}c+="]";replaceTxt(c)}function saveImport(){var a=$("#text_editor_textarea").val().substring($("#text_editor_textarea").attr("selectionStart"),$("#text_editor_textarea").attr("selectionEnd")).replace(/\s/g,"");if(/^\[[%/^a-zA-Z0-9\*@_\+\.\/:,-]*\]$/.test(a)){for(var a=a.substr(1,a.length-2).split(","),c=0;c<a.length;c++){var b=a[c].split(":");b.length==2?saveItem(unescape(b[1]),unescape(b[0])):saveItem(unescape(b[0]),"")}}}function saveSelect(){var a=$("#text_editor_textarea");$(a).attr("selectionStart")-$(a).attr("selectionEnd")!=0&&(a=a.val().substring($(a).attr("selectionStart"),$(a).attr("selectionEnd")),saveItem(a,""))}function saveItem(a,c){for(var b=parseInt(localStorage.getItem("fasave-length")===null?0:localStorage.getItem("fasave-length")),e=0;e<b;e++){var d=localStorage.getItem("fasave"+e);d!==null&&d==a&&(localStorage.removeItem("fasavet"+e),$("#savep div[onClick^=insertText("+e+")]").remove(),localStorage.removeItem("fasave"+e))}localStorage.setItem("fasave"+b,a);c!=""&&localStorage.setItem("fasavet"+b,c);localStorage.setItem("fasave-length",b+1);$("#savep select").after('<div class="savedt" onClick="insertText('+b+');return false;">'+(c?c:"""+a.substr(0,30).replace(/</g,"<").replace(/>/g,">")+(a.length>30?"...":"""))+"</div>")}$(function(){$("#text_editor_textarea").length&&window.localStorage&&navigator.appName!="Microsoft Internet Explorer"&&($("#addbbcode16").after(' <span id="savec"><button id="saveb" class="button2" type="button" title="Sauvegarde"><img src="http://i49.servimg.com/u/f49/15/59/73/38/save10.png" alt="Sauvegarde" title="Sauvegarde"></button></span>'),$("#saveb").click(function(a){if(a.shiftKey){$("#saveshift").length||$("#savec").append('<div class="save-bloc" id="saveshift"><div onClick="saveExport()">Exportar</div><div onClick="saveImport()">Importar</div></div>'),$("#savep").hide(300),$("#saveshift").slideToggle(300)}else{if(!$("#savep").length){$("#savec").append('<div class="save-bloc" id="savep"><select><option value="0">Inserir</option><option value="1">Suprimir</option><option value="2">Nomear</option></select><div id="saves" style="display:none"><hr /><span onClick="saveSelect()">Salvar a seleção</span></div></div>');$("#savep").click(function(a){a.stopPropagation()});for(var a=localStorage.getItem("fasave-length")===null?0:localStorage.getItem("fasave-length"),c=0;c<a;c++){var b=localStorage.getItem("fasave"+c);b!==null&&$("#savep select").after('<div class="savedt" onClick="insertText('+c+');return false;">'+(localStorage.getItem("fasavet"+c)===null?"""+b.substr(0,30).replace(/</g,"<").replace(/>/g,">")+(b.length>30?"...":"""):localStorage.getItem("fasavet"+c))+"</div>")}}$("#saveshift").hide(300);$("#savep").slideToggle(300)}}),$("#text_editor_textarea").select(function(){$("#saves").show()}),$("#text_editor_textarea").bind("click keyup keydown",function(){$(this).attr("selectionStart")-$(this).attr("selectionEnd")==0&&$("#saves").hide()}))});jQuery(document).ready(function(){jQuery('a[href^="http://www.directorioforuns.com/"]').html("Diretório dos fóruns");jQuery('.foruns a').click(function(){window.open(this.href);return false});jQuery('a[href^="/post?f=15&mode=newtopic"]').attr('href','/h2-');jQuery('').attr('href','/h3-');jQuery('a').attr('');jQuery('').attr('');jQuery('').attr('');jQuery('').attr('');jQuery('').attr('');jQuery('.toggleable').css('display','none');jQuery('#forunslist').click(function(){jQuery('#toggle1').animate({width:'toggle',height:'toggle',opacity:'toggle'},4000);jQuery('#toggle2').animate({width:'0px',height:'0px',opacity:'0%',display:'block',width:'toggle',height:'toggle',opacity:'toggle'},4000)});jQuery('#forunslist2').click(function(){jQuery('#toggle2').animate({width:'toggle',height:'toggle',opacity:'toggle'},4000);jQuery('#toggle1').animate({width:'0px',height:'0px',opacity:'0%',display:'block',width:'toggle',height:'toggle',opacity:'toggle'},4000)});jQuery("th.website:first").text("Onde estou");if(jQuery('input[name=mode][value=newtopic]').length){jQuery('input[name=subject]').attr('onBlur','shh()')}jQuery('table tbody tr:odd').addClass('zebraUm');jQuery('table tbody tr:even').addClass('zebraDois')});function shh(){jQuery('#sthd').remove();u='/search?search_terms=any&sort_dir=ASC&search_time=0&show_results=topics&sort_by=2&search_where=-1&search_keywords='+jQuery('input[name=subject]').val();jQuery.get(u,function(d){n='<dd class=dterm>';o=jQuery('h2.topic-title',d);m='</dd>';if(jQuery('h2.topic-title:eq(1)',d).length){l=n+o.eq(0).html()+m}else{return false};if(jQuery('h2.topic-title:eq(2)',d).length){l+=n+o.eq(1).html()+m};if(jQuery('h2.topic-title:eq(3)',d).length){l+=n+o.eq(2).html()+m};if(jQuery('h2.topic-title:eq(4)',d).length){l+=n+o.eq(3).html()+m};if(jQuery('h2.topic-title:eq(5)',d).length){l+=n+o.eq(4).html()+m};if(jQuery('h2.topic-title:eq(6)',d).length){l+=n+o.eq(5).html()+m};if(jQuery('h2.topic-title:eq(7)',d).length){l+=n+o.eq(6).html()+m};if(jQuery('h2.topic-title:eq(8)',d).length){l+=n+o.eq(7).html()+m};jQuery('input[name=subject]').parent().after('<div id=sthd><br><dt><label>Tópicos que podem lhe ajudar:</label></dt>'+l+'</div>')})};function EsconderCategoriaFeitoPorSupero(cid,iflag){var cat=document.getElementById(cid);var button=document.getElementById('b'+cid);if(cat.style.display=='none'){cat.style.display='block';button.className='contract';my_setcookie('_'+cid,'',true)}else{cat.style.display='none';button.className='expand';my_setcookie('_'+cid,'1',true)}}$(function(){x=$('ul.topiclist li.header').get();for(i=0;i<x.length;i++){x[i].style.position='relative';var cid='c'+String(i+1);x[i].parentNode.nextSibling.setAttribute('id',cid);x[i].parentNode.nextSibling.style.display='block';var y='<div id="b'+cid+'" class="contract" onclick="EsconderCategoriaFeitoPorSupero(\''+cid+'\');"></div>';x[i].innerHTML=x[i].innerHTML+y}cookies=document.cookie.split('; ');for(i in cookies){if(cookies[i].charAt(0)=='_'){cookie=cookies[i].split('=');if(cookie[1]=='1'){cid=cookie[0].substring(1);if(document.getElementById(cid)){EsconderCategoriaFeitoPorSupero(cid,'x')}}}}});

va en el css y poner el código

Código:
.contract,.expand{background:url(imagen);cursor:pointer;height:18px;position:absolute;right:10px;top:4px;width:18px}
.contract{background:url(imagen)}

editar estos ángulos height:18px, width:18px y listo

avatar
Administrador
Administrador

Tu Vil Amigo™
avatarTu Vil Amigo™
Administrador
Ver perfil de usuario http://www.15tronos.foroac.org
el Miér 06 Jun 2012, 5:59 pm

esto funciona para todas las versiones?





15-Tronos Diseñamos Tu Foro
Copyright 15-Tronos,©2010-2015-Todos los derechos reservados
avatar
Usuario
Usuario

Angeloid
avatarAngeloid
Usuario
Ver perfil de usuario
el Miér 06 Jun 2012, 8:45 pm

es para phpBB3

avatar
Usuario VIP
Usuario VIP

.Storm
avatar.Storm
Usuario VIP
Ver perfil de usuario
el Jue 07 Jun 2012, 2:46 pm

Gracias por el aporte.

Permisos de este foro:
No puedes responder a temas en este foro.

 
Copyright © 2010 - 15-Tronos.net. All Rights Reserved.