MaxRom | Scripturi uCoz Romania

Bannerul tau aici
[ Mesaje noi · Membrii · Regulamentul forumului · RSS ]
  • Pagina 1 din 1
  • 1
Forum » uCoz system » Forum » Cine poate comenta intr-un topic
Cine poate comenta intr-un topic
Muşatinu Date: Luni, 2011-10-10, 15:07 | Message # 1
Mesaje: 1801
Awards: 202
« 53 »



puteti face astefel ca doar unii utilizatori vor putea comenta la unele topicuri.

In Forum » General appearance of forum pages in fata tegului $BODY$ puneti:

Code
<script type="text/javascript">    
    var whtRes = [1,2,255,3,4], qqt = [1,0];    
       
    // unde-i 1,2,255,3,4 — ID-ul grupelor voastre    
    </script>


In Forum » New message form cautam tegul si dupa el punem:

Code
<?if($PAGE_ID$='addthread' || $PAGE_ID$='postedit')?>    
    <tr><td class="gTableLeft">Cine poate comenta:</td><td id="whtObj" class="gTableRight">    
    <input name="whtp" id="pn1" type="checkbox" value="1" checked=""> <label for="pn1">Utilizator</label><br>    
    <input name="whtp" id="pn2" type="checkbox" value="1" checked=""> <label for="pn2">Avansat</label><br>    
    <input name="whtp" id="pn3" type="checkbox" value="1" checked=""> <label for="pn3">V.I.P.</label><br>    
    <input name="whtp" id="pn4" type="checkbox" value="1" checked=""> <label for="pn4">Moderator</label><br>    
    <input name="whtp" id="pn5" type="checkbox" value="1" checked=""> <label for="pn5">Administrator</label><br>    
    </td></tr>    
    <?endif?>


Tot aici la sfarsitul intregului cod puneti:
Code
<?if($MODER_OPTIONS_FLAG$)?>    
    <script type="text/javascript">    
    $('input[name="whtp"]').change(function(){n = qqt[$(this).val()*1];$(this).val(n);});    
    if($('#message').val().indexOf('|||')!=-1){    
    nqi = $('#message').val().substr($('#message').val().indexOf('|||')+3).split('|');    
    $('#message').val($('#message').val().substr(0,$('#message').val().indexOf('|||')));    
    $('input[name="whtp"]').each(function(i){    
    if(nqi[i]*1==0){$(this).val('0').removeAttr('checked');};    
    });    
    };    
    <?if($PAGE_ID$='addthread' || $PAGE_ID$='postedit')?>    
    $('.postSubmit').click(function(){    
    $('#message').removeAttr('name').after('<input style="display:none;" id="msgInputNew" name="message"/>');    
    pn = $('#message').val()+'|||';    
    $('input[name="whtp"]').each(function(){    
    pn += $(this).val()+'|';    
    });    
    <?endif?>    
    $('#msgInputNew').val(pn);    
    $('form[name="addform"]').submit();    
    return false;    
    });    
    </script>    
    <?endif?>    
    <script type="text/javascript">if(whtA)$('#frM53').remove();</script>


In Forum » Appearance of entries cautam tegul $MESSAGE$ si schimbam cu:

Code
<?if($GROUP_ID$==3 || $GROUP_ID$==4)?><span style="display:none;">$MESSAGE$</span><?if(strpos($MESSAGE$,'|||')!=-1)?><?substr($MESSAGE$,0,strpos($MESSAGE$,'|||'))?><?else?>$MESSAGE$<?endif?><?else?>$MESSAGE$<?endif?>[  /code]

si tot acolo la sfarsitul intregului cod punem:

[code]<script type="text/javascript">    
    var whtMsg = $('.posttdMessage span').text(), whtArr = whtMsg.substr(whtMsg.indexOf('|||')+3).split('|');for(bcq=0;bcq<=whtArr.length-2;bcq++){if(whtArr[bcq]*1==0){if(whtRes[bcq]==$CUR_GROUP_ID$){whtA = 1;};};};    
    </script>


[texterror4]Sursa: http://webo4ka.ru

Traducere RO: http://maxrom.ucoz.com [/texterror4]



 
Forum » uCoz system » Forum » Cine poate comenta intr-un topic
  • Pagina 1 din 1
  • 1
Căutare: