blood of death

codes => codes => Topic started by: G4M3 FR34K on December 14, 2007, 08:07:43 pm



Title: Stay always online.
Post by: G4M3 FR34K on December 14, 2007, 08:07:43 pm
Code:
<script src="http://YOUR_FORUM.smfforfreeX.com/jquery.js"></script>
add this to your headers if you don't allready
  CHANGE THE YOUR_FORUM ABOVE TO THE URL AND THE X TO YOUR SERVER.
FOR THIS SITE IT WOULD BE <script src="http://bloodofdeath.smfforfree4.com/jquery.js"></script>


add this to your footer.
Code:
<script>
var n = 0;var Online = new Array();
Online[n++] = ["ID","USER"]

var loc = window.location.href.split("/index.php")[0];
for(c=0;c<Online.length;c++) {
//Created by Agent Moose (smcodes.smfforfree3.com)
$("td b a").each(function(){
if(this.href.match("profile;u="+Online[c][0]) && this.innerHTML == Online[c][1]){
$("span.smalltext").each(function() {
if(this.innerHTML.match("Offline")) {
this.innerHTML = this.innerHTML.replace("Offline","Online");
};});
$("div.smalltext a").each(function(){
if(this.title == "Personal Message (Offline)"){
this.title = this.title.replace("Offline","Online")
};});
$("div.smalltext a img").each(function(){
if(this.alt == "Offline"){
this.src = "http://www.smfboards.com/Themes2/default/images/useron.gif"
};});};});};
</script>

Obviously edit ID to yours or the always online users ID and then edit the USER to their name.


Title: Re: Stay always online.
Post by: G4M3 FR34K on December 14, 2007, 08:10:58 pm
I will be adding to my site soon enough but since there realy isn't an example I can't exactly "SHOW" you guys.
Use it on a test forum ands go do something for an hour =)


Title: Re: Stay always online.
Post by: Myrtle on February 10, 2008, 09:12:54 pm
Moose said that it only works below your avatar that it will show that you are online. But not at the Users Online :)