Space between BB tags

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
rsandr
Registered User
Posts: 39
Joined: Fri Nov 27, 2009 9:47 am
Location: East Lancs, UK
Contact:

Space between BB tags

Post by rsandr »

When posting if you click on (for example) the quote button the tags are bumped up together. I have been asked by a user if there can be a space between them.

I know the cursor falls inbetween them but they ask and I try to help, you know how it is.

Ta,
Rick
User avatar
Tom
Former Team Member
Posts: 2665
Joined: Tue Jun 20, 2006 2:12 am
Name: Tom Catullo
Contact:

Re: Space between BB tags

Post by Tom »

Open the file styles/prosilver/template/posting_buttons.html and find this:

Code: Select all

var bbtags = new Array('[b] ','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]
Replace with:

Code: Select all

var bbtags = new Array('[b] ','[/b]','[i] ','[/i]','[u] ','[/u]','[quote] ','[/quote]','[code] ','
','
  • ','
','
  • ','
','[img] ','[/img]',' ','','[flash=] ', '[/flash]','[size=] ','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]
If it doesn't work at first, purge the cache in the ACP and then try it again.
Tom Catullo - Former Moderator Team Member
phpBB3 Smiley Pak Generator | Legend Repositioning MOD | My GitHub | My Site
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Space between BB tags

Post by Pony99CA »

Tom wrote:Open the file styles/prosilver/template/posting_buttons.html and find this:

Code: Select all

var bbtags = new Array('[b] ','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]
Replace with:

Code: Select all

var bbtags = new Array('[b] ','[/b]','[i] ','[/i]','[u] ','[/u]','[quote] ','[/quote]','[code] ','
','
  • ','
','
  • ','
','[img] ','[/img]',' ','','[flash=] ', '[/flash]','[size=] ','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);[/code]
If it doesn't work at first, purge the cache in the ACP and then try it again.
I think you misunderstood the question. When you push the Quote button, you get the following:

Code: Select all

[quote][/quote]
He wants this:

Code: Select all

[quote] [/quote]
(Note the space between the tags.)

No, I don't understand why the user can't just press the space bar, either. :D

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
Tom
Former Team Member
Posts: 2665
Joined: Tue Jun 20, 2006 2:12 am
Name: Tom Catullo
Contact:

Re: Space between BB tags

Post by Tom »

Pony99CA wrote:I think you misunderstood the question. When you push the Quote button, you get the following:

Code: Select all

[quote][/quote]
He wants this:

Code: Select all

[quote] [/quote]
(Note the space between the tags.)
No, I did not misunderstand the question. The code I posted worked exactly as planned on my test board, and does exactly what you said it should. Did you even try the code before denying its relevance?
Tom Catullo - Former Moderator Team Member
phpBB3 Smiley Pak Generator | Legend Repositioning MOD | My GitHub | My Site
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Space between BB tags

Post by Pony99CA »

Tom wrote:No, I did not misunderstand the question. The code I posted worked exactly as planned on my test board, and does exactly what you said it should. Did you even try the code before denying its relevance?
No, I didn't try it; I have no interest in putting a space there. I thought editing the style file was adding a space between the buttons themselves, not the code generated by pushing the buttons. After all, why would the BBCode generated by the button be in a style file at all? (It should be in core code, IMHO, and pushing the button should call that core code. Otherwise the user would have to edit every style they supported to change generated BBCode.)

If your code actually does what was requested, my apologies for misunderstanding. But, as I said, it doesn't make much sense to have the generated code in a style file, so I hope you can understand the confusion.

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
ric323
Former Team Member
Posts: 22910
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Space between BB tags

Post by ric323 »

I think you're digging a deeper hole for yourself Steve.
Guessing how the code "should" work doesn''t substitute for a simple test when you're saying someone is wrong. ;)
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions
User avatar
Tom
Former Team Member
Posts: 2665
Joined: Tue Jun 20, 2006 2:12 am
Name: Tom Catullo
Contact:

Re: Space between BB tags

Post by Tom »

Pony99CA wrote:If your code actually does what was requested, my apologies for misunderstanding. But, as I said, it doesn't make much sense to have the generated code in a style file, so I hope you can understand the confusion.
I can understand why you misunderstood the code I posted. I was actually quite surprised to find the code in a style file, as well. The reason I went right to the style file was because I remembered having seen it in a style file in the past, so I knew not to check in the core. However, had I never come across this code in the style files before, I would have also suspected that the code for BBCode tag generation would be located in the core as well. ;)
Tom Catullo - Former Moderator Team Member
phpBB3 Smiley Pak Generator | Legend Repositioning MOD | My GitHub | My Site
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: Space between BB tags

Post by Pony99CA »

ric323 wrote:I think you're digging a deeper hole for yourself Steve.
Guessing how the code "should" work doesn''t substitute for a simple test when you're saying someone is wrong. ;)
I think Tom understood where I was coming from and I apologized for misunderstanding his post, so I'm not sure how explaining my thought process makes things worse. It's a statement of why I came to that conclusion, nothing more.

However, please note that I never said that he was wrong, just that I thought that he had misunderstood the question and answered that wrong question. That's quite different, I think. Apparently I was the one who had misunderstood the answer, so I apologized.

Nobody's perfect, so I hope the flagellation of the deceased equine can stop now. :D

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.
rsandr
Registered User
Posts: 39
Joined: Fri Nov 27, 2009 9:47 am
Location: East Lancs, UK
Contact:

Re: Space between BB tags

Post by rsandr »

Thanks Tom, I had been trying to crowbar a space into bbcode.html but the above works a treat.

Now move on people, there's nothing more to see here! ;)
Locked

Return to “[3.0.x] Support Forum”