Inca de cand era doar forumul rus, am pus ochiul pe acele containere colore, insa din pacate nu am reusit..
Acum am imbinat un script cu ceia ce folosesc moderatorii si adminii pe forumurile oficiale uCoz.
Rezultat:
[spoiler="Screen"][/spoiler]
daca aveti deja pus acest script si doriti sa adaugati containerele colore fara caciulita? adaugati in script urmatoarele:
in sectiunea :
Cod
#red {border: 1px solid #E89B88;background-color: #FFEFE8;padding: 8px 11px;font-size: 10pt;margin: 0px;color:#000;}
#blue {border: 1px solid #9DBDFF;background-color: #E1EBFF;padding: 8px 11px; font-size: 10pt; margin: 0px; color:#000;}
#green {border: 1px solid #00CC00;background-color: #E1FFD7;padding: 8px 11px; font-size: 10pt; margin: 0px; color:#000;}
#gray {border: 1px solid #B5B5B5;background-color: #F4F4F4;padding: 8px 11px;font-size: 10pt;margin: 0px;color:#000;}
In continuare in script gasim:
Cod
.replace(/\[texterror4\]/gi,'<div id="surs"><b>Sursa si modificatii</b></div><div id="texterror4">').replace(/\[\/texterror4\]/gi,"</div>")
Si dupa el punem urmatoarele:
Cod
.replace(/\[texterror5\]/gi,'<div id="blue">').replace(/\[\/texterror5\]/gi,"</div>")
.replace(/\[texterror6\]/gi,'<div id="green">').replace(/\[\/texterror6\]/gi,"</div>")
.replace(/\[texterror7\]/gi,'<div id="red">').replace(/\[\/texterror7\]/gi,"</div>")
.replace(/\[texterror8\]/gi,'<div id="gray">').replace(/\[\/texterror8\]/gi,"</div>")
in continuare gasim:
Cod
<option value="texterror4">Sursa si modificatii</option>
si indata dupa el punem:
Cod
<option value="texterror5">Container albastru</option><option value="texterror6">Container verde</option><option value="texterror7">Container rosu</option><option value="texterror8">Container gri</option>
daca nu doriti containerele cu caciulita, codul mare il inlocuiti cu:
Cod
<style>
#red {border: 1px solid #E89B88;background-color: #FFEFE8;padding: 8px 11px;font-size: 10pt;margin: 0px;color:#000;}
#blue {border: 1px solid #9DBDFF;background-color: #E1EBFF;padding: 8px 11px; font-size: 10pt; margin: 0px; color:#000;}
#green {border: 1px solid #00CC00;background-color: #E1FFD7;padding: 8px 11px; font-size: 10pt; margin: 0px; color:#000;}
#gray {border: 1px solid #B5B5B5;background-color: #F4F4F4;padding: 8px 11px;font-size: 10pt;margin: 0px;color:#000;}
</style>
<script type="text/javascript">
$('#spoiler').after('<input title="get" id="warningmess" style="background:#fbefef;border:1px solid #c27e7e;margin-left:4px;" value="Adauga un content" style="margin-left:4px;" class="codeButtons" type="button">');
$('.bbtag').each(function() {
messforum = $(this).html();
rm = messforum.replace(/\[texterror5\]/gi,'<div id="blue">').replace(/\[\/texterror5\]/gi,"</div>")
.replace(/\[texterror6\]/gi,'<div id="green">').replace(/\[\/texterror6\]/gi,"</div>")
.replace(/\[texterror7\]/gi,'<div id="red">').replace(/\[\/texterror7\]/gi,"</div>")
.replace(/\[texterror8\]/gi,'<div id="gray">').replace(/\[\/texterror8\]/gi,"</div>")
$(this).html(rm);
});
$('#warningmess').click(function() {
new _uWnd('warmess','Content nou',500,500,{align:0,shadow:0,close:1,autosize:1,maxh:800,minh:300,resize:0}, '<fieldset><select id="tw"><option value="texterror5">Container albastru</option><option value="texterror6">Container verde</option><option value="texterror7">Container rosu</option><option value="texterror8">Container gri</option></select></fieldset><fieldset><legend>Continutul butonului<span style="margin-top:5px;" id="ertxt"></span></legend><textarea id="warningtext" style="width:100%"></textarea></fieldset><fieldset><div style="float:left"><table border="0" cellpadding="0" cellspacing="0" onmousedown="this.className=\'downBtn\'" onmouseover="this.className=\'overBtn\'" onmouseout="this.className=\'outBtn\'"><tr><td class="myBtnLeft"><img alt="" border="0" src="http://s1.ucoz.net/img/1px.gif"/></td><td class="myBtnCenter"><div class="myBtnCont x-unselectable" unselectable="on"><a href="javascript://" onclick="lp()">Adauga</a> </div> </td><td class="myBtnRight"><img alt="" border="0" src="http://s1.ucoz.net/img/1px.gif"/></td></tr></table></div></fieldset>' )
});
function lp() {
if($('#warningtext').val().length <= '5'){$('#ertxt').html(' - <font color="red">nu ati adaugat continut</font>')}
else{gettxt();_uWnd.close('warmess');$('#ertxt').html('')}
}
function gettxt() {
var textmesswarning = $('#warningtext').val();var texttypewarning = $('#str').val();$('#tw option:selected').each(function() {var polemtext = $(this).val();document.getElementById('message').value+='['+polemtext+']'+textmesswarning+'[/'+polemtext+']';});
if($("#privtxt").attr('checked')){$('#frF16').click()}
}
</script>