horizontal line

Get help developing custom BBCodes or request one.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: horizontal line

Post by Mick »

Have a read of: Knowledge Base - Adding Custom BBCodes in phpBB3

Roberts code sample works and this is what it should look like in the ACP:

BBCode usage:

Code: Select all

[hr][/hr]
HTML replacement:

Code: Select all

<hr style="height:5px;border:none;color:#000;background-color:#000;" />
Help line:

Code: Select all

Creates a horizontal line.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: horizontal line

Post by DWFII »

Thank you to both Roberts and Mick. I was hoping for something variable in terms of height (thickness ) and perhaps even colour. But this will do.

Again, sincere thanks and much appreciated.
DWFII
In the High Desert of Central Oregon
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: horizontal line

Post by Mick »

DWFII wrote:I was hoping for something variable in terms of height (thickness ) and perhaps even colour
Adding variables would be quite complicated for the users as they would have to add several pieces of information but I don't think it's impossible. If you want it customisable you may be better off requesting an extension, if there isn't one already, or you could create several BBCodes with the parameters you want but it seems a bit of an overkill.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: horizontal line

Post by Lumpy Burgertushie »

do you mean something you can change each time you use the bbcode or do you just want one hr bbcode but different thickness and color than what I posted?

if it is the latter, then you simply change the pixels to what you want and the color to what you want.


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.
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: horizontal line

Post by DWFII »

Lumpy Burgertushie wrote:do you mean something you can change each time you use the bbcode or do you just want one hr bbcode but different thickness and color than what I posted?

if it is the latter, then you simply change the pixels to what you want and the color to what you want.


robert
I meant user changeable. But I understand the html replacement and how it works and probably it will be more than sufficient.
DWFII
In the High Desert of Central Oregon
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: horizontal line

Post by DWFII »

Lumpy Burgertushie wrote:show us the exact html replacement you are using for your custom hr bbcode.

then we can give you exact css to add to that code.

for instance, is you want a hr to be 5pixels wide/thick and black your html replacement would be like this:


Code: Select all

<hr style="height:5px;border:none;color:#000;background-color:#000;" />
robert
this will work I'm almost certain--it's in the clipboard right now so soon as I get done asking one more question I'm headed for th eACP.

Question: setting the colour...is that in hex then?
DWFII
In the High Desert of Central Oregon
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: horizontal line

Post by DWFII »

Perfect. Thank you all.

If you guys are even mildly interested...

Crispin Colloquy posting with horizontal lines
DWFII
In the High Desert of Central Oregon
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: horizontal line

Post by Lumpy Burgertushie »

nice work. I was wondering what you were doing with this.

you could setup several different bbcodes for different colors. just name then with the color:

[redhr][/redhr]

html:
<hr style="height:5px;border:none;color:#F9072B;background-color:#F9072B;" />

etc. etc.

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.
DWFII
Registered User
Posts: 386
Joined: Fri Oct 20, 2006 2:17 am
Name: D.W.
Contact:

Re: horizontal line

Post by DWFII »

Lumpy Burgertushie wrote:nice work. I was wondering what you were doing with this.

you could setup several different bbcodes for different colors. just name then with the color:

[redhr][/redhr]

html:
<hr style="height:5px;border:none;color:#F9072B;background-color:#F9072B;" />

etc. etc.

robert
That's interesting.

Right now, using the bbcode/html replacement you provided earlier, all horizontal lines...even those posted previously...are affected--reformatted to be thicker. So if I changed the html replacement to make the horizontal lines red, I assume all horizontal lines on the forum would turn red.

I understand that if I defined a different bbcode to be red then only the [redhr] would be red. But that could get cumbersome...with many different coloured and many different thicknesses of [hr] defined in the editing window--[redhr], [bluehr], [greenhr], [thickhr], [thinhr], [thinredhr], [medredhr], [thinbluehr] etc.. Not an attractive scenario.

It is passing strange to me that that kind of process doesn't work the same way for font colours. Glad it doesn't.
DWFII
In the High Desert of Central Oregon
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: horizontal line

Post by Lumpy Burgertushie »

I can't think of a way that changing a bbcode could affect anything on the board other than that exact bbcode.

however, just to be sure, change your main hr bbcode like this:

bbcode: [hrcode][/hrcode]
html replacement: same as before

there is no possible way that making a new bbcode like redhr could do anything other than create a red hr in only the post you are using it in.


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
R3gi
Registered User
Posts: 126
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: horizontal line

Post by R3gi »

Hello,
please is there some way to have only [hr] tag? Not [hr][/hr]. HR is not a pair tag...
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: horizontal line

Post by Lumpy Burgertushie »

R3gi wrote:Hello,
please is there some way to have only [hr] tag? Not [hr][/hr]. HR is not a pair tag...
sorry, what does that mean? if you want to create a hr bbcode you must have both the open and close tags for it. the html replacement does not need a closing tag but the bbcode does.

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
R3gi
Registered User
Posts: 126
Joined: Mon May 05, 2014 4:33 pm
Location: Czech Republic
Contact:

Re: horizontal line

Post by R3gi »

So the BBCode still can't have only one tag (not open and close tags)? Hmm, that's not very user-friendly…
steve1200
Registered User
Posts: 39
Joined: Wed Sep 06, 2017 6:38 pm
Location: Ohio
Name: Steven Davis

Re: horizontal line

Post by steve1200 »

I'm a little late getting here but I wrote a BBcode for this on by board. You can set the color and height in your post. Click here to get the code.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: horizontal line

Post by Mick »

You should make a new contribution here: https://www.phpbb.com/customise/db/custom_bbcodes-26
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “Custom BBCode Development and Requests”