BBCode to greet New User

Get help developing custom BBCodes or request one.
User avatar
Hellendor
Registered User
Posts: 73
Joined: Sat Nov 24, 2018 12:53 am
Location: Alcobendas, Madrid
Name: Isma

BBCode to greet New User

Post by Hellendor »

Hi all...

I am trying to create a BBCode that when typing

Code: Select all

[newu]Name User[/newu]
That user will be recognised as a registered user and will get a welcome message, for example:

Hello user-name, welcome to the Forum.
We are waiting for you in the Presentation area to get to know you a little better.
Best regards!

With my limited knowledge I have only managed to do the following:

BBCODE:

Code: Select all

[newu]{TEXT}[/newu]
HTML:

Code: Select all

Hello <span style=‘text’; colour: #105289;><strong>{TEXT}</strong></strong></span> and welcome to the Forum.<br />
We are waiting for you in the&nbsp;<span style=‘colour: #ff0000;’><a style=‘colour: #ff0000;’ href=‘https://www.-----.com’><strong>Presentation</strong></a></strong></span>&nbsp;><strong>to get to know you a little better.<br />
Greetings!
But I can't get it to recognise the user and I can't get it to show in colour what I have marked. Can you help me?

Best regards.

NOTE: Sorry if I shouldn't put this help here.
Be yourself, except if you're stupid, then it is better that you be another one.
I Amiga
- www.WinUAEspanol.com
I know, my english is very bad, sorry...
User avatar
Mannix_
Registered User
Posts: 2038
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: BBCode to greet New User

Post by Mannix_ »

Hellendor wrote: Wed Jan 01, 2025 10:41 pm HTML:

Code: Select all

Hello <span style=‘text’; colour: #105289;><strong>{TEXT}</strong></strong></span> and welcome to the Forum.<br />
We are waiting for you in the <span style=‘colour: #ff0000;’><a style=‘colour: #ff0000;’ href=‘https://www.-----.com’><strong>Presentation</strong></a></strong></span> ><strong>to get to know you a little better.<br />
Greetings!
This isn't a correct way to write html try this

HTML:

Code: Select all

Hello <span style="color: #105289;"><strong>{TEXT}</strong></strong></span> and welcome to the Forum.<br />
We are waiting for you in the <span style="color: #ff0000;"><a style="color: #ff0000;" href="https://www.-----.com"><strong>Presentation</strong></a></strong></span> ><strong>to get to know you a little better.<br />
Greetings!
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
Hellendor
Registered User
Posts: 73
Joined: Sat Nov 24, 2018 12:53 am
Location: Alcobendas, Madrid
Name: Isma

Re: BBCode to greet New User

Post by Hellendor »

Hello Mannix_

First of all thank you very much for your quick help, now I'll tell you what happens with your help....

I had to remove a couple of repeated commands that did nothing and now it is cleaner. The only thing is that it still doesn't recognise the user and doesn't give colour to the user or to the Presentation link.

Hello Hellendor and welcome to the Forum.
We are waiting for you in the Presentation area to get to know you a little better.
Best regards!

That's how it looks like.

I have another BBCode made that recognises the user and gives him the colour that corresponds to him if I pass the mouse over it, so I have it done and it is like this

Code: Select all

[user]{TEXT}[/user]

Code: Select all

<div style=‘text’>{TEXT}</div>
As you can see it is very simple and works perfectly, it is what I would like to achieve but in the other way that I have shown you.
I don't know why in my phpBB3 website it doesn't work...
Be yourself, except if you're stupid, then it is better that you be another one.
I Amiga
- www.WinUAEspanol.com
I know, my english is very bad, sorry...
User avatar
Mannix_
Registered User
Posts: 2038
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: BBCode to greet New User

Post by Mannix_ »

I'm failing to see what is suppose to recognize the user and give him color? Do you have some kind of js script running for it or something else?
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
Hellendor
Registered User
Posts: 73
Joined: Sat Nov 24, 2018 12:53 am
Location: Alcobendas, Madrid
Name: Isma

Re: BBCode to greet New User

Post by Hellendor »

No, I don't have any js script, that's why I don't understand why it doesn't work.
Be yourself, except if you're stupid, then it is better that you be another one.
I Amiga
- www.WinUAEspanol.com
I know, my english is very bad, sorry...
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode to greet New User

Post by Brf »

I am not sure what you are trying to accomplish, but style=‘text’ means nothing to a span or div. Also, there is no tag called colour. It should be spelled color
User avatar
Mannix_
Registered User
Posts: 2038
Joined: Sun Oct 25, 2015 2:56 pm
Name: Matt

Re: BBCode to greet New User

Post by Mannix_ »

Can you show us that working bbcode in action? I'm hella confused why and how it is working.
Did I helped You? Consider a donation.
New version of phpBB has been released? My styles aren't validated for it yet? Check my page for the latest downloads!
User avatar
Hellendor
Registered User
Posts: 73
Joined: Sat Nov 24, 2018 12:53 am
Location: Alcobendas, Madrid
Name: Isma

Re: BBCode to greet New User

Post by Hellendor »

Hi Brf

This is how I have it set up...

Code: Select all

Muy buenas <span style="color: #105289;"><strong>{TEXT}</strong></span> y bienvenido al Foro.<br />
Te esperamos en la zona de <span style="color: #ff0000;"><a style="color: #ff0000;" href="https://www.winuaespanol.com"><strong>Presentación</strong></a></span> para conocerte un poco mejor.<br />
Un saludo!
So, where {TEXT} is, is where the user-name should appear, understanding that, for example, if I hover over it and click the mouse, it will take me to the user's profile.

In my forum if we write [user]pingui[/user] directly Pingui will appear in red because he is the Founder (it's me) and if we write the name of another user it will appear in the corresponding color. I have achieved this with the bbcode I mentioned before.

Code: Select all

[user]{TEXT}[/user]

Code: Select all

<div style="text">{TEXT}</div>
And with the idea that this bbcode would work for the user's name, I wanted to create one to welcome the new user who introduces himself with the text I have shown you.
Be yourself, except if you're stupid, then it is better that you be another one.
I Amiga
- www.WinUAEspanol.com
I know, my english is very bad, sorry...
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53599
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: BBCode to greet New User

Post by Brf »

You cannot do that with a bbcode directly. A bbcode cannot "look up" a user to see what color they should be. All a bbcode does is take your "TEXT" parameter and replace it with the text you type into the post.

If you type

Code: Select all

 [newu]Santa Claus[/newu]
into your post, it would replace the TEXT with "Santa Claus". Your bbcode would have no idea whether Santa Claus is a user of your board or not. If you have some special [user] bbcode, then you must have an extension that is enabling the bbcode to do that.
User avatar
Hellendor
Registered User
Posts: 73
Joined: Sat Nov 24, 2018 12:53 am
Location: Alcobendas, Madrid
Name: Isma

Re: BBCode to greet New User

Post by Hellendor »

Ok Brf,

Then I can leave it as I have it and that's it, so at least if I can send the Welcome greeting to the user, even if it comes out in black, because I've seen that you can't give a fixed colour X to the user and the link.

Thank you very much for your help.

Anyway, if you know how I can give colour, I will be grateful.

Thanks again.
Be yourself, except if you're stupid, then it is better that you be another one.
I Amiga
- www.WinUAEspanol.com
I know, my english is very bad, sorry...
User avatar
warmweer
Jr. Extension Validator
Posts: 12000
Joined: Fri Jul 04, 2003 6:34 am
Location: somewhere in the space-time continuum

Re: BBCode to greet New User

Post by warmweer »

Honestly, I see no added value in a bbcode like that unless your text remains the same throughout (but for the user name).
Why not just create and save a draft welcome text which you could then copy?

On a side note, what you're requesting is basically a welcome and introduction to the board: something that could be a welcome post/topic (perhaps even a forum with informational sections) OR just simply a welcome PM.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
Steve
Registered User
Posts: 1598
Joined: Tue Apr 07, 2009 7:48 pm
Location: Co. Durham, England
Name: Steven Clark

Re: BBCode to greet New User

Post by Steve »

You could use the quote system like this to tag a user without an extension.
Hellendor wrote: I'm new here :D
You need the username and user_id to be correct.

Code: Select all

[quote=Hellendor  user_id=1878526]
Welcome Aboard :D 
[/quote]
Just a little tip.
@ The Chief Medical Officers guideline for men is that: You are safest not to drink regularly more than 14 units per week.
- I drank that today++ :lol: 🍺
User avatar
RMcGirr83
Former Team Member
Posts: 22092
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: BBCode to greet New User

Post by RMcGirr83 »

warmweer wrote: Thu Jan 02, 2025 6:40 pm On a side note, what you're requesting is basically a welcome and introduction to the board: something that could be a welcome post/topic (perhaps even a forum with informational sections) OR just simply a welcome PM.
https://www.phpbb.com/customise/db/exte ... e_welcome/
If it helps the OP
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then you can support me by buying a beer 🍺
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6819
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: BBCode to greet New User

Post by HiFiKabin »

Simple Mentions will allow you to tag any member in a post, which is what you are looking for (I think)

Return to “Custom BBCode Development and Requests”