.[spoiler="Screen"][/spoiler]In Profilul Utilizatorului adaugam unde dorim codul:
Code
<div id="ssT"><span id="statusInfo">...</span> <?if($_IS_OWN_PROFILE$)?><a href="javascript://" onclick="$('#showStat').toggle();$('#ssT').hide()"><img src="http://i.imgur.com/SnYmn.png" title="Redacteaza statutul" style="margin-left:8px;padding-left:8px;opacity:0.5;border-left:1px solid #9a9999;" align="absmiddle"></a><?endif?></div>
<span id="showStat" style="display:none;">
<div style="overflow:hidden;">
<div style="float:left;background:#FFF;border:1px solid #BCBDC2;border-right:none;<?if($USER_AGENT$='chrome')?>height:50px;padding:3px;margin-top:2px;<?else?>height:50px;padding:3px;<?endif?>"><img id="showI" src="http://i.imgur.com/Sr0Xa.png"></div>
<div style="float:left;">
<input id="statustext" type="text" name="textID">
<div id="showImgStat"></div>
</div>
<div style="float:left;">
<div onclick="getAddS()" id="ok_b">Accepta</div>
</div><img src="http://i.imgur.com/JaA02.gif" style="padding-top:7px;padding-left:7px;display:none;" id="statImgLoad">
</div>
</div>
</span><script type="text/javascript">
$('#showI').click(function(){$('#showImgStat').html('');$('#showImgStat').toggle();
for(i=0;i<=12;i++){$('#showImgStat').append('<img src="http://maxrom.ucoz.com/imagini/starePHP/'+i+'.png" onclick="copyImgVal(this.src)" class="img_php_stat">');};});
function copyImgVal(src){$('#isstat').val(src);$('#showI').attr({src:$('#isstat').val()});$('#showImgStat').toggle();};
$.get('/php/status/index.php?id=$_USER_ID$',function(status){(status) ? $('#statusInfo').html(status) : $('#statusInfo').text('Starea dvs. nu a fost pusa...');});
function getAddS() {if($('input[name="textID"]').val().length<2){_uWnd.alert('<div style="text-align:center;color:red;padding:6px;">Prea putine caractere', 'Eroare',{w:300, h:70});}
else{$('#statImgLoad').show();$.get('/php/status/index.php',{textID: $('input[name="textID"]').val(),icon: $('#isstat').val()},function(result){$('#resp').html(result);});}};
</script>
<input type="hidden" value="http://i.imgur.com/Sr0Xa.png" id="isstat">
<style>
#statustext{width:200px;padding:3px 6px;border:1px solid #BCBDC2; background:#ffffff url(/.s/img/wd/3/text-bg.gif) repeat-x 0 0;color:grey;font-family:tahoma;}
#statustext:focus{width:200px;padding:3px 6px;border:1px solid #BCBDC2; background:#ffffff url(/.s/img/wd/3/text-bg.gif) repeat-x 0 0;color:grey;font-family:tahoma;outline:none;}
#ok_b{background:url(http://i.imgur.com/mFIjY.png);font-family:tahoma;border:1px solid #BCBDC2;border-left:none;padding:4px 6px;height:14px;text-shadow:0px 1px 0px #FFF;cursor:pointer;<?if($USER_AGENT$='chrome')?>margin-top:2px;<?endif?>}
#ok_b:hover{background:url(http://i.imgur.com/mFIjY.png);opacity:0.7;font-family:tahoma;border:1px solid #BCBDC2;border-left:none;padding:4px 6px;height:14px;text-shadow:0px 1px 0px #FFF;cursor:pointer;<?if($USER_AGENT$='chrome')?>margin-top:2px;<?endif?>}
#ok_b:active{background:url(http://i.imgur.com/mFIjY.png);opacity:1;font-family:tahoma;border:1px solid #BCBDC2;border-left:none;padding:4px 6px;height:14px;text-shadow:0px 1px 0px #FFF;cursor:pointer;<?if($USER_AGENT$='chrome')?>margin-top:2px;<?endif?>}
#showImgStat{background:FFF;width:188px;border:1px solid #BCBDC2;border-top:none;padding:5px;display:none;text-align:center;}
.img_php_stat{margin-right:5px;margin-bottom:4px;cursor:pointer;}
#showI{cursor:pointer;}
</style>
<div id="resp"></div>
Prin FTP client intram in folderul scripts ( datele de logare le luati din PHP-details )
in folderu scripts creem un nou folder cu numele status in care incarcam fisierele din arhiva de mai jos.
http://maxrom.ucoz.com/_php/status.rar
[texterror4]Sursa: http://uweb.su
Traducere RO: http://maxrom.net
[/texterror4]