|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
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>~,
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
cool, thank you
|
|
|
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
I was actually looking at your forum this morning and thinking to myself "you know, I'd like to have that" lol...
|
|
|
|
Joined: May 2001
Posts: 55
Member
|
Member
Joined: May 2001
Posts: 55 |
hey i thought i could use this on 6.3.1.1 by just putting it after: but nothing really happened....? Should pretty similar, anyone know what is different? thanks scott
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
all of the links wouldn't work. Neither would the timestamps. Also, there's a small possibility your frames could be a problem. That and it's not even in the source code. There's pretty much no way this would work on anything lower than 6.4
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
I think it should work on 6.0+, if you put it under $show_logout and without the navbar_under_left => qq~ and ~, parts.
Make sure you clear cache, and also I don't know if you put it on the correct show_logout place, I don't have a 6.3.1.1 forum active but maybe there is more than one $show_logout in public_forum_summary.
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
Naw I've tried it as well, and can't get it to work on my forums. Took out everything u said LK, before u even posted this. Cleared cache. Has to do with the javascript code, timestamp maybe
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
it has to do with what I said. I know what I'm talking about. timestamp was added in 6.4. ULTIMATEBB{"***"} was added in 6.7
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Oh, I thought you only meant $ULTIMATEBB{""} is the problem.
You're correct Ian, my mistake... 6.4+ is needed.
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
Joined: Jan 2003
Posts: 118 |
Does this have any problems with the Thinking Clock already installed? It looks like it would take up the space where I have the clock already...
-GATOR
"Pain is temporary, Pride is forever"
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
shouldn't interfere at all
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
Joined: Jan 2003
Posts: 118 |
Yep, works no problem. Thanks!
-GATOR
"Pain is temporary, Pride is forever"
|
|
|
|
Joined: Jun 2002
Posts: 111
Member
|
Member
Joined: Jun 2002
Posts: 111 |
Hiya, I'm getting debug errors on this script. And i think i know what is wrong: should have been: if (atime != "NEW" && atime != "0") { What do u think?
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
actually, something like if( atime.search(/d{2}/) != -1 ) { would be simpler. You make sure it isn't NEW, or 0, so anything
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|