Boas-vindas ao Power Pixel

Junte-se a comunidade! Crie o seu próprio conteúdo, e faça amizades.EntrarCriar uma conta

Problema com meus códigos

+2
JScript
Faraday
6 participantes

Faraday Faraday  • Qui 27 Nov 2014 - 21:36

Problema com meus códigos Empty Problema com meus códigos Qui 27 Nov 2014 - 21:36

Minha questão:
Todos os códigos estavam funcionando normalmente. Passou um tempo e o formulario de resposta rápida bugou e ficou assim:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Sem contar que agora tem vezes que abre um tópico qualquer e não carrega alguns scripts (como o botão de reputação), e as vezes ele re-aparece se der refresh no tópico.
Eu realmente não sei o que aconteceu. =/
Quais arquivos eu tenho que mandar para ajudar?
Obrigado de verdade pela atenção galera!



Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Versão:
PunBB

JScript JScript  • Qui 27 Nov 2014 - 21:42

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 21:42

Olá!

1- Tem certeza de que este fórum [Tens de ter uma conta e sessão iniciada para poderes visualizar este link] é o "oficial seu"?! Pois eu só vi um único tópico e foi o de regras!
2- Qual seria a página do formulário?
3- Se não nos passar o real endereço do seu fórum, fica extremamente difícil lhe ajudar!

JS

DeeW. DeeW.  • Qui 27 Nov 2014 - 21:42

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 21:42

Você poderia nos listar todos os scripts que está a utilizar no momento?

JScript JScript  • Qui 27 Nov 2014 - 21:59

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 21:59

DeeW. escreveu:Você poderia nos listar todos os scripts que está a utilizar no momento?
??? Isso é bem simples de saber, veja os códigos que estão atualmente no fórum dele:
Código:

jQuery(document).ready(function () {
    jQuery('.loginlink').toggle(function () {
        jQuery('.user-dropdown-box').slideToggle('fast')
    }, function () {
        jQuery('.user-dropdown-box').slideUp('fast')
    })
});
$(document).ready(function () {
    if (location.pathname !== '/') {
        $('#right').css('height', '0px');
        $('#content').css('margin-right', '0px')
    }
});
$(function () {
    $('form#quick_reply input[name=\'post\']').click(function () {
        $('<iframe name="replyreload" height="0px" width="0px" frameborder="0"></iframe>').insertBefore('form#quick_reply');
        $('form#quick_reply').attr('target', 'replyreload');
        $('form#quick_reply').submit(function () {
            var t = setTimeout('fmreply()', 100)
        })
    })
});
function fmreply() {
    window.location.reload()
}
jQuery(document).ready(function () {
    jQuery('.module a, .topiclist, .page-title, .statused').each(function () {
        jQuery(this).html(jQuery(this).html().replace(/\[TUTORIAL\]/g, '<span id=\'resol_d\'>TUTORIAL</span>'))
    })
});
$(function () {
    if ($('input#username_reg').length) {
        $('input#username_reg').keyup(function () {
            if ($('#username_reg').attr('value') == '') {
                $('input#username_reg').removeClass('okusername')
            } else {
                url = '/search?mode=searchuser&fieldname=username&search_username=' + encodeURIComponent($('input#username_reg').val());
                $.get(url, function (data) {
                    if ($('select[name=username_list] option', data).val().toLowerCase() == $('input#username_reg').val().toLowerCase()) {
                        $('input#username_reg').removeClass('okusername')
                    } else {
                        $('input#username_reg').addClass('okusername')
                    }
                })
            }
        })
    }
});
jQuery(function () {
    jQuery('#main-content .main .main-head:contains("Informações")').addClass('nvsTopicos')
});
jQuery(document).ready(function () {
    var url = jQuery('.post:first .postmain .postbody .user .user_avatar a img').attr('src');
    jQuery('.teste').attr('src', url);
    var url2 = jQuery('.post:first .postmain .postbody .user .user_avatar a').attr('href');
    jQuery('.teste2').attr('href', url2);
    var url3 = jQuery('.post:first .postmain .postbody .user .user-ident .username').html();
    jQuery('span[itemprop="creator"]').html(url3);
    var url5 = jQuery('.post:first span.data-post').html();
    jQuery('span[itemprop="data_post"]').html(url5)
});
jQuery(function () {
    var sPages = jQuery('.paging');
    if (sPages.length) {
        sPages.html(sPages.html().replace(/<\/a> :/g, '</a> ').replace(/<\/a>, <b>/g, '</a> <b>').replace(/>,.<a/g, '> <a'))
    }
});
$(document).ready(function () {
    $('#main-content').find('div:eq(0)').remove()
});
if (window.location.pathname.indexOf('/u') == 0) {
    $(document).ready(function () {
        var fbcapa = $('#field_id2 .field_uneditable').text();
        $('#pun-visit').before('<div style="width: 100%; height: 315px; position: relative; background: url(' + fbcapa + ') no-repeat center center scroll; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;" id="fbfundo"><div style="position: absolute; left: 0; width: 100%; bottom: 0;"><table id="fbperfil"><tr><td rowspan="3" id="fbavatar"></td><td style="font-size: 16px;" id="fbnome"></td></tr><tr><td style="font-size: 1.4em;" id="fbrank"></td></tr></table></div></div><style>table#fbperfil tbody tr td#fbnome div.h3 {text-transform: none !important;} h1.page-title{font-size:0px!important;height:30px!important;} #main-content p:nth-child(2) {display:none!important;} #profile-advanced-right .module {display:none!important;} #profile-advanced-left {width:100%!important;} #fbperfil { margin-bottom: -33px; margin-left: 13px; } #fbfundo { border: 2px solid #fff; } #fbavatar { border: 4px solid #fff; background-color: white; } #fbavatar img { height: 160px; width: 160px; } #fbnome { padding: 28% 0px 0px 10px; } #fbrank, #fbgrupo { padding: 0px 0 0 10px; } #profile-advanced-layout #tabs { bottom: 0; padding-left: 280px; margin-top: 0px !important; }#profile-advanced-layout #tabs { margin-bottom: -13px !important; margin-left: -10px; } #profile-advanced-details { padding-top: 10px !important; }#fbrank span { margin-bottom: 40px !important; }</style>');
        $('.module:first .main-content img[alt=""]').clone().appendTo($('#fbavatar'));
        $('div#main-content div.module:first .h3:first').clone().appendTo($('#fbnome'));
        $('.module:first .main-content.clearfix.center span').clone().appendTo($('#fbrank'));
        $(function () {
            var fbavatarduplo = [
            ],
            imagemdupla;
            $('#fbfundo img').filter(function () {
                imagemdupla = $(this).attr('src');
                if ($.inArray(imagemdupla, fbavatarduplo) < 0) {
                    fbavatarduplo.push(imagemdupla);
                    return false
                }
                return true
            }).remove()
        });
        $('table#fbperfil tbody tr td#fbnome div.h3').html(function (_, html) {
            return html.replace('(conectado)', '<img alt=\'Conectado\' title=\'Conectado\' src=\'http://i.imgur.com/QglVEGE.png\' />')
        });
        $(function () {
            var tabfbperfil = function () {
                $('#tabs li').click(function (e) {
                    e.preventDefault();
                    var url = this.firstChild.href;
                    if (url == '#') return;
                    $('#profile-advanced-left').load(url + ' #profile-advanced-left', tabfbperfil)
                })
            };
            tabfbperfil()
        })
    })
}
jQuery(document).ready(function () {
    jQuery('a[href="/login"]').attr('href', '/login?redirect=' + encodeURIComponent(location.pathname + location.search))
});
var _0x40a3 = [
    'head',
    'getElementsByTagName',
    'link',
    'createElement',
    'type',
    'text/css',
    'rel',
    'stylesheet',
    'href',
    'http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css',
    'appendChild'
];
var headID = document[_0x40a3[1]](_0x40a3[0]) [0];
var cssNode = document[_0x40a3[3]](_0x40a3[2]);
cssNode[_0x40a3[4]] = _0x40a3[5];
cssNode[_0x40a3[6]] = _0x40a3[7];
cssNode[_0x40a3[8]] = _0x40a3[9];
headID[_0x40a3[10]](cssNode);
$(function () {
    $('.post-entry a, .postbody .content a, .postbody a').html(function (i, html) {
        return html.replace(/(?:https:\/\/)?(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/g, '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>')
    })
});

Código:

$(document).ready(function () {
    $('.statused td.tcl > a.gensmall').after('<br />');
    $('.tcl').each(function () {
        var textR = $(this).html();
        textR = textR.replace(/,/g, '');
        $(this).html(textR)
    })
});

Código:

jQuery(document).on('ready', function () {
    jQuery('.avt_recent').prepend('<div class="avt-r"><div>');
    jQuery('.avt_recent .avt-r').each(function () {
        var profileUserURL = jQuery(this).parent().children('.recent_space').children('a:last').attr('href');
        jQuery(this).html('<a href="' + profileUserURL + '" class="avt-r-enlace"><img src="http://soundmatch.com/uploads/artist/media/no-avatar.gif" alt="No Avatar" /></a>');
        jQuery(this).children('a').load(profileUserURL + ' .module:eq(0) img:eq(0)')
    })
});

Código:

jQuery(document).ready(function () {
    var p = 0,
    amd = 'http://i.imgur.com/uhr3VJe.png',
    noneamd = 'http://i.imgur.com/illaBi9.png';
    jQuery('.main-head.mybb').each(function () {
        jQuery(this).next().attr('id', p);
        jQuery(this).next().css('display', my_getcookie('cat-' + jQuery(this).next().attr('id')));
        jQuery(this).append('<img src="' + amd + '" id="toggle-right" style="cursor:pointer;float: right;margin-top: -15px;"/>');
        jQuery(this).find('#toggle-right').click(function () {
            var i = jQuery(this).closest('.main-head.mybb').next();
            if (i.css('display') == 'none') {
                i.slideToggle();
                jQuery(this).attr('src', amd);
                my_setcookie('cat-' + jQuery(this).closest('.main-head.mybb').next().attr('id'), 'block', 1, 0)
            } else {
                i.slideToggle();
                jQuery(this).attr('src', noneamd);
                my_setcookie('cat-' + jQuery(this).closest('.main-head.mybb').next().attr('id'), 'none', 1, 0)
            }
        });
        p++
    })
});

Agora eu só não sei como isso irá lhe ajudar a ajudá-lo!

JS

DeeW. DeeW.  • Qui 27 Nov 2014 - 22:01

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:01

@Jscript,

sei ver os scripts, mas acharia mais útil ele listar os nomes, do que os códigos!

Faraday Faraday  • Qui 27 Nov 2014 - 22:02

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:02

@JScript - Sim, é o meu fórum. Eu vou colocar para os visitantes visualizarem os tópicos. Perdão.
@DeeW. - Ok, irei listar todos:
Login dropdown (veio com a skin)

Código:
jQuery(document).ready(function() {
 jQuery(".loginlink").toggle(function(){
 jQuery(".user-dropdown-box").slideToggle('fast');
 }, function(){jQuery(".user-dropdown-box").slideUp('fast');});});

Esconde os widgets dentro de um tópico

Código:
$(document).ready(function() {
if (location.pathname !== '/') {
$('#right').css('height','0px');
$('#content').css('margin-right','0px');
}
});

fixo e anuncio

Código:
$(function(){
$('.main-head:contains("Anúncio") + .main-content table td.tcl.tdtopics strong:contains("Fixo"), .main-head:contains("Anúncio") + .main-content table td.tcl.tdtopics strong:contains("Anúncio")').attr('style','background-image: url(http://i.imgur.com/EHGpChd.png);background-color: rgb(123, 166, 13);display: inline-block;height: 16px;line-height: 16px;padding: 0 5px;font-size: 9px;font-weight: bold;text-transform: uppercase;text-shadow: rgba(0,0,0,0.2) 0px -1px 0px;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;background-repeat: repeat-x;background-position: 0 -1px;color: rgb(255, 255, 255);');
});


categorias retrateis

Código:
jQuery(document).ready(function(){var p=0,amd='http://i.imgur.com/uhr3VJe.png',noneamd='http://i.imgur.com/illaBi9.png';jQuery('.main-head.mybb').each(function(){jQuery(this).next().attr('id',p);jQuery(this).next().css('display',my_getcookie('cat-'+jQuery(this).next().attr('id')));jQuery(this).append('<img src="'+amd+'" id="toggle-right" style="cursor:pointer;float: right;margin-top: -15px;"/>');jQuery(this).find('#toggle-right').click(function(){var i=jQuery(this).closest('.main-head.mybb').next();if(i.css('display')=='none'){i.slideToggle();jQuery(this).attr('src',amd);my_setcookie('cat-'+jQuery(this).closest('.main-head.mybb').next().attr('id'),'block',1,0)}else{i.slideToggle();jQuery(this).attr('src',noneamd);my_setcookie('cat-'+jQuery(this).closest('.main-head.mybb').next().attr('id'),'none',1,0)}});p++})});

subforuns na vertical

Código:
$(document).ready(function(){$('.statused td.tcl > a.gensmall').after('<br />');

$('.tcl').each(function(){
var textR = $(this).html();
textR = textR.replace(/,/g, '');
$(this).html(textR);
});});




reputação ipb

Código:
$(document).ready(function() {
//Reputação
$(".pun .post .user").each(function(){
$(this).html($(this).html().replace(/<span class="label/g,'<dd><div class="post_field"><span class="label'));
});
$('.user-info .post_field:contains("Reputação")').each(function() {
var rep = $(this).text().match(/\d+/g);
$(this).attr('style','background-color: rgb(111, 143, 82)!important;background-image: url(http://i38.servimg.com/u/f38/17/31/71/58/highli10.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(255, 255, 255);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;padding: 3px 7px;max-width: 125px;text-align: center;text-shadow: rgba(0, 0, 0, 0.298039) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;');
$(this).append('<span class="title" style="font-weight:normal"></span>');
if(rep == 0) {
        $(this).find('.title').text('Neutro');
        $(this).attr('style','background-color: rgb(153, 153, 153)!important;background-image: url(http://i38.servimg.com/u/f38/17/31/71/58/highli10.png);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-right-radius: 3px;border-bottom-left-radius: 3px;color: rgb(255, 255, 255);font-weight: bold;display: block;margin: 0 auto;margin-bottom: 3px;padding: 3px 7px;max-width: 125px;text-align: center;text-shadow: rgba(0,0,0,0.3) 0px -1px 0px;background-position: 0px 1px;background-repeat: repeat no-repeat;');
}
if(rep >= 1 && rep < 5) {
        $(this).find('.title').text('Iniciante');
}
if(rep >= 5 && rep < 10) {
        $(this).find('.title').text('Membro ativo');
}
if(rep >= 10) {
        $(this).find('.title').text('Excelente');
}
});
});


Código:
var like_version = 'punbb';
var DOM_IS_READY = false;
$(function(){DOM_IS_READY=true;});
var vote_singular = 'Curtir';
var vote_plural = 'Curtiram isso';
$.getScript('http://devarc.forumeiros.com/17333.js');


Código:
function lglike(b,a){var d=a.innerHTML;a.innerHTML="Loading...";a.onclick="#";$.get(b,function(){a.className+=" LGnovote";a.innerHTML=d;var c=a.nextSibling,b=parseInt(/\d+/.exec(c.innerHTML)[0])+1;c.innerHTML=c.innerHTML.replace(/\d+/,b)})};

function init_lg_like_system() {
    var x = $('.vote');
    for (var i = 0, l = x.length; i < l; i++) {
        var vote = x[i],
            count = 0,
            plus = 0;
        var bar = $('.vote-bar', vote)[0];
        var button = $('.vote-button', vote)[0];
        if (bar) {
            var info = bar.title.match(/\d+/g);
            count = info[0];
            var percent = info[1];
            plus = Math.round(parseInt(percent) * parseInt(count)) / 100;
        }
        button = button ? '<span onclick="lglike(\'' + button.firstChild.href + '\',this);" class="LGlike">' + vote_singular + '</span>' : '<span class="LGlike LGnovote">' + vote_singular + '</span>';

        var votes_text = '<span class="LGlikecount">' + plus + ' ' + (plus == 1 ? vote_singular : vote_plural) + '</span>';

        if (like_version === 'phpbb3' || like_version === 'PHPBB3') {
            $('.corners-bottom', vote.parentNode.parentNode)
        .before('<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>');
        } else if (like_version === 'invision' || like_version === 'Invision' || like_version === 'INVISION') {
            $(vote.parentNode.parentNode.parentNode.nextSibling.lastChild)
        .prepend('<li><div class="LGvote">' + button + votes_text + '</div></li>');
        } else if (like_version === 'punbb' || like_version === 'PUNBB') {
            $('.entry-content', vote.parentNode.parentNode.parentNode.parentNode)
        .before('<div class="LGvote" style="float:right;">' + button + votes_text + '</div>');
        }
          else if (like_version === 'PHPBB2' || like_version === 'phpbb2') {
            $('td.post tr:last')
        .append('</br></br><div class="LGvote" style="margin:3px">' + button + votes_text + '</div>');
        }
    }
x.remove();
};

if (DOM_IS_READY == true) {
    init_lg_like_system();
} else {
    $(function () {
        init_lg_like_system();
    });
}


higlight code

Código:
jQuery(function () {
    var sCSS = '<style>' + '/***' + '* Syntax Highlighter funtionality for Forumotion!' + '* CSS: .codebox dd.cont_code' + '* (c) http://balupton.github.io' + '* Version: 1.28082013-jq1.9.1' + '* Made by JScript - 2013/12/16' + '*/' + 'code.punbb_block, pre.punbb_block {' + '  background-color: #FAFAFA !important;' + '  border: 1px solid #C9C9C9 !important;' + '  color: #000000;' + '  font-family: Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace !important;' + '  font-size: 11px !important;' + '  line-height: 110% !important;' + '  max-height: 250px !important;' + '  overflow: auto !important;' + '  padding: 5px !important;' + '  white-space: pre-wrap !important;' + '  width: auto !important;' + '}' + '.punbbtop {' + '  background-color: #ddd !important;' + '  color: #1D3652;' + '  font-size: 10px;' + '  font-weight: bold;' + '  line-height: 100%;' + '  margin-top: 5px;' + '  padding: 2px 1px 2px 3px;' + '}' + '.punbbtop button {' + '  background: #fff;' + '  border: 1px solid #ddd;' + '  border-radius: 0px;' + '  color: #1D3652;' + '  cursor: pointer;' + '  display: inline-block;' + '  font-size: 10px;' + '  padding: 0 6px;' + '  text-decoration: none;' + '}' + '.punbbtop button:hover {' + '  background: -moz-linear-gradient(center top , #DFDFDF 5%, #EDEDED 100%) repeat scroll 0 0 #DFDFDF;' + '  border-color: #9A9A9A;' + '  color: #3D70A3;' + '}' + '.punbbtop button:active {' + '  position: relative;' + '  top: 1px;' + '}' + 'pre.punbb_block.expand, code.punbb_block.expand {' + '  max-height: 100% !important;' + '}' + '.prettyprint ol.linenums {' + '  padding-left: 35px !important;' + '}' + '</style>';
    document.head.insertAdjacentHTML('beforeEnd', sCSS);
    if (jQuery('.cont_code').length) {
        var tagCode = jQuery('.cont_code')
    } else {
        if (jQuery('.cont_code').length) {
            var tagCode = jQuery('.code')
        } else {
            var tagCode = jQuery('code')
        }
    }
    tagCode.each(function (key) {
        var sContent = jQuery(this).html();
        var codebox = jQuery(this).parent().parent();       
        codebox.before('<div class="punbbtop">Código        <button onclick="punbbExpand(this); return false;">Expandir</button><button style="display: none" onclick="punbbCollapse(this); return false;">Diminuir</button>  <button onclick="punbbSelect(this); return false;">Selecionar</button> <button class="punbb-copy" data-clipboard-target="codebox-' + key + '">Copiar</button> <button onclick="punbbPopup(this); return false;">Pop-up</button>  </div><pre class="highlight punbb_block">' + sContent + '</pre>');
        codebox.prev().attr('id', 'codebox-' + key);
        codebox.remove()
    });
    jQuery.getScript('http://balupton.github.io/jquery-syntaxhighlighter/scripts/jquery.syntaxhighlighter.min.js', function () {
        jQuery.SyntaxHighlighter.init({
            'wrapLines': false
        })
    })
});

function punbbExpand(oThis) {
    jQuery(oThis).css('display', 'none');
    jQuery(oThis).next().css('display', '');
    jQuery(oThis).parent().next('pre.punbb_block').addClass('expand')
}

function punbbCollapse(oThis) {
    jQuery(oThis).css('display', 'none');
    jQuery(oThis).prev().css('display', '');
    jQuery(oThis).parent().next('pre.punbb_block').removeClass('expand')
}

function punbbPopup(oThis) {
    var content = jQuery(oThis).parent().next('pre.punbb_block').html();
    var my_window = window.open("", "PunBB code - Para selecionar o código: [Ctrl] + [A]", "scrollbars=1toolbar=no,menubar=no,personalbar=no,status=0,left=0,location=0,menubar=0,top=0,width=640,height=480");
    my_window.document.write('<pre>' + content + '</pre>')
}

function punbbAbout(oThis) {
    alert('Simple code to add Syntax Highlighter fuctionality for Forumotion\n\nBy JScript FROM Brazil - 2013/12/16\n')
}

function punbbSelect(oThis) {
    var doc = document;
    var text = jQuery(oThis).parent().next('pre.punbb_block')[0];
    if (doc.body.createTextRange) {
        var range = doc.body.createTextRange();
        range.moveToElementText(text);
        range.select()
    } else if (window.getSelection) {
        var selection = window.getSelection();
        var range = doc.createRange();
        range.selectNodeContents(text);
        selection.removeAllRanges();
        selection.addRange(range)
    }
}

$(function() {
    var deferreds;
    deferreds    = [];
    if (typeof ZeroClipboard === 'undefined') {
        deferreds.push($.getScript('http://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.0.0-beta.5/ZeroClipboard.min.js'));
    }
    $.when.apply(null, deferreds).then(function() {
        var client;
        ZeroClipboard.config({swfPath: 'http://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.0.0-beta.5/ZeroClipboard.swf'});
        client = ZeroClipboard($('.punbb-copy'));
    });
});

topicos populares

Código:
$(function() {
    var x = $('.vote');
    for (var i = 0, l = x.length; i < l; i++) {
        var v = x[i],
            count = 0,
            plus = 0;
        var barra = $('.vote-bar', v)[0];
        var button = $('.vote-button', v)[0];
        if (barra) {
            var info = barra.title.match(/\d+/g);
            count = info[0];
            var percent = info[1];
            value = Math.round(parseInt(percent) * parseInt(count)) / 100;
        }
  if(value >= 5) {
    pop = '<p class="popular_post"><img src="http://imgur.com/hds8Nup.png"><br>POPULAR</p>';
    x.after(pop);
  }
  }
});

paginação sem virgula

Código:
jQuery(function() {
    var sPages = jQuery('.paging');
  if (sPages.length) {
      sPages.html(sPages
        .html()
        .replace(/<\/a> :/g, '<\/a> ')
        .replace(/<\/a>, <b>/g, '</a> <b>')
        .replace(/>,.<a/g, '> <a')
      );
  };
});


prefixos 

Código:
jQuery(document).ready(function(){jQuery(".module a, .topiclist, .page-title, .statused").each(function(){jQuery(this).html(jQuery(this).html().replace(/\[TUTORIAL\]/g,'<span id=\'resol_d\'>TUTORIAL</span>'))})});

verificar a existencia do nome de usuario

Código:
$(function(){if($('input#username_reg').length){$('input#username_reg').keyup(function(){if($('#username_reg').attr('value')==''){$('input#username_reg').removeClass('okusername')}else{url='/search?mode=searchuser&fieldname=username&search_username='+encodeURIComponent($('input#username_reg').val());$.get(url,function(data){if($('select[name=username_list] option',data).val().toLowerCase()==$('input#username_reg').val().toLowerCase()){$('input#username_reg').removeClass('okusername')}else{$('input#username_reg').addClass('okusername')}})}})}});

citação rapida

Código:
/***
* Quote in the quiqk reply textarea! For new editor text.
* Version: 1.12132013-jq1.9.1
* Made by JScritp at http://ajuda.forumeiros.com - 2013/12/13
*/
$(window).load(function() {
    jQuery('a[href*="mode=quote"]').click(function () {
        var datahref = $(this).attr('href');
        jQuery.get(datahref , function (data) {
            var datatext = jQuery(data).find('#text_editor_textarea[name="message"]').val();
            text_area = jQuery("#text_editor_textarea");
            if ( text_area.next('.sceditor-container').length ) {
                text_area.sceditor('instance').val(datatext);
            } else {
                text_area.val(datatext);
            }
        }).done(function(){
            jQuery('html,body').animate({
                scrollTop: jQuery('#quick_reply').offset().top
            }, 1200);
        }).fail(function(){
            alert('Atenção!\n\n Ocorreu um erro ao [Citar] o post, aguarde 10 segundos e tente novamente!');
        });
        return false;
    });
});

Faraday Faraday  • Qui 27 Nov 2014 - 22:02

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:02


perfil forumeiros

Código:
// FOTO DE CAPA
    if (window.location.pathname.indexOf('/u') == 0) {
        $(document).ready(function() {
            // Link Imagem Capa
            var fbcapa = $('#field_id2 .field_uneditable').text(); // Local onde coloca a ID do campo
            // Estrutura geral
            $('#pun-visit').before('<div style="width: 100%; height: 315px; position: relative; background: url(' + fbcapa + ') no-repeat center center scroll; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;" id="fbfundo"><div style="position: absolute; left: 0; width: 100%; bottom: 0;"><table id="fbperfil"><tr><td rowspan="3" id="fbavatar"></td><td style="font-size: 16px;" id="fbnome"></td></tr><tr><td style="font-size: 1.4em;" id="fbrank"></td></tr></table></div></div><style>table#fbperfil tbody tr td#fbnome div.h3 {text-transform: none !important;} h1.page-title{font-size:0px!important;height:30px!important;} #main-content p:nth-child(2) {display:none!important;} #profile-advanced-right .module {display:none!important;} #profile-advanced-left {width:100%!important;} #fbperfil { margin-bottom: -33px; margin-left: 13px; } #fbfundo { border: 2px solid #fff; } #fbavatar { border: 4px solid #fff; background-color: white; } #fbavatar img { height: 160px; width: 160px; } #fbnome { padding: 28% 0px 0px 10px; } #fbrank, #fbgrupo { padding: 0px 0 0 10px; } #profile-advanced-layout #tabs { bottom: 0; padding-left: 280px; margin-top: 0px !important; }#profile-advanced-layout #tabs { margin-bottom: -13px !important; margin-left: -10px; } #profile-advanced-details { padding-top: 10px !important; }#fbrank span { margin-bottom: 40px !important; }</style>');
            // Avatar
            $('.module:first .main-content img[alt=""]').clone().appendTo($('#fbavatar'));
            // Nome
            $('div#main-content div.module:first .h3:first').clone().appendTo($('#fbnome'));
            // Rank
            $('.module:first .main-content.clearfix.center span').clone().appendTo($('#fbrank'));
            // Prevenir avatares duplos para usuários sem imagem de rank
            $(function() {
                var fbavatarduplo = [],
                    imagemdupla;
                $("#fbfundo img").filter(function() {
                    imagemdupla = $(this).attr("src");
                    if ($.inArray(imagemdupla, fbavatarduplo) < 0) {
                        fbavatarduplo.push(imagemdupla);
                        return false;
                    }
                    return true;
                }).remove();
            });
            // Ícone online automático
            $("table#fbperfil tbody tr td#fbnome div.h3").html(function(_, html) {
                return html.replace("(conectado)", "<img alt='Conectado' title='Conectado' src='http://i.imgur.com/QglVEGE.png' />")
            });
            // Tabs sem refresh para evitar erros na foto de capa
            $(function() {
                var tabfbperfil = function() {
                    $('#tabs li').click(function(e) {
                        e.preventDefault();
                        var url = this.firstChild.href;
                        if (url == '#') return;
                        $('#profile-advanced-left').load(url + ' #profile-advanced-left', tabfbperfil);
                    });
                };
                tabfbperfil();
            });
        });
    }


redirecionar pra ultima pagina antes do log in

Código:
jQuery(document).ready(function(){jQuery('a[href="/login"]').attr('href','/login?redirect='+encodeURIComponent(location.pathname+location.search))});

ultimos assustos com miniaturas

Código:
jQuery(document).on('ready', function() {
    jQuery('.avt_recent').prepend('<div class="avt-r"><div>');
    jQuery('.avt_recent .avt-r').each(function () {
    var profileUserURL = jQuery(this).parent().children('.recent_space').children('a:last').attr('href');
    jQuery(this).html('<a href="' + profileUserURL + '" class="avt-r-enlace"><img src="http://soundmatch.com/uploads/artist/media/no-avatar.gif" alt="No Avatar" /></a>');
    jQuery(this).children('a').load(profileUserURL + ' .module:eq(0) img:eq(0)')
    });
    });

nicks personalizados com icones

Código:
var _0x40a3=["\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x6C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x72\x65\x6C","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x6E\x65\x74\x64\x6E\x61\x2E\x62\x6F\x6F\x74\x73\x74\x72\x61\x70\x63\x64\x6E\x2E\x63\x6F\x6D\x2F\x66\x6F\x6E\x74\x2D\x61\x77\x65\x73\x6F\x6D\x65\x2F\x34\x2E\x30\x2E\x33\x2F\x63\x73\x73\x2F\x66\x6F\x6E\x74\x2D\x61\x77\x65\x73\x6F\x6D\x65\x2E\x6D\x69\x6E\x2E\x63\x73\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64"];var headID=document[_0x40a3[1]](_0x40a3[0])[0];var cssNode=document[_0x40a3[3]](_0x40a3[2]);cssNode[_0x40a3[4]]=_0x40a3[5];cssNode[_0x40a3[6]]=_0x40a3[7];cssNode[_0x40a3[8]]=_0x40a3[9];headID[_0x40a3[10]](cssNode);


videos do youtube com auto embed

Código:
$(function () {
    // Auto youtube transform
    // Hancki - FdF
    $('.post-entry a, .postbody .content a, .postbody a').html(function (i, html) {
        return html.replace(/(?:https:\/\/)?(?:http:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?(.+)/g, '<iframe width="420" height="345" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>');
    });
});


titulo com com avatar

Código:
jQuery(document).ready(function() {
  var url=jQuery('.post:first .postmain .postbody .user .user_avatar a img').attr('src');
  jQuery('.teste').attr('src',url);
  var url2=jQuery('.post:first .postmain .postbody .user .user_avatar a').attr('href');
  jQuery('.teste2').attr('href',url2);
  var url3=jQuery('.post:first .postmain .postbody .user .user-ident .username').html();
  jQuery('span[itemprop="creator"]').html(url3);
  var url5=jQuery('.post:first span.data-post').html();
  jQuery('span[itemprop="data_post"]').html(url5);
});

double post 

Código:
$(document).ready(function() {
    var LASTPOSTING = $('.post:last').find('.username > a').text();
    var USERNAME = _userdata["username"];
if(LASTPOSTING == USERNAME) {
$('head').append(
'<style type="text/css">' +
 '.warn_merge {' +
 '  background: #f3e3e6 url(http://i.imgur.com/Hkdx7rb.png) repeat-x 0 0;' +
 '  color: #80001c;' +
 '  padding: 10px;' +
 '  border: 1px solid #e599aa;' +
 '  text-shadow: rgba(255,255,255,0.55) 0px 1px 0px;' +
 '  line-height: 1.6;' +
 '  font-size: 12px;' +
 '  -webkit-box-shadow: rgba(0,0,0,0.1) 0px 1px 3px;' +
 '  -moz-box-shadow: rgba(0,0,0,0.1) 0px 1px 3px;' +
 '  box-shadow: rgba(0,0,0,0.1) 0px 1px 3px;' +
 '}' +
'</style>'
);
    var texto = '<div class="warn_merge"><strong>Atenção:</strong> Nosso sistema identificou que você fez a última postagem deste tópico, seu novo post será mesclado com o seu último.</div>';

    $('#quick_reply').prepend(texto);

    $('input[name="post"]').click(function(d) {
        d.preventDefault();
        var link = $('.post:last a[href*="mode=editpost"]').attr('href');
      $.get(link, function(e) {
         var newVal = $('#text_editor_textarea').sceditor('instance').val();
      if(newVal == 0) {
          alert("Seu post está vazio");
      } else {
          var currentVal = $('#text_editor_textarea[name="message"]', e).val();
          $.post(link, {
            'message': currentVal+'\n\n[hr]\n'+newVal,
            'post': 'submit',
            'subject': 'teste'
          }, function(e) {    
          var href = $(e).find('.message a:first').attr('href');
          location.href = href;
         });
         $('#text_editor_textarea').sceditor('instance').val('');
      }
      });
    });
}
});

@JScript - Não é em um tópico especifico, é em todos os tópicos este problema.


Última edição por Faraday em Qui 27 Nov 2014 - 22:06, editado 1 vez(es)

JScript JScript  • Qui 27 Nov 2014 - 22:05

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:05

DeeW. escreveu:sei ver os scripts, mas acharia mais útil ele listar os nomes, do que os códigos!
Pior ainda!: O nome que é dado no painel de controle aos códigos adicionados, pode ser qualquer nome que o admin queira dar!!!

Se você lendo a dúvida dele e a minha postagem e mesmo assim não compreendeu o problema, como vai resolver desejando apenas ver o nome dos códigos que ele tem adicionado???

Mas tudo bem, vamos aguardar ele responder nossas perguntas...

JS

DeeW. DeeW.  • Qui 27 Nov 2014 - 22:12

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:12

Nossa!

Percebi este mesmo problema no fórum do Je4n e no momento estava utilizando o navegador Firefox, poderia qual navegador está utilizando?

Até Mais, e JScript, poucos colocam nomes que não tem haver com o código...

Faraday Faraday  • Qui 27 Nov 2014 - 22:17

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:17

Testei no Chrome, Safari e no Firefox.

JScript JScript  • Qui 27 Nov 2014 - 22:45

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:45

Faraday escreveu:Testei no Chrome, Safari e no Firefox.
Amigo, eu vi um erro bem intrigante, veja nesta imagem:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Essas funções são referentes ao arquivo JavaScript da própria Forumeiros, não está relacionado com nenhum código seu!!!

Mas verifique como andam as imagens que por ventura você trocou no painel de controle em relação aos botões, pois incluem o de citar e multi citar...

JS

Faraday Faraday  • Qui 27 Nov 2014 - 22:52

Problema com meus códigos Empty Re: Problema com meus códigos Qui 27 Nov 2014 - 22:52

Muito obrigado pela atenção JScript, mas eu realmente não sei como solucionar. Uma vez que é provavel que a skin ja tenha vindo dessa forma, ja que eu somente fiz algumas mudanças no CSS e adicionei alguns códigos JS.
Como eu poderia solucionar isso?

[F]lames [F]lames  • Sex 28 Nov 2014 - 8:20

Problema com meus códigos Empty Re: Problema com meus códigos Sex 28 Nov 2014 - 8:20

Reputação da mensagem: 100% (1 votos)
Olá!

O erro do objeto _atc é no template viewtopic_body basta ir até ele e colocar isso no começo:
Código:
<script type="text/javascript">if(typeof(_atc) == "undefined") {
_atc = {};
}</script>

Faraday Faraday  • Sex 28 Nov 2014 - 11:48

Problema com meus códigos Empty Re: Problema com meus códigos Sex 28 Nov 2014 - 11:48

Flames o carregamento da pagina ficou normal, porem, a resposta rapida ainda esta da mesma forma.
Muito obrigado!

Faraday Faraday  • Sáb 29 Nov 2014 - 16:42

Problema com meus códigos Empty Re: Problema com meus códigos Sáb 29 Nov 2014 - 16:42

Olá gente, ainda não consegui encontrar a solução para o meu problema. O que devo fazer?
Obrigado, e desculpa pelo dual post.

[F]lames [F]lames  • Dom 30 Nov 2014 - 8:47

Problema com meus códigos Empty Re: Problema com meus códigos Dom 30 Nov 2014 - 8:47

Olá!

Em seu fórum encontrei estes dois erros:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Pelo que parece um é causado pelo outro, então vá até seu template viewtopic_body e altere o código que te passei para este:
Código:
<script type="text/javascript">if(typeof(_atc) == "undefined") {
_atc = new Object();
}</script>

JScript JScript  • Dom 30 Nov 2014 - 9:28

Problema com meus códigos Empty Re: Problema com meus códigos Dom 30 Nov 2014 - 9:28

Se após a sugestão do @[F]lames não surtir efeito algum, experimente trocar no template o código inicial por este:
Código:

<script type="text/javascript">//<![CDATA[
var multiquote_img_off = '{JS_MULTIQUOTE_IMG_OFF}', multiquote_img_on = '{JS_MULTIQUOTE_IMG_ON}', _atr = '{JS_DIR}addthis/', _ati = '{PATH_IMG_FA}addthis/'{ADDTHIS_LANG}, addthis_localize = { share_caption: "{L_SHARE_CAPTION}", email: "{L_EMAIL}", email_caption: "{L_EMAIL_CAPTION}", favorites: "{L_SHARE_BOOKMARKS}", print: "{L_PRINT}", more: "{L_MORE}" };
$(function(){

    if(typeof(_atc) == "undefined") {
        _atc = { };
    }

    _atc.cwait = 0;
    $('.addthis_button').mouseup(function(){
        if ($('#at15s').css('display') == 'block') {
            addthis_close();
        }
    });
});

var hiddenMsgLabel = { visible:'{JS_HIDE_HIDDEN_MESSAGE}', hidden:'{JS_SHOW_HIDDEN_MESSAGE}' };
showHiddenMessage = function(id)
{
    try
    {
        var regId = parseInt(id, 10);
        if( isNaN(regId) ) { regId = 0; }
       
        if( regId > 0)
        {
            $('.post--' + id).toggle(0, function()
         {
            if( $(this).is(":visible") )
            {
               $('#hidden-title--' + id).html(hiddenMsgLabel.visible);
            }
            else
            {
               $('#hidden-title--' + id).html(hiddenMsgLabel.hidden);
            }
         });
        }
    }
    catch(e) { }
   
   return false;
};

//]]>
</script>
Isso ocorreu devido a atualizações no código do template padrão e o seu template ainda é o anterior, por causa da Skin.

JS

Faraday Faraday  • Qui 4 Dez 2014 - 6:33

Problema com meus códigos Empty Re: Problema com meus códigos Qui 4 Dez 2014 - 6:33

@JScript - funcionou perfeitamente, porem, somente para os administradores. Membros ainda veem o "resposta rapida" da mesma forma bugada. Como devo proceder?
Muito obrigado pela atenção!

JScript JScript  • Qui 4 Dez 2014 - 12:14

Problema com meus códigos Empty Re: Problema com meus códigos Qui 4 Dez 2014 - 12:14

Reputação da mensagem: 100% (1 votos)
Olá!

Eu vou simular esse problema em meu fórum de testes ai lhe retorno ok? Vou marcar esse tópico e você o mantenha ativo!

JS

Faraday Faraday  • Qui 4 Dez 2014 - 17:57

Problema com meus códigos Empty Re: Problema com meus códigos Qui 4 Dez 2014 - 17:57

Muito obrigado pela atenção @JScript. 
Para manter ativo é só postar? Mas como posso postar sem floodar?
Obrigado pela atenção Very Happy

JScript JScript  • Dom 7 Dez 2014 - 11:31

Problema com meus códigos Empty Re: Problema com meus códigos Dom 7 Dez 2014 - 11:31

Basta postar uma única vez por dia!


Mas eu estou atento ao tópico pois este problema está acontecendo em vários fóruns...


JS

Cepheus Cepheus  • Dom 7 Dez 2014 - 12:09

Problema com meus códigos Empty Re: Problema com meus códigos Dom 7 Dez 2014 - 12:09

Reputação da mensagem: 100% (1 votos)
Eu fiz uma analise básica, 
E geralmente esse erro acontece com relação ao jquery, se o mesmo não existir ou estiver com endereço errado esse erro acontecerá, 
porem reparei que no seu caso está normal em relação a isso.
Então para ver se o problema estava diretamente em alguma modificações da skin fiz alguns testes nela, e o funcionamento da mesma está normal.
A minha ideia é que você baixe a skin novamente e em outra conta de teste instale ela.
E vai jogando as modificações da skin com problema para a skin de testes.

Talvez esse seja o processo mais rápido, pelo menos até que eu faça uma analise mais profunda.
Então vou pedir para postar esses dois arquivos para que eu possa analisar:
viewtopic_body
posting_body

Faça isso e depois retorne.
Até!

Faraday Faraday  • Ter 9 Dez 2014 - 11:54

Problema com meus códigos Empty Re: Problema com meus códigos Ter 9 Dez 2014 - 11:54

[Tens de ter uma conta e sessão iniciada para poderes visualizar este link] - Eu fiz o que você falou, e eu fui colocando código por código. Ai eu coloquei um de "ver quantos estavam no tópico" ai bugou. Eu removi na esperança que voltasse ao normal, mas não voltou.

Faraday Faraday  • Qua 17 Dez 2014 - 21:55

JScript JScript  • Qui 18 Dez 2014 - 7:14

Problema com meus códigos Empty Re: Problema com meus códigos Qui 18 Dez 2014 - 7:14

Olá!

Eu não consegui simular esse problema, mas fiquei sabendo que é devido a template modificado e que não foi atualizado, neste caso você deverá substituir esse template pelo padrão (não editado) e em seguida refazer as alterações dele.

JS

Conteúdo patrocinado  • 

Problema com meus códigos Empty Re: Problema com meus códigos

Permissões neste sub-fórum
Não podes responder a tópicos