Keyword replace with html?

kailew

Active member
Hello,
in XF 1.x I used an addon, which could replace an string like "xyz" with html which made it very easy to use abbreviatios for some more complex html text like my board name in colors. Is there a similar function in XF 2.x?

Thx for your help.

Kai
 
sorry, it was moved here, but this is NOT an add-on request. I'm asking about a function in XF and I'm not looking for an add-on
 
I may not have fully understood your request, but this addon might be useful to you?

 
Hi, works not for me, because the html is not parsed ... I think this is much complicated for me, I'm a kind of noob who needs an easier solution. This old add-on was very nice ...

Kai
 
Hi there, I've had a similar situation where I needed to replace [ATTACH type="full"] with [ATTACH] in almost all of my XenForo articles that had an image.

To do this, I used the following query through PhpMyAdmin: UPDATE xf_post SET message = replace(message, '[ATTACH type="full"]', '[ATTACH]')

In my case, only the xf_post table was involved.

However, I'm not sure what you need to replace or in which table it is located.

In any case, you should be extremely cautious when modifying things in the database and I recommend you not to do it yourself, but to hire an expert to help you.

I just wanted to share my solution and I don't want to encourage you to do the same.
 
Hi Miri,
thx for your help.

What I'm looking for is a simple on the fly replacement for keywords and random strings. For example with this old add-on it was possible to use any string like "XYZ" and replace it with HTML or BBCODE. This was very useful maybe if you change someones username. I used this tool to change it everywhere and could also link it to the profile. This is a little bit like censorship but easier and more complex. I know that I can change it in the database, but this is more complex and could result in unwanted effects ...

So I decided to use BBCODE which is a little less comfortable ...

Kai
 
Worth every penny.

 
  • Like
Reactions: eL_
But no replacement ... what a pity ...


This was an very easy but useful tool and a useful function without big knowledge of coding, regex or php ...

Kai
 
But no replacement ... what a pity ...


This was an very easy but useful tool and a useful function without big knowledge of coding, regex or php ...

Kai
Did you take a look at the addon I posted? It doesn't require you to know coding, regex or php. It does what you want to do although not sure what you mean with html replacement. Ask in the addons thread before you buy so you are on the safe side.
 
Yes, I've took a look ... What I need is not only linking existing strings/keywords but also replacing those with html/bbcode: If you type for example "xyz" you get MyNiceDiscussionBoard maybe with link or without. This was possible with the old add-on or also only linking or any other replacement on the fly. If a member changed his Username from BadUserGuy to BestUserEver, I changed it with this tool everywhere. In each post, also in quotes, very useful.
 
Oh I see ... but sure, that you can use HTML/BBCODE as replacement?

Kai
As far as I know you can replace with anything you want. Should work. But I would need to test but can't right now.

Just be on the safe side and ask on the addon's thread.
 
Back
Top Bottom