[RESOLVED] Replace "Last Visit" with "Welcome {username}"?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

[RESOLVED] Replace "Last Visit" with "Welcome {username}"?

Post by sunsop »

I'm on my forum every day, a few times a day. I was on late last night for over an hour, for example, tending to maintainance. Now this morning I check in to see what's new and there is something I have never seen before - right above the board index is a message saying my last logon was Friday 3/5, and on the right side todays date and time.

Aside from the fact that I have never seen this before, why would it give Friday as the date of my last login when I was on a number of times on both Saturday and Sunday? Before the question is asked ... no - I do not logout each visit - I stay logged in, so that can't have anything to do with it. Also - i did not change anything in the ACP if there is an option to display this.

Before I start to question my sanity and make an appointment with my optomatrist ... can anyone give me a clue just what the heck is going on here?

Oh - this is a slightly customized Subsilver2 style, no mods.
Board LINK
Last edited by sunsop on Thu Mar 11, 2010 1:41 am, edited 3 times in total.
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: What the ...? Where did this come from?

Post by sunsop »

Nobody has any idea on this one? I have got to get rid of this if possible - it's extremely annoying.
User avatar
Cpt. Blackbeard
Registered User
Posts: 443
Joined: Sat Oct 31, 2009 4:39 am
Location: USA
Contact:

Re: What the ...? Where did this come from?

Post by Cpt. Blackbeard »

Mine has always shown that, and the last visit time is the last time you logged in, mine shows
Board index
It is currently Tue Mar 09, 2010 12:27 pm | Last visit was: Mon Mar 08, 2010 8:05 am
All times are UTC - 5 hours
User avatar
Lumpy Burgertushie
Registered User
Posts: 68281
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: What the ...? Where did this come from?

Post by Lumpy Burgertushie »

If you were not seeing it before, you you must have removed it because it is standard on most styles.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: What the ...? Where did this come from?

Post by sunsop »

Lumpy Burgertushie wrote:If you were not seeing it before, you you must have removed it because it is standard on most styles.

robert
Definitely didn't so that, Robert. I keep all edits as text files I can refer back to if need be. I checked and don't have it in my folder. Can you advise where it would be so I CAN remove it? Somewhere in overall_header.html I guess?

UPDATE:
Okay, I found the code in overall_header.html. Not clear exactly how much of it needs to be removed, though. I just want to remove the "last visit" part - the current date and time is okay. Here's the code...

Code: Select all

<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>
I assume the line starting tc class= and ending with the closed td is all that I need to remove, right? A bit confusing with the IF and ENDIF in only that line and not the current date line:)
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: What the ...? Where did this come from?

Post by Pony99CA »

sunsop wrote:Okay, I found the code in overall_header.html. Not clear exactly how much of it needs to be removed, though. I just want to remove the "last visit" part - the current date and time is okay. Here's the code...

Code: Select all

<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF --></td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>
I assume the line starting tc class= and ending with the closed td is all that I need to remove, right? A bit confusing with the IF and ENDIF in only that line and not the current date line:)
To be safe, I'd only remove this:

Code: Select all

<!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF -->
That''s the part that won't display if you aren't logged in; the TD cell will still be there.

Steve

P.S. One reason people may not have responded for a while is the poor choice of Subject. Some people ignore content-free subjects. Something like "How do I get rid of Last Visit time?" would be better.
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: What the ...? Where did this come from?

Post by sunsop »

Pony99CA wrote: To be safe, I'd only remove this:

Code: Select all

<!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ENDIF -->
That''s the part that won't display if you aren't logged in; the TD cell will still be there.

Steve

P.S. One reason people may not have responded for a while is the poor choice of Subject. Some people ignore content-free subjects. Something like "How do I get rid of Last Visit time?" would be better.
That makes sense. My website design experience with html/css would ordinarily lead me to not want to leave a blank cell, but in this case I was wondering - not being familiar with this coding - that it might be needed to keep that cell space open, if that makes any sense. I know what I'm trying to say - I just can't explain it well:)

Yeah - you're right about the subject. I see so many posts with less info - like "Help" - that get tons of responses I thought it might raise some curiosity:)

UPDATE: Yup, that did it. Thanks, Steve. If I may add to this without starting a new thread that might lose continuity ...
Is it possible to use the {username} code to put something like "Welcome, {username} in that spot?
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: Add "Welcome {username}" to gensmall?

Post by sunsop »

Well - I guess I'm just going to have to try it and see what happens, if nobody has any clue :D
User avatar
Lumpy Burgertushie
Registered User
Posts: 68281
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Add "Welcome {username}" to gensmall?

Post by Lumpy Burgertushie »

why didn't you try it before you even asked? :D

also, what does the subject of this topic mean ? ( since you changed it from what it originally was ).

I get the username part but what does gensmall have to do with anything?


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: Add "Welcome {username}" to gensmall?

Post by sunsop »

Lumpy Burgertushie wrote:why didn't you try it before you even asked? :D

also, what does the subject of this topic mean ? ( since you changed it from what it originally was ).

I get the username part but what does gensmall have to do with anything?


robert
I just did. Didn't work! :)

Frankly, I didn't know WHAT that section is, other than it's part of the code relating to the "gensmall" lines. It's the one I just removed the "last visit" from.

Anyway ... {USERNAME} does not seem to be accepted there. I get the "Welcome" but not the users name. I just pasted "Welcome {USERNAME}" within the td class where "last visit" was removed from, so I don't know if there's something else that needs to be added, or it just won't call {USERNAME}. lIKE SO:

Code: Select all

<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall">Welcome {USERNAME}</td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Add "Welcome {username}" to gensmall?

Post by Pony99CA »

sunsop wrote:Frankly, I didn't know WHAT that section is, other than it's part of the code relating to the "gensmall" lines. It's the one I just removed the "last visit" from.

Anyway ... {USERNAME} does not seem to be accepted there. I get the "Welcome" but not the users name. I just pasted "Welcome {USERNAME}" within the td class where "last visit" was removed from, so I don't know if there's something else that needs to be added, or it just won't call {USERNAME}. lIKE SO:

Code: Select all

<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall">Welcome {USERNAME}</td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>
"gensmall" is just a CSS class than probably provides general/generic small text.

I'd try the following coding (assuming you want "Welcome" for everybody):

Code: Select all

<div id="datebar">
		<table width="100%" cellspacing="0">
		<tr>
			<td class="gensmall">Welcome <!-- IF S_USER_LOGGED_IN -->{USERNAME}<!-- ENDIF --></td>
			<td class="gensmall" align="{S_CONTENT_FLOW_END}">{CURRENT_TIME}<br /></td>
		</tr>
		</table>
	</div>
I haven't tried it (my PC is dead), but {USERNAME} seems to be the correct replacement stirng.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: Replace "Last Visit" with "Welcome {username}"?

Post by stickerboy »

From memory, I think you need {S_USERNAME} instead :)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: Replace "Last Visit" with "Welcome {username}"?

Post by sunsop »

Outstanding!

By combining both Steve's and CR's tips, in addition to some extra text I added, I now get (in bold) ... "Welcome to the Alumni Forum, Bruce!" Or whoever.

Anything special? Maybe not - but it's ... different. ;)

Thanks, guys!
User avatar
Lumpy Burgertushie
Registered User
Posts: 68281
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [RESOLVED] Replace "Last Visit" with "Welcome {username}

Post by Lumpy Burgertushie »

I knew what gensmall was, I just didn't know what it had to do with the subject title.
also, I did not know that it was still a font class in subsilver2. I remembered it from subsilver in phpbb2 but did not know it had been continued. I rarely mess with subsilver2 styles.

glad you got it working.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
sunsop
Registered User
Posts: 671
Joined: Sat Sep 05, 2009 6:36 am

Re: [RESOLVED] Replace "Last Visit" with "Welcome {username}

Post by sunsop »

Lumpy Burgertushie wrote:I knew what gensmall was, I just didn't know what it had to do with the subject title.
also, I did not know that it was still a font class in subsilver2. I remembered it from subsilver in phpbb2 but did not know it had been continued. I rarely mess with subsilver2 styles.

glad you got it working.

robert
Not a problem, Robert - you're always helpfull. :)
Locked

Return to “[3.0.x] Support Forum”