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

Troy Marquis replied to Andrew Sanderson's discussion 'Video chat for ning network'
"skysa"
33 minutes ago
Ambroise favorited Eric Suesz's page Ning 3.0 Roadmap
2 hours ago
Ambroise commented on kid k's group 'Ning French Networks'
"Dans le menu, il y a marqué Ning 3.0 lol"
2 hours ago
Jean-Christophe Fa(u)dot commented on kid k's group 'Ning French Networks'
"En ce qui me concerne, c'est à peine si je sais que Ning 3 existe ou va exister !…"
4 hours ago
SM replied to SM's discussion 'How to Target the First Page of your Site with CSS'
"Hi Suzie, here is the code you need to put into your bottom custom code box in the design center…"
4 hours ago
Kos replied to SM's discussion 'How to Target the First Page of your Site with CSS'
"ahhh now that makes sense.  Thanks for clarifying :)"
5 hours ago
Strumelia replied to FedMedic's discussion '3.0 Why is all my text centered?'
"Thanks so much, and please DO let me know what their support team is like, when you first make use…"
6 hours ago
SM replied to SM's discussion 'How to Target the First Page of your Site with CSS'
"Hi Suzie, I'll try to post something more logical with screen shots. But, you'll see -…"
6 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service