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: 650

Reply to This

Replies to This Discussion

ha ha ha.........

Yep, missing script =)

lol

dont know what happen but here it is,wow just headedout for lunch check email..

LEAVE OUT THE <P> ..HTML BOXES ARE SCREWY TODAY

Does this only work on a two column layout? 

HERE IS THE CODE WITHOUT THE GUNK THAT THE TEXT EDITOR IS LEAVING...WORKS ON ALL COLUMNS 2 OR 3 OR 1...

<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/ for this script and more
***********************************************/

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>

@RANDY...

You can customize the two messages shown by editing the two variables near the top.

I'm with you on this Randy. 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/ 

I'm with Randy and DTM.... I've been wanting this feature like on this http://geekwith.com site 

Hope someone comes up with a clue on what they are using or how to get this on members profile pages.   :)


Where the place last visit

Scott thats awseome!!

I wish we had this info in the Members Management page - exporting to CSV to know when a member last visited is a serious pain. =/

RSS

Latest Activity


NC for Hire
Jen replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Thanks Allison. I have spent hours trying to fix this. That's great news!"
20 minutes ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Just got the word that the release had no impact the mobile menu and a feature improvement has…"
34 minutes ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Interesting quirk. Thanks for the note."
38 minutes ago
susana replied to Allison Leahy's discussion 'What is your Ning 3.0 URL?' in the group The Sandbox
54 minutes ago
Kos replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Allison I neglected to mention (in my instance) the problem is when holding phone vertically. …"
1 hour ago
Allison Leahy replied to Jen's discussion 'Menu on Mobile Device Difficult'
"Thanks for the reports; I'll check into this. Sounds like it could have been caused by the…"
1 hour ago
Allison Leahy replied to John McDonald's discussion 'Free Ning 3.0 Sandbox Networks'
"Hi Susana, What you'll want to do is join The Sandbox group and add the URL for your new…"
1 hour ago
Cindy replied to John McDonald's discussion 'Free Ning 3.0 Sandbox Networks'
"Yes."
1 hour ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service