Modification Name: You Last Visited Wording
Author(s): LK
Description: This is a very simple modification, which tells the users the last time they had visited your board in Forum Summary, under "Hello, X", according to their cookie. It also welcomes the new users, who don't have any cookie, and it links to the Update Post Indicators page. Uses your TimeZone setting.
The only reason it's not finished is because it isn't Wordletized.
Demo: http://www.lkworld.com Requirements: UBB.classic 6.7.0+
Credits: Charles Capps for making this up @ "Flave"
Open public_forum_summary.pl.
Find:
navbar_replace_right => qq~<b>$memberline</b>~,
Add below:
navbar_under_left => qq~
<script type="text/javascript">
var atime = unescape(session_dt);
if (atime != "NEW") {
var btime = atime.split("-");
btime[0] = Math.round(btime[0]);
btime[0]--;
var ctime = btime[2].split(" ");
dtime = ctime[1].split(":");
dtime[0] = Math.round(dtime[0]);
if (ctime[2] == "PM" && dtime[0] < 12) {
dtime[0] += 12;
} else if (ctime[2] == "AM" && dtime[0] == 12) {
dtime[0] = 0;
}
document.write('You last visited: <b>'+timestamp(new Date(ctime[0],btime[0],btime[1],
dtime[0],dtime[1],0),dfrm,tfrm,0,0,0,0)+
' [<a href="$ULTIMATEBB{"ubb=markallread"}">Update Post Indicators</a>]</b>');
} else {
document.write('Welcome to '+unescape('~.UBBCGI::escape($vars_config{BBName}).
qq~')+'!<b> [<a href="$ULTIMATEBB{"ubb=markallread"}">Update Post Indicators</a>]</b>');
}
</script>~,