Like the title states this script will let your network members or visitors know when they last came to your network..updated

copy and paste in textbox thats it very simple..heres the code i mean script

<script type = "text/javascript">

/***********************************************
* Display time of last visit script- by JavaScriptKit.com
* This notice MUST stay intact for use
* Visit JavaScript Kit at http://www.javascriptkit.com/ 
***********************************************/

var days = 730; // days until cookie expires = 2 years.
var lastvisit=new Object();
var firstvisitmsg="This is your first visit to this page. Welcome!";
lastvisit.subsequentvisitmsg="Welcome back visitor! Your last visit was on <b>[displaydate]</b>";

lastvisit.getCookie=function(Name){
var re=new RegExp(Name+"=[^;]+", "i");
if (document.cookie.match(re))
return document.cookie.match(re)[0].split("=")[1];
return'';
}

lastvisit.setCookie=function(name, value, days){
var expireDate = new Date();

var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days));
document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
}

lastvisit.showmessage = function() {
var wh = new Date();
if (lastvisit.getCookie("visitc") == "") {
lastvisit.setCookie("visitc", wh, days);
document.write(firstvisitmsg);
}

else {
var lv = lastvisit.getCookie("visitc");
var lvp = Date.parse(lv);
var now = new Date();
now.setTime(lvp);
var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");
var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
var dd = now.getDate();
var dy = now.getDay();
dy = day[dy];
var mn = now.getMonth();
mn = month[mn];
yy = now.getFullYear();
var hh = now.getHours();
var ampm = "AM";
if (hh >= 12) {ampm = "PM"}
if (hh >12){hh = hh - 12};
if (hh == 0) {hh = 12}
if (hh < 10) {hh = "0" + hh};
var mins = now.getMinutes();
if (mins < 10) {mins = "0"+ mins}
var secs = now.getSeconds();
if (secs < 10) {secs = "0" + secs}
var dispDate = dy + ", " + mn + " " + dd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm
document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", dispDate))
}

lastvisit.setCookie("visitc", wh, days);

}

lastvisit.showmessage();

</script>

RE UPDATED NEW EXACT SCRIPT






example can be seen here http://yubasutterconnect.com right above the latest activity module..Enjoy Horray Beer allright

Tags: calender, date, members, visited

Views: 657

Reply to This

Replies to This Discussion

Hey Scott! this look great brother! Mines only has my picture in the module, how did you include all those other members? I thought this code was for individual members? Anyhow, great job and BIG thanks to solo for adding this! I purchased a mod from TJ@Jquery similar to this that only displays on the members page which is also awesome but this one depending if you added it to the home page like I did, the member is more notified!

What a great reply Scott! We indeed will be pals now as I think there may be some mods you can help me with! Im very "paypal friendly" so good business is my practice. Lets talk! Check out my site wellkunnected.com and tell me if you have anything interesting you think my network could use that you could conjure business about! Talk @ ya soon pal, thanks again!

Great!!!!

perty cool but im more interested in when last time Member visited due to controlling issues surely there is a code that is not copyrighted... ?

The following is what we really want. Check this site, go to a members page, you can see the last time they were logged in right under their avatar.  I've wanted this feature for a long time.

I have no clue what they are using. http://geekwith.com/

can't get it to work www.svepla.com

Nice script but i dont know if this helps us as NCs. I will love to see a similar script that tells us the NCs the last time a member came to your site. With this you can at least beg them to come back as is done by FB......by sending what you missed.

Good scipt though....just thinking loud.

RSS

Latest Activity

Gary W Norman replied to Gary W Norman's discussion 'Tagline Font Size or Type - can it be changed?'
"I tried to do that last night and it didn't 'take!' I went up to 65px and nothing!"
12 minutes ago
Kos replied to Gary W Norman's discussion 'Tagline Font Size or Type - can it be changed?'
"Gary yes, increase that 58px to a larger size then you won't need my code at all."
13 minutes ago
Gary W Norman replied to Gary W Norman's discussion 'Tagline Font Size or Type - can it be changed?'
"Kos, this is part of the code in that area, at the top. Is this conflicitng?  #xg_masthead…"
17 minutes ago
Kos replied to Gary W Norman's discussion 'Tagline Font Size or Type - can it be changed?'
"Stubborn li'l bugger isn't it.  In the advance appearance area, do you have it…"
20 minutes ago
Perrie Halpern replied to PeruCool's discussion 'Alternatives to Ning social network'
"Quick question, are they dealing with the US office or the Turkey one? I am considering doing the…"
27 minutes ago
FedMedic replied to PeruCool's discussion 'Alternatives to Ning social network'
"Thanks for the added information. Our attorney said, we will go forward in them keeping our Name on…"
42 minutes ago
Gary W Norman replied to Gary W Norman's discussion 'Tagline Font Size or Type - can it be changed?'
"Yes Kos, I probably am! lol let me give this a shot..hang on one moment....still nothing.…"
43 minutes ago
FedMedic replied to Rodelio Lagahit's discussion 'have anyone tried grou.ps?'
"STAY AWAY FROM GROU.PS! Sorry about the screaming. LOL! If you planning on NEVER leaving leaving…"
48 minutes ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service