Como colocar postagem em verde

3 participantes

Ver o tópico anterior Ver o tópico seguinte Ir para baixo

Tópico resolvido Como colocar postagem em verde

Mensagem por Higor_Forever 25.10.14 17:02

  • Descrição:
Olá pessoal,

queria saber, como colocar esse efeito : https://i.imgur.com/Mx1uwOb.png nas postagens.


Só que eu quero que só os administradores e os moderadores podem postar isso.

Obrigado

  • Informações:
Fórum:http://highdesign-forum.forumeiros.com/Versão:PHPBB3
Tipo:Pedido de códigoTags:colocar,postagem,verde

Higor_Forever

Higor_Forever
****

Membro desde : 17/07/2013
Mensagens : 371
Pontos : 570

http://highdesign-forum.forumeiros.com

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar postagem em verde

Mensagem por Shaman 25.10.14 17:22

Olá, encontrei um bem "próximo" do que está procurando. Segue os códigos:

No final de sua folha de CSS adicione o código abaixo:

Código:
.quadrado_box {
margin: 10px;  
position: relative;
left: 34px;  
-moz-border-radius: 6px;
-moz-box-shadow: 0 0 6px #888;
-webkit-border-radius: 6px;
background: #fff url(http://i.imgur.com/pHlgWAW.jpg) repeat;
border-top: 10px solid #000000;
box-shadow: 0 0 6px #888;
font-style: normal;
font-weight: 400;
padding: 10px;
width: 90%;
}

.sucesso {
background-image: url(http://i.imgur.com/3EFjXBK.png);
background-repeat: no-repeat;
background-position: 99% 5px;  
background-color: #EEF4D4;
border: 2px solid #8FAD3D;
color: #596C26;  
-moz-box-shadow: 0 0 6px #567501;
-webkit-box-shadow: 0 0 6px #567501;  
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
box-shadow: 0 0 6px #567501;
font-size: 13px;
font-style: normal;
font-weight: 400;
left: 34px;
margin: 10px;
padding: 13px;
position: relative;
width: 85%;
}

.alerta {
background-image: url(http://i.imgur.com/USIRclN.png);
background-position: 99% 5px;
background-repeat: no-repeat;  
background-color: #EFCEC9;
border: 2px solid #AE3F2F;
color: #933628;  
-moz-box-shadow: 0 0 6px #831303;
-webkit-box-shadow: 0 0 6px #831303;  
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
box-shadow: 0 0 6px #831303;
font-size: 13px;
font-style: normal;
font-weight: 400;
left: 34px;
margin: 10px;
padding: 13px;
position: relative;
width: 85%;  
}

.aviso {
background-image: url(http://i.imgur.com/eSrBDup.png);
background-position: 99% 5px;
background-repeat: no-repeat;  
background-color: #FFEA97;
border: 2px solid #E1B500;
color: #796100;  
-moz-box-shadow: 0 0 6px #917502;
-webkit-box-shadow: 0 0 6px #917502;  
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
box-shadow: 0 0 6px #917502;
font-size: 13px;
font-style: normal;
font-weight: 400;
left: 34px;
margin: 10px;
padding: 13px;
position: relative;
width: 85%;  
}

.infos {
background-image: url(http://i.imgur.com/4hX2mwV.png);
background-position: 99% 5px;
background-repeat: no-repeat;  
background-color: #C6D8F0;
border: 2px solid #4381CD;
color: #285797;  
-moz-border-radius: 6px;
-moz-box-shadow: 0 0 6px #08458F;
-webkit-border-radius: 6px;
-webkit-box-shadow: 0 0 6px #08458F;
border-radius: 6px;
box-shadow: 0 0 6px #08458F;
font-size: 13px;
font-style: normal;
font-weight: 400;
left: 34px;
margin: 10px;
padding: 13px;
position: relative;
width: 85%;
}
.conteudo2 {
font-family: cursive;
font-size: 12px;
font-style: italic;
text-align: left;
width: 90%;
}  
.fonte {
font-family: cursive;  
font-size: 15px;
margin-bottom: 20px;
}


Crie uma folha Javascript com investimento em todas as páginas:

Código:
jQuery(document).ready(function(){jQuery('.postbody table,div.sig-content table').css('position','').css('display','').css('z-index','999').css('min-width','1px').css('min-height','1px').css('max-height','1500px').css('max-width','1500px').css('cursor','')});function selectCode(a){var e=a.parentNode.parentNode.getElementsByTagName('CODE')[0];if(window.getSelection){var s=window.getSelection();if(s.setBaseAndExtent){s.setBaseAndExtent(e,0,e,e.innerText.length-1)}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)=='<BR>'){e.innerHTML=e.innerHTML+' '}var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else if(document.getSelection){var s=document.getSelection();var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}else if(document.selection){var r=document.body.createTextRange();r.moveToElementText(e);r.select()}}if(text){}else{var text='Selecionar todos'}jQuery(document).ready(function(){jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Código: (<a href="#" onclick="selectCode(this); return false;">Selecionar conteúdo</a>)')});(function(){var f={bbcodes:{},basics:[],attrReg:/.*?=("|'|)(.*?)\1\]/,parseTag:function(a,b,d){return a.replace(d?RegExp("(\\["+b.tag+"[^\\]]*\\])((?:.|\\r?\\n)*?)\\[/"+b.tag+"]","g"+(b.insensitive?"i":"")):RegExp("\\["+b.tag+"[^\\]]*\\]","g"+(b.insensitive?"i":"")),function(a,c,e){d||(c=a);c=f.attrReg.test(c)?c.replace(f.attrReg,"$2"):b.defaultAttr;if(b.validate&&!(d?b.validate(e,c):b.validate(c)))return a;b.replace&&(a=d?b.replace(e,c):b.replace(c),"string"===typeof a?d?e=a:c=a:a&&"object"===typeof a&&(e=a.content||e,c=a.attr||c));return f.swapReplacers(b.replacement,e,c)})},swapReplacers:function(a,b,d){return(a||"").replace(/{CONTENT}/g,b||"").replace(/{ATTR}/g,d||"")},parse:function(a){for(var b=f.bbcodes,d=f.basics,g=0,c;c=d[g++];){var e=c[0];if("string"===typeof e)for(;-1!==a.indexOf(e);)a=a.replace(e,c[1]);else a=a.replace(e,c[1])}for(var h in b)(d=b[h])&&(d.replacement&&d.tag)&&(a=f.parseTag(a,d,d.close));return a},add:function(a,b){if(!/^\w+$/.test(a))throw new Exception("MBB Tag invalida: "+a);b.tag||(b.tag=a);"close"in b||(b.close=!1);f.bbcodes[a]=b},addSwap:function(a,b){f.basics.push([a,b])}};window.MBB=f})();$(function(){var p=$('.post .entry-content , .a3d_1 .a3d_1_content');for(var i=0,e;(e=p[i++]);){var text=e.innerHTML;text=MBB.parse(text);e.innerHTML=text}});MBB.add('offtopic',{close:true,replacement:'<div style="padding: 3px; float: right; border: 1px solid; font-size: 0.8em">Off Topic: {CONTENT}</div>'});MBB.add('sucesso',{close:true,replacement:'<div class="sucesso"><h5 class="fonte">{ATTR}</h5><p class="conteudo2">{CONTENT}</p><span></span></div>'});MBB.add('aviso',{close:true,replacement:'<div class="aviso"><h5 class="fonte">{ATTR}</h5><p class="conteudo2">{CONTENT}</p><span></span></div>'});MBB.add('infos',{close:true,replacement:'<div class="infos"><h5 class="fonte">{ATTR}</h5><p class="conteudo2">{CONTENT}</p><span></span></div>'});MBB.add('alerta',{close:true,replacement:'<div class="alerta"><h5 class="fonte">{ATTR}</h5><p class="conteudo2">{CONTENT}</p><span></span></div>'});MBB.add('twitter',{close:true,replacement:'@<a href="http://www.twitter.com/{CONTENT}">{CONTENT}</a>'});MBB.add('quadrado',{close:true,replacement:'<div class="quadrado_box"><h5 class="fonte">{ATTR}</h5><p class="conteudo2">{CONTENT}</p><span></span></div>'});MBB.add('guest',{close:true,replacement:'<span class="guest">{CONTENT}</span>',replace:function(content){if(!document.getElementById('logout'))return'Existe um conteúdo oculto, para visualizar deixe uma mensagem.<br /><br />* Este recurso só pode ser colocado em certas áreas do fórum, veja as regras para mais detalhes.';return content}});jQuery(document).ready(function(){if(jQuery('.pun-crumbs p.crumbs strong:last').text()=='Membros'){jQuery('ul.ipsList_inline li#nav_app_forums').toggleClass('active');jQuery('ul.ipsList_inline li#nav_app_members').toggleClass('active')}if(jQuery('.pun-crumbs p.crumbs strong:last').text()=='» Calendário'){jQuery('ul.ipsList_inline li#nav_app_forums').toggleClass('active');jQuery('ul.ipsList_inline li#nav_app_calendar').toggleClass('active')}if(jQuery('#content table.portal').length){jQuery('ul.ipsList_inline li#nav_app_forums').toggleClass('active');jQuery('ul.ipsList_inline li#nav_home').toggleClass('active')}});$(function(){var x=$('#left')[0];var y=$('#right')[0];$(y).find('.module .main-content a[href^="/t"]').each(function(){var linkavt=$(this).next().next().attr('href');var titleavt=$(this).next().next().text();$(this).prepend('<a href="'+linkavt+'" title="'+titleavt+'"></a>');$(this).children('a').load(linkavt+'#profile-advanced-right .module:eq(0) img:eq(0)',function(){$(this).children('img').attr('class','avt-wid')});$(this).find('a[href^="/u"]').insertBefore($(this))})});jQuery(function(){jQuery('a[href*="/post?f=14&mode=newtopic"]').attr('href','/h1-');jQuery('a[href*="/post?f=4&mode=newtopic"]').attr('href','/h14-');jQuery('a[href*="/post?f=3&mode=newtopic"]').attr('href','/h7-');jQuery('a[href*="/post?f=20&mode=newtopic"]').attr('href','/h17-');jQuery('a[href*="/post?f=31&mode=newtopic"]').attr('href','/h17-');jQuery('a[href*="/post?f=15&mode=newtopic"]').attr('href','/h5-')});jQuery(document).ready(function(){if(jQuery('.main-content.standalone h2.u:contains("Condições de utilização do fórum")').length){jQuery('#pun-visit + .pun-crumbs').after('<div class="ipsSteps clearfix"><ul><li class="ipsSteps_active"><strong class="ipsSteps_title">Passo 1</strong><span class="ipsSteps_desc">Condições de utiliz.</span><span class="ipsSteps_arrow"> </span></li><li class="" style="width: 83px;"><strong class="ipsSteps_title">Passo 2</strong><span class="ipsSteps_desc">Sua conta</span><span class="ipsSteps_arrow"> </span></li><li class="" style="width: 83px;"><strong class="ipsSteps_title">Passo 3</strong><span class="ipsSteps_desc">Confirmação</span><span class="ipsSteps_arrow"> </span></li></ul></div>')}if(jQuery('.main #ucp div:contains("Cadastrar-se no fórum")').length){jQuery('#pun-visit + .main:contains("Cadastrar-se no fórum")').before('<div class="ipsSteps clearfix" style="margin-bottom: 8px;"><ul><li class=""><strong class="ipsSteps_title">Passo 1</strong><span class="ipsSteps_desc">Condições de utiliz.</span><span class="ipsSteps_arrow"> </span></li><li class="ipsSteps_active" style="width: 83px;"><strong class="ipsSteps_title">Passo 2</strong><span class="ipsSteps_desc">Sua conta</span><span class="ipsSteps_arrow"> </span></li><li class="" style="width: 83px;"><strong class="ipsSteps_title">Passo 3</strong><span class="ipsSteps_desc">Confirmação</span><span class="ipsSteps_arrow">&nbsp;</span></li></ul></div>')}});jQuery(function(){jQuery('body').prepend('<div id="ajax_loading" style=""><img src="http://i.imgur.com/gygr8wi.gif" alt="Loading..."></div>');jQuery('a').click(function(){jQuery('#ajax_loading').slideDown();setTimeout('load()',2500)})});function load(){jQuery('#ajax_loading').slideUp('1500')}setTimeout('load()',2500);$(function(){$(function(){$('').insertBefore('.sceditor-button-size').click(function(){$('#text_editor_textarea').sceditor("instance").insertText("
 ","
")});$('<a class="sceditor-button sceditor-button-alerta" unselectable="on" title="Alerta"><div unselectable="on" style="background-image:url(http://i.imgur.com/lMsD0nE.png)">Alerta</div></a>').insertAfter('.sceditor-button-sucesso').click(function(){$('#text_editor_textarea').sceditor("instance").insertText("
 ","
")});$('<a class="sceditor-button sceditor-button-aviso" unselectable="on" title="Aviso"><div unselectable="on" style="background-image:url(http://i.imgur.com/cI8SnOI.png)">Aviso</div></a>').insertAfter('.sceditor-button-alerta').click(function(){$('#text_editor_textarea').sceditor("instance").insertText("
 ","
")});$('<a class="sceditor-button sceditor-button-info" unselectable="on" title="Informacao"><div unselectable="on" style="background-image:url(http://i.imgur.com/40zM1qS.png)">Informação</div></a>').insertAfter('.sceditor-button-aviso').click(function(){$('#text_editor_textarea').sceditor("instance").insertText("
 ","
")});$('<a class="sceditor-button sceditor-button-guest" unselectable="on" title="Acesso Negado"><div unselectable="on" style="background-image:url(http://i.imgur.com/DgT5CEm.png)">Visitantes</div></a>').insertAfter('.sceditor-button-quadrado').click(function(){$('#text_editor_textarea').sceditor("instance").insertText("
","
")})})});

$(document).on('ready', function () {
$(".sceditor-container").append('<div class="sceditor-dropdown sceditor-quadrado" style="display:none;margin-top: 27px;"><div><label for="quadradotext" style="text-align:left;" >Texto : </label><input type="text" id="quadradotext" style = "float:left" placeholder="Insira seu título aqui...">
<label for="quadradonote" style="text-align:left;">Nota : </label><input type="text" id="quadradonote" style = "float:left" placeholder="Insira seu texto aqui..."><input type="button" style = "margin-top: 15px;"class="button" value="Inserir"></div></div>');  
 $('<a class="sceditor-button bbcode-quadrado"  title="Quadrado"><div style="background-image:url(http://i.imgur.com/Q2pKUiL.png)">Quadrado</div></a>').insertBefore('.sceditor-button-quote').click(function () {
var f = $(".sceditor-quadrado").css("display");
if(f =='none') {$(".sceditor-quadrado").css({"left": $(this).position().left , "top": $(this).position().top, }).show(); }
else {$(".sceditor-quadrado").hide(); }
});
$(".sceditor-quadrado .button").click(function () {
var title = $(".sceditor-quadrado #quadradotext").val();
var note = $(".sceditor-quadrado #quadradonote").val();
$('#text_editor_textarea').sceditor("instance").insert('
+title+
XXXXXX
'+note+'');
});
$(".sceditor-container").append('<div class="sceditor-dropdown sceditor-sucesso" style="display:none;margin-top: 27px;"><div><label for="sucessotext" style="text-align:left;" >Texto : </label><input type="text" id="sucessotext" style = "float:left" placeholder="Insira seu título aqui...">
<label for="sucessonote" style="text-align:left;">Nota : </label><input type="text" id="sucessonote" style = "float:left" placeholder="Insira seu texto aqui..."><input type="button" style = "margin-top: 15px;"class="button" value="Inserir"></div></div>');  
 $('<a class="sceditor-button bbcode-sucesso"  title="Sucesso"><div style="background-image:url(http://i.imgur.com/EISZPwN.png)">Sucesso</div></a>').insertBefore('.sceditor-button-size').click(function () {
var f = $(".sceditor-sucesso").css("display");
if(f =='none') {$(".sceditor-sucesso").css({"left": $(this).position().left , "top": $(this).position().top, }).show(); }
else {$(".sceditor-sucesso").hide(); }
});
$(".sceditor-sucesso .button").click(function () {
var title = $(".sceditor-sucesso #sucessotext").val();
var note = $(".sceditor-sucesso #sucessonote").val();
$('#text_editor_textarea').sceditor("instance").insert('
+title+ '+note+'
');
});
$(".sceditor-container").append('<div class="sceditor-dropdown sceditor-alerta" style="display:none;margin-top: 27px;"><div><label for="alertatext" style="text-align:left;" >Texto : </label><input type="text" id="alertatext" style = "float:left" placeholder="Insira seu título aqui...">
<label for="alertanote" style="text-align:left;">Nota : </label><input type="text" id="alertanote" style = "float:left" placeholder="Insira seu texto aqui..."><input type="button" style = "margin-top: 15px;"class="button" value="Inserir"></div></div>');  
 $('<a class="sceditor-button bbcode-alerta"  title="Alerta"><div style="background-image:url(http://i.imgur.com/lMsD0nE.png)">Alerta</div></a>').insertBefore('.sceditor-button-size').click(function () {
var f = $(".sceditor-alerta").css("display");
if(f =='none') {$(".sceditor-alerta").css({"left": $(this).position().left , "top": $(this).position().top, }).show(); }
else {$(".sceditor-alerta").hide(); }
});
$(".sceditor-alerta .button").click(function () {
var title = $(".sceditor-alerta #alertatext").val();
var note = $(".sceditor-alerta #alertanote").val();
$('#text_editor_textarea').sceditor("instance").insert('
+title+ '+note+'
');
});
$(".sceditor-container").append('<div class="sceditor-dropdown sceditor-aviso" style="display:none;margin-top: 27px;"><div><label for="avisotext" style="text-align:left;" >Texto : </label><input type="text" id="avisotext" style = "float:left" placeholder="Insira seu título aqui...">
<label for="avisonote" style="text-align:left;">Nota : </label><input type="text" id="avisonote" style = "float:left" placeholder="Insira seu texto aqui..."><input type="button" style = "margin-top: 15px;"class="button" value="Inserir"></div></div>');  
 $('<a class="sceditor-button bbcode-aviso"  title="Aviso"><div style="background-image:url(http://i.imgur.com/cI8SnOI.png)">Aviso</div></a>').insertBefore('.sceditor-button-size').click(function () {
var f = $(".sceditor-aviso").css("display");
if(f =='none') {$(".sceditor-aviso").css({"left": $(this).position().left , "top": $(this).position().top, }).show(); }
else {$(".sceditor-aviso").hide(); }
});
$(".sceditor-aviso .button").click(function () {
var title = $(".sceditor-aviso #avisotext").val();
var note = $(".sceditor-aviso #avisonote").val();
$('#text_editor_textarea').sceditor("instance").insert('
+title+ '+note+'
');
});
$(".sceditor-container").append('<div class="sceditor-dropdown sceditor-infos" style="display:none;margin-top: 27px;"><div><label for="infostext" style="text-align:left;" >Texto : </label><input type="text" id="infostext" style = "float:left" placeholder="Insira seu título aqui...">
<label for="infosnote" style="text-align:left;">Nota : </label><input type="text" id="infosnote" style = "float:left" placeholder="Insira seu texto aqui..."><input type="button" style = "margin-top: 15px;"class="button" value="Inserir"></div></div>');  
 $('<a class="sceditor-button bbcode-quadrado"  title="Informação"><div style="background-image:url(http://i.imgur.com/40zM1qS.png)">Informação</div></a>').insertBefore('.sceditor-button-size').click(function () {
var f = $(".sceditor-infos").css("display");
if(f =='none') {$(".sceditor-infos").css({"left": $(this).position().left , "top": $(this).position().top, }).show(); }
else {$(".sceditor-infos").hide(); }
});
$(".sceditor-infos .button").click(function () {
var title = $(".sceditor-infos #infostext").val();
var note = $(".sceditor-infos #infosnote").val();
$('#text_editor_textarea').sceditor("instance").insert('
+title+ '+note+'
');
});
$('<a class="sceditor-button sceditor-button-guest" unselectable="on" title="Acesso Negado"><div unselectable="on" style="background-image:url(http://i.imgur.com/4vXg77d.png)">Visitantes</div></a>').insertBefore('.sceditor-button-quote').click(function(){
            $('#text_editor_textarea').sceditor("instance").insertText("
","
");
});
});


O resultado é este:

Como colocar postagem em verde UAhtfg4



Serão criados 4 botões em sua caixa de respostas assim:

Como colocar postagem em verde KlmxxVf

Imagem em tamanho maior:

Como colocar postagem em verde SdsJqHa
Shaman

Shaman
Super Membro

Membro desde : 30/01/2014
Mensagens : 1787
Pontos : 2448

http://brasilplayvicio.com.br

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar postagem em verde

Mensagem por Higor_Forever 25.10.14 17:49

LucaS, esses botões não apareceram.
Higor_Forever

Higor_Forever
****

Membro desde : 17/07/2013
Mensagens : 371
Pontos : 570

http://highdesign-forum.forumeiros.com

Ir para o topo Ir para baixo

Principal Contribuidor

Tópico resolvido Re: Como colocar postagem em verde

Mensagem por Shek 26.10.14 7:12

Bom dia!

Leia o seguinte tutorial: https://ajuda.forumeiros.com/t93902-
Ou se preferir:
https://ajuda.forumeiros.com/t93574-
https://ajuda.forumeiros.com/t93719-

Até mais!

Tópico movido de "Questões sobre a aparência do fórum" para "Questões sobre JavaScript &jQuery"
Shek

Shek
Principal Contribuidor
Principal Contribuidor

Membro desde : 11/04/2009
Mensagens : 18896
Pontos : 22793

https://shiftactive.blogspot.com/ https://www.facebook.com/ShiftActif https://twitter.com/ShiftActif

Ir para o topo Ir para baixo

Tópico resolvido Re: Como colocar postagem em verde

Mensagem por Higor_Forever 26.10.14 13:49

Obrigado Shek. Deu certinho!
Higor_Forever

Higor_Forever
****

Membro desde : 17/07/2013
Mensagens : 371
Pontos : 570

http://highdesign-forum.forumeiros.com

Ir para o topo Ir para baixo

Principal Contribuidor

Tópico resolvido Re: Como colocar postagem em verde

Mensagem por Shek 05.11.14 15:51

Como colocar postagem em verde Symbol10Questão marcada como Resolvida ou o Autor solicitou que ela fosse arquivada.

Tópico marcado como Resolvido e movido para Questões resolvidas.
Shek

Shek
Principal Contribuidor
Principal Contribuidor

Membro desde : 11/04/2009
Mensagens : 18896
Pontos : 22793

https://shiftactive.blogspot.com/ https://www.facebook.com/ShiftActif https://twitter.com/ShiftActif

Ir para o topo Ir para baixo

Ver o tópico anterior Ver o tópico seguinte Ir para o topo

- Tópicos semelhantes

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