URL Links In BBCode? [Prosilver Dark Edition]

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
Post Reply
User avatar
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

URL Links In BBCode? [Prosilver Dark Edition]

Post by Pfizz »

Is it possible to put URL links into BBCode and then have the link show as text with a blue line underneath the link so that people realize it is an actual link?

It seems that if I create a BBCode and use it as a member's signature that the text link does get a blue line underneath it, but if I put the same BBCode into the post body of a topic then the blue line doesn't appear under the text.

I am using the following code format to create the hyperlinks in my BBCode: <a href="https://mysitecom/"> My Site</a>

If I use another type of HTML URL link code in the BBCode would that help to get the blue line to appear within post message bodies when using a BBCode?
Last edited by P_I on Sat Mar 18, 2023 12:30 pm, edited 1 time in total.
Reason: Update Subject for specific style
User avatar
warmweer
Jr. Extension Validator
Posts: 11195
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: URL Links In BBCode?

Post by warmweer »

Pfizz wrote: Fri Mar 17, 2023 6:06 pm Is it possible to put URL links into BBCode and then have the link show as text with a blue line underneath the link so that people realize it is an actual link?

It seems that if I create a BBCode and use it as a member's signature that the text link does get a blue line underneath it, but if I put the same BBCode into the post body of a topic then the blue line doesn't appear under the text.
Perhaps I'm not understanding what you want

but the default BBcode already shows a blue underlining (that is using prosilver)

[url=https://www.phpbb.com]The phpBB Forum[/url] >>> The phpBB Forum

[url]https://www.phpbb.com[/url] >>> https://www.phpbb.com
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
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

Re: URL Links In BBCode?

Post by Pfizz »

Thanks. It doesn't seem to work for us that way though. We are using Pro Silver Dark. Maybe something isn't set right on our forum, but not sure what it could be. Like I said the blue line under the link works fine in BBCode for signatures. And it works in a topic message post if not using BBCode. But with BBCode in a topic message post it doesn't work.
User avatar
Gumboots
Registered User
Posts: 692
Joined: Fri Oct 11, 2019 1:59 am

Re: URL Links In BBCode?

Post by Gumboots »

This really should be in the support board for Prosilver Dark Edition. ;)
https://www.phpbb.com/customise/db/styl ... rk/support

However, the relevant code appears to be this, in links.css:

Code: Select all

/* Post body links */
.postlink {
	text-decoration: none;
	border-bottom: 1px solid transparent;
	padding-bottom: 0;
}

.postlink:hover {
	text-decoration: none;
}

This should give a permanent underline:

Code: Select all

/* Post body links */
.postlink {
	text-decoration: underline;
	border-bottom: 1px solid transparent;
	padding-bottom: 0;
}

.postlink:hover {
	text-decoration: underline;
}

Or, if you only want the underline on hover, just use this:

Code: Select all

.postlink:hover {
	text-decoration: underline;
}

Note that for tweaks like this it's probably better to put them somewhere more convenient, so they are easy to find and reinstate if you update the style to a newer version. At the end of dark.css would work. Just add your tweaks there, and make a backup copy of the file before updating.
🇺🇦 Слава Україні! 🇺🇦 Героям слава! 🇺🇦
User avatar
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

Re: URL Links In BBCode?

Post by Pfizz »

Thanks.

I changed it to:

text-decoration: underline;

But nothing has changed on the site. We still get the underline only on hover as we did previously and the underline only in gray and not in blue as it should be.

I edited the file in Notepad++, then uploaded the new one, then cleared the cache. So I think I did everything right, but result still the same.

Ghost in the machine. :lol:
User avatar
Gumboots
Registered User
Posts: 692
Joined: Fri Oct 11, 2019 1:59 am

Re: URL Links In BBCode?

Post by Gumboots »

Ok, in that case give people a direct link to a live example of the issue.

ETA: Really, this should be standard practice for any support requests related to presentation. It makes diagnosis a lot easier.
🇺🇦 Слава Україні! 🇺🇦 Героям слава! 🇺🇦
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26456
Joined: Fri Aug 29, 2008 9:49 am

Re: URL Links In BBCode?

Post by Mick »

warmweer wrote: Fri Mar 17, 2023 6:26 pmbut the default BBcode already shows a blue underlining (that is using prosilver)
And it even does that without using any BBCode https://www.phpBB.com> https://www.phpbb.com/
  • "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
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

Re: URL Links In BBCode?

Post by Pfizz »

Yes, on our site it does it without BBCode too as it should. And it does it with BBCode within member signatures. But it only doesn’t do it with BBCode containing links used within topic message posts.

After spending a lot of time to try to fix it already, I think we are just going to live with it. It isn’t such a critical site issue.

Thank you for all the input.
User avatar
warmweer
Jr. Extension Validator
Posts: 11195
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: URL Links In BBCode?

Post by warmweer »

Just in case: I can change colour of the url BBcode decorations in prosilver and also in Prosilver Dark edition, but for the Dark edition the .css to be edited is in the Dark edition package (not the prosilver files).
Are you sure you edited the correct files + clearing board cache may not be sufficient. You may also need to clear browser cache.
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
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

Re: URL Links In BBCode?

Post by Pfizz »

Thanks, yes, I rechecked and I did edit the file styles>theme>prosilver_dark>links.css on the server. This is the code now in the file:

Code: Select all

/* Post body links */
.postlink {
	text-decoration: underline;
	border-bottom: 1px solid transparent;
	padding-bottom: 0;
}

.postlink:hover {
	text-decoration: none;
}
I then tested in in multiple browsers and on multiple devices in case it was a cache issue and its still the same for all.

I also just edited the prosilver css file with the same change to be sure and still the same.
User avatar
Gumboots
Registered User
Posts: 692
Joined: Fri Oct 11, 2019 1:59 am

Re: URL Links In BBCode?

Post by Gumboots »

Gumboots wrote: Fri Mar 17, 2023 9:10 pm Ok, in that case give people a direct link to a live example of the issue.

ETA: Really, this should be standard practice for any support requests related to presentation. It makes diagnosis a lot easier.
Quoting for emphasis.

If you let people see exactly what code is running on your site, they will be able to pick where the problem is.

If you continue to refuse to let people see what code is running on your site, they will be unable to see what the problem is.

If you do not want a diagnosis and a solution, why bother posting this topic in the first place?
🇺🇦 Слава Україні! 🇺🇦 Героям слава! 🇺🇦
User avatar
Pfizz
Registered User
Posts: 86
Joined: Tue Aug 10, 2021 9:39 am

Re: URL Links In BBCode? [Prosilver Dark Edition]

Post by Pfizz »

Fixed the problem. We now use the following URL link code format within our BBCodes and this gives us the result we want. We now get dark gray and bold text on the link with the light blue underline underneath the link which lets people know that its an active link. Problem solved.

Code: Select all

<a href="https://mysite.com/"><span style="color:#9d9d9d; font-weight:bold; text-decoration: underline #40bfff;">mysite</span></a>
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26456
Joined: Fri Aug 29, 2008 9:49 am

Re: URL Links In BBCode?

Post by Mick »

Gumboots wrote: Fri Mar 17, 2023 7:41 pmThis really should be in the support board for Prosilver Dark Edition
@OP: In future please make sure you post in the proper place for the best results. I realise the author isn’t giving any modification help here but styles support would have been better.

Please read Are You In The Right Place?
  • "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 “phpBB Custom Coding”