How I can replace a specific string of text anytime it appears?

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
jtb33
Registered User
Posts: 76
Joined: Thu Dec 02, 2004 11:36 pm

How I can replace a specific string of text anytime it appears?

Post by jtb33 »

My title is a bit of a stretch, because it won't be a static item.

Basically, anytime someone posts a link to a youtube video, I want it to automatically encapsulate it in the BBVIDEO tags even if they have explicitly used the URL tags on it so that it will always embed the video instead of a link to it.

Is this possible?
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How I can replace a specific strong of text anytime it appears?

Post by Lumpy Burgertushie »

install this: viewtopic.php?f=616&t=2414716&p=1482099 ... #p14688926
that way people just have to post the link and it will embed the video in the post.


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.
jtb33
Registered User
Posts: 76
Joined: Thu Dec 02, 2004 11:36 pm

Re: How I can replace a specific strong of text anytime it appears?

Post by jtb33 »

Thanks. Already installed that and it almost works like I need it to. Problem is that if someone has explicitly used the

Code: Select all

[URL] [/URL]
tags for youtube links, it will ignore those youtube videos and just post a hyperlink rather than imbed them.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How I can replace a specific strong of text anytime it appears?

Post by Lumpy Burgertushie »

why would anyone do that? personally, the only time I ever use the url bbcode is the url= bbcode .
if you post a url phpbb automatically makes it a link anyway so there is really no reason to use the url bbcode.

post some instructions to explain to people how to do it properly. that seems to be the easiest way to solve a lot of those type of things.

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
Toxyy
Registered User
Posts: 942
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: How I can replace a specific strong of text anytime it appears?

Post by Toxyy »

jtb33 wrote: Sun Jun 24, 2018 10:56 pm Thanks. Already installed that and it almost works like I need it to. Problem is that if someone has explicitly used the

Code: Select all

[URL] [/URL]
tags for youtube links, it will ignore those youtube videos and just post a hyperlink rather than imbed them.
That sounds like a user error as you've already provided them with the means of making it embedded. What if they really did only want to post a url to youtube? Then you'll have users trying to do that case contact you instead.
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
jtb33
Registered User
Posts: 76
Joined: Thu Dec 02, 2004 11:36 pm

Re: How I can replace a specific strong of text anytime it appears?

Post by jtb33 »

I think a lot of the reason people do that is that there was a time that forum software didn't auto-convert links and unless you used the BBCODE it would just be a non-hyperlinked URL.

We all know how well users will read the FAQ or other info, which is why I was looking for a programmatic way around it.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72341
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: How I can replace a specific strong of text anytime it appears?

Post by KevC »

Toxyy wrote: Mon Jun 25, 2018 1:15 am What if they really did only want to post a url to youtube?
They can just put code tags around it and it won't be parsed.

Which is more likely to be the outcome? That they do or don't want the link parsed?
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
Post Reply

Return to “[3.2.x] Support Forum”