asculta virgin radio

Distribuiţi | 

Camp status

 Scris de R1bb0N la data de Mier Ian 20, 2016 6:42 am

O mica previzualizare:


Mai intai creati un camp nou.(ACP->Utilizatori si grupuri->Profiluri). Profilul trebuie sa fie de tip lista.
Adaugati acest cod JS:
Cod:
/* Status Update Feature
 * Copyright (c) Avacweb 2015
 * All Rights Reserved.
 * No distribution without consent.
 */
var status_box={copyright:"Status Updater for Forumotion forums. Copyright (c) Avacweb 2013. All Rights reserved. No distribution without consent.",lang:{woym:"Whats on your mind...",update:"Update",too_short:"Status too short.",updated:"Status Updated!",error:"Technical error. Try again."},init:function(b,a){if(b){var c=my_getcookie("fa_"+location.host.replace(/\./g,"_")+"_data");this.user_id=c?parseInt(c.split("userid")[1].replace(/s:\d+/g,"").match(/\d+/)):0;if(a)for(var d in a)this.lang[d]=a[d];
this.outer=document.getElementById("LGstatus");this.outer.innerHTML='<input id="LGstatus_input" type="text" placeholder="'+this.lang.woym+'"><div onclick="status_box.update()" class="status-button">'+this.lang.update+'</div><span id="LGstatus_notice"></span>';this.input=document.getElementById("LGstatus_input");this.id=b;this.initiated=!0}},update:function(){if(this.initiated){var b=document.getElementById("LGstatus_notice");if(2>this.input.value.length)return b.innerHTML=this.lang.too_short=this.lang.too_short;
var a=document.getElementById("logout");a&&(a=a.href,a=a.substring(a.indexOf("tid=")+4,a.indexOf("&key")),a="id="+this.id.substring(this.id.lastIndexOf("_")+1)+'&active=1&content=[["'+this.id+'", "'+this.input.value+'"]]&tid='+a+"&user="+this.user_id,$.post("/ajax_profile.forum?jsoncallback=jQuery1",a,function(a){0<a.indexOf(status_box.input.value)?(status_box.input.value="",b.innerHTML=status_box.lang.updated,setTimeout("document.getElementById('LGstatus_notice').innerHTML=\" \"",2500)):b.innerHTML=
status_box.lang.error}))}}};

CSS:
Cod:
#LGstatus_input {
    border-radius: 3px;
    box-shadow: inset #CCC 0 1px 5px;
    border: 1px solid #BBB;
    color: #666;
    padding: 5px 2px;
    display: block;
    margin-bottom: 7px;
    width: 90%;
}
.status-button {
    background: #DDD;
    display: inline;
    padding: 3px 5px;
    border-radius: 2px;
    border: 1px solid #BBB;
    box-shadow: 0 5px 5px #EEE inset;
    cursor: pointer;
    color: #666;
}
.status-button:hover {
    border: 1px solid #999;
    color: #333;
}
#LGstatus_notice {
    color: #C05;
    margin-left: 5px;
}
#LGstatus {
    background: #EEE;
    padding: 5px;
    border: 1px solid #CCC;
    max-width: 250px;
}

Adaugati acest cod in mesaj pe prima pagina sau in template-uri:
Cod:
<div id="LGstatus">
</div><script>status_box.init('id camp')</script>
Inlocuiti id camp cu id-ul campului creat la pasul 1(fara #). Daca nu va descurcati cu obtinerea id-ului, lasati un mesaj aici cu adresa forumului vostru.
Offline
avatar
R1bb0N
Moderator

Mesaje : 71
Varsta : 16
Localizare : Romania

Vezi profilul utilizatorului

Re: Camp status

 Scris de Lcnn la data de Mier Ian 20, 2016 7:31 am

Este superb !
Offline
avatar
Lcnn
Administrator

Mesaje : 321
Varsta : 25
Localizare : Timisoara

Vezi profilul utilizatorului http://phpbb2.phpdevil.com
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
phpbb2.phpdevil.com :: PHPDEVIL # Web-design :: Tutoriale :: Toate versiunile-
Mergi direct la:  

pHpDeviL | For the love of the game...