[split from] Welcome Message

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

[split from] Welcome Message

Post by Exclusive »

Hello, I'm new here!

I have successfully added a Guest Welcome Message on my forum.

in overall_header.html i added the code below:

Code: Select all

<!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
guest welcome message goes here
<!-- ENDIF -->
How do I disable it (the guest welcome message) from showing on the following pages;
1. Login page
2. Register page

BR,
Exclusive
Last edited by Exclusive on Sun Dec 30, 2018 1:49 am, edited 1 time in total.
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: [split from] Welcome Message

Post by Lumpy Burgertushie »

probably the best way would be to install one of the extensions for welcome messages. they normally have settings to let you pick where you want the message to display.

or, you could remove your code from the overall_header.html file and put it at the top of index_body, viewtopic_body and viewforum_body instead.


robert

Code: Select all

<!-- IF SCRIPT_NAME ne 'ucp' -->
<!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
guest welcome message goes here
<!-- ENDIF -->
<!-- ENDIF -->
Last edited by Lumpy Burgertushie on Mon Jun 25, 2018 2:54 pm, edited 1 time in total.
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72567
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: [split from] Welcome Message

Post by KevC »

I know this isn't what you posted about but you should rethink the forums a bit.
Way too many with no posts in them. Get rid of the banned forum. It's irrelevant. It looks dictatorial if you have a forum telling people why someone has been banned. It's none of their business. You have a forum for android based phones.... and then below that you have forums for makes of phone that run android. So they're both the same thing.
Less is more.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: [split from] Welcome Message

Post by Exclusive »

Lumpy Burgertushie wrote: Mon Jun 25, 2018 2:44 pm probably the best way would be to install one of the extensions for welcome messages. they normally have settings to let you pick where you want the message to display.
Obviously, but I couldn't find an extension that could help me achieve this at my end, if you know any, please don't hesitate to share.
Lumpy Burgertushie wrote: Mon Jun 25, 2018 2:44 pm or, you could remove your code from the overall_header.html file and put it at the top of index_body, viewtopic_body and viewforum_body instead.
Yes, I taught as much... but the code below?

Lumpy Burgertushie wrote: Mon Jun 25, 2018 2:44 pm robert

Code: Select all

<!-- IF SCRIPT_NAME ne 'ucp' -->
<!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
guest welcome message goes here
<!-- ENDIF -->
<!-- ENDIF -->
What do I do with this piece of code? Should I modify mine to this? Using this code in overall_header.html or in the above mention files?
Last edited by Exclusive on Mon Jun 25, 2018 7:54 pm, edited 5 times in total.
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: [split from] Welcome Message

Post by Exclusive »

KevC wrote: Mon Jun 25, 2018 2:53 pm I know this isn't what you posted about but you should rethink the forums a bit.
Way too many with no posts in them. Get rid of the banned forum. It's irrelevant. It looks dictatorial if you have a forum telling people why someone has been banned. It's none of their business. You have a forum for android based phones.... and then below that, you have forums for makes of the phone that run Android. So they're both the same thing.
Less is more.
Yeah, kind of. That is just a new forum not up to 3weeks. And this is how we do it over there!
Last edited by Exclusive on Thu Aug 02, 2018 1:21 pm, edited 2 times in total.
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: [split from] Welcome Message

Post by Lumpy Burgertushie »

Yes, I taught as much... but the code below?

Lumpy Burgertushie wrote: Mon Jun 25, 2018 2:44 pm robert

Code: Select all

<!-- IF SCRIPT_NAME ne 'ucp' -->
<!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
guest welcome message goes here
<!-- ENDIF -->
<!-- ENDIF -->
What do I do with this piece of code? Should I modify mine to this?
yes. the "ne" stands for "not equal to" ucp.php is the file that controls the login and registration.

that code says. if the viewer is on any page associated with ucp.php it will not show the code within your variable for guests.



robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Exclusive
Registered User
Posts: 676
Joined: Mon Jun 25, 2018 1:33 pm

Re: [split from] Welcome Message

Post by Exclusive »

Lumpy Burgertushie wrote: Mon Jun 25, 2018 2:44 pm robert

Code: Select all

<!-- IF SCRIPT_NAME ne 'ucp' -->
<!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
guest welcome message goes here
<!-- ENDIF -->
<!-- ENDIF -->
Perfect! This is what I was looking for!

Thanks, you're the man!
Use Search Button to get Instant Results | Follow Forum Rules
Avoid Spams in the forum to prevent banning the offending account. | ⟿ Visit My Awesome phpBB Forum! ⬳

Best Web Hosting with 99.9% Uptime! | ✔ Buy Cheap Domain Names

Return to “phpBB Custom Coding”