Help Please On Bcc Code

Get help developing custom BBCodes or request one.
User avatar
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Help Please On Bcc Code

Post by CGI1984 »

I would like to add some BBCode as a shortcut to the post box. Basically we want to ad some code so that if you highlight the text and then click the BBCode shortcut button it will add the code around the text automatically. I am obviously not doing something correct because I can't get the BBCode are in ACP to accept it. Basically ou have those 2 boxes where you have to enter some code for BBCode usage and HTML replacement, but I don't really know what to put in each one. Below is an example of the code we want to have as a BBCode shortcut.

Code: Select all

[b][color=#FFFFFF]Text Goes Here[/color][/b]
Can someone please perhaps help me with what I need to put into each of the BBCode usage and HTML replacement for this? Many thanks.

User avatar
Elias
Registered User
Posts: 4996
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias

Re: Help Please On Bcc Code

Post by Elias »

CGI1984 wrote:
Sun May 10, 2020 1:54 pm
I would like to add some BBCode as a shortcut to the post box. Basically we want to ad some code so that if you highlight the text and then click the BBCode shortcut button it will add the code around the text automatically.
That should already be possible for you to do.
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|
Offering private web hosting. Contact me for details.

User avatar
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

Elias wrote:
Sun May 10, 2020 2:43 pm
CGI1984 wrote:
Sun May 10, 2020 1:54 pm
I would like to add some BBCode as a shortcut to the post box. Basically we want to ad some code so that if you highlight the text and then click the BBCode shortcut button it will add the code around the text automatically.
That should already be possible for you to do.
Yes it is, but it is 3 clicks. We want to create our own shortcut to reduce it to one click.

User avatar
Lumpy Burgertushie
Registered User
Posts: 67740
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help Please On Bcc Code

Post by Lumpy Burgertushie »

there is already a bold bbcode in the list and a color bbcode.

try it like this:

type or highlite the text you want.
your text
click on the droplet bbcode button next to the font size dropdown.
click on the color you want.
which will show this:

[color=#FF0000]your text[/color]

then, highlite that whole string and click on the B bbcode button and it will look like this:
[b][color=#FF0000]your text[/color][/b]

which displays this:
your text

see, no need for a new bbcode.

now if you still want to create a bbcode to do it exactly the same way every time. same color and bold,
you can do that.
robert

EDIT:

Ok, here is how to create a special bbcode to do this the same way everytime you use it.

I have named this bbcode "mine" you can rename it to whatever you want.

bbcode: [mine]{SIMPLETEXT}[/mine]

html replacement: <span style="color:red; font-weight: bold;">{SIMPLETEXT}</span>

set it to show on posting page if you wish.
submit.

then, in a post simpy highlite the text you want and click on the new bbccode button named "mine' or whatever you called it.


done.

robert
Last edited by Lumpy Burgertushie on Sun May 10, 2020 3:11 pm, edited 1 time in total.
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
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

Lumpy Burgertushie wrote:
Sun May 10, 2020 2:59 pm
there is already a bold bbcode in the list and a color bbcode.

try it like this:

type or highlite the text you want.
your text
click on the droplet bbcode button next to the font size dropdown.
click on the color you want.
which will show this:

[color=#FF0000]your text[/color]

then, highlite that whole string and click on the B bbcode button and it will look like this:
[b][color=#FF0000]your text[/color][/b]

which displays this:
your text

see, no need for a new bbcode.

now if you still want to create a bbcode to do it exactly the same way every time. same color and bold,
you can do that.
robert
Thank you. Yes, I have been using the 3 click method you explained. I would like to create the bbcode to do it exactly the same way every time. I was hoping someone could help me with what I need to put in the two boxes to create a custom bbcode rule because I don't know how to do it. Thanks.

User avatar
Lumpy Burgertushie
Registered User
Posts: 67740
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help Please On Bcc Code

Post by Lumpy Burgertushie »

I edited my post above to include those instructions.

luck,
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
Elias
Registered User
Posts: 4996
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias

Re: Help Please On Bcc Code

Post by Elias »

He edited his post with exactly what you want! :P

Edit: dammmm the timings
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|
Offering private web hosting. Contact me for details.

User avatar
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

Lumpy Burgertushie wrote:
Sun May 10, 2020 3:12 pm
I edited my post above to include those instructions.

luck,
robert
Thank you. I put in as you said, but I changed the color to white (you had red):

[BW]{SIMPLETEXT}[/BW]
<span style="color:white; font-weight: bold;">{SIMPLETEXT}</span>


The button is there, it works when I click on it, but after I hit submit to publish the post then the result is nothing except the text I highlighted has this around it: [BW][/BW].

I guess I did something wrong?

User avatar
Lumpy Burgertushie
Registered User
Posts: 67740
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help Please On Bcc Code

Post by Lumpy Burgertushie »

you are showing a space between the BW brackets and the SIMPLETEXT brackets.

if that is truly there, remove it and try again.

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
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

Thanks. It was only in my post. But in my BBCode it is correct.

I also changed color to font color and still doesn't work. Now I have and still doesn't work either:

[BW]{SIMPLETEXT}[[/BW]

<span style="color:red; font-weight:bold;">{SIMPLETEXT}</span>

User avatar
Lumpy Burgertushie
Registered User
Posts: 67740
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help Please On Bcc Code

Post by Lumpy Burgertushie »

how about a screen capture image of the bbcode page where you created it.

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
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

Great idea!
Screen.jpg

User avatar
Lumpy Burgertushie
Registered User
Posts: 67740
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Help Please On Bcc Code

Post by Lumpy Burgertushie »

ok, that looks alright.
try changing the name of the bbcode to something else or using lowercase to see if that makes a difference.


rob ert
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
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

That did it, thanks. It was the uppercase that was the issue. Lower case and now it works. You can also have the first letter capitalized and it still works, but not all letters it seems.

User avatar
CGI1984
Registered User
Posts: 157
Joined: Thu Feb 20, 2020 8:27 am

Re: Help Please On Bcc Code

Post by CGI1984 »

If we would like to create a BBCode button to insert an image that is hosted on our server by adding a link to the image, then how would we create BBCode please for the following?

[img]https://mysite/image.png[/img]

Post Reply

Return to “Custom BBCode Development and Requests”