Search
Other ReReplacer questions
Forum

Replace in html help?

Odin Mayland's Avatar Odin Mayland
I am trying to replace *text** to be replaced with some html so I can style it.

It works in other parts of the site but not in this Tabs content plugin.
This replace:
www.dropbox.com/s/7lduety1w53o0ro/Screen....59.33%20PM.png?dl=0

It does not work as you can see here:
www.dropbox.com/s/k8780niux43k411/Screen....05.49%20PM.png?dl=0

Is it possible to replace text so that it looks something like this:
<span class="badge-gray">TEXT</span>
Peter van Westen's Avatar Peter van Westen ADMIN
As you can see in the screenshot, the text is inside the title attribute of the link. So replacing that with HTML containing quotes, messes up the HTML structure.
So you need to make the replacement smarter to ignore the text inside HTML tag attributes.
There are settings in the ReReplacer item for this.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
I think you are referring to the "Limit to a tag selection" and "Tag selection" settings.

I set this to Yes, but how do I prevent the title from being replaced and only allow the link-text?

a[??]
Peter van Westen's Avatar Peter van Westen ADMIN
Set it to NOT replace inside HTML tags.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
Sorry for the confusion, but I initially had "Enable in HTML tags" set to No.
https://www.dropbox.com/s/n0n40w6tdy7hxr4/Screen%20Shot%202021-11-12%20at%2012.47.04%20PM.png?dl=0

I still can't get RR to replace the anchor-text:
<a href="javascript:void(null);" title="Provision *1**">Provision *1**</a>
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give a specific example of what it is you are trying to replace with what.
So the before and after HTML...
And do you have this online?
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
So should this:
<a href="javascript:void(null);" title="Provision *1**">Provision *1**</a>
Be replaced with this?
<a href="javascript:void(null);" title="Provision *1**">Provision <span class="badge-gray">*1**</span></a>
What possible text can be between the asterisks? Is it always numbers? Can it contain other HTML?
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
The text between the * ** can be either text or number. For example, *STEP 1**
Peter van Westen's Avatar Peter van Westen ADMIN
Try:
\*([^\*<"\n]+)\*\*
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
After saving it changes that code to this:
https://www.dropbox.com/s/lo9zkrn31o6xf0j/Screen%20Shot%202021-11-13%20at%2011.57.10%20AM.png?dl=0
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
Good news, is the latest version allows your search code to not be re-formatted.
https://www.dropbox.com/s/utl8gmbrheyxcl1/Screen%20Shot%202021-11-13%20at%202.13.14%20PM.png?dl=0

But the replacement does not occur.
help.thinkiq.com/knowledge-base/getting-started/getting-started
https://www.dropbox.com/s/rivilt2t6bstz98/Screen%20Shot%202021-11-13%20at%202.12.28%20PM.png?dl=0
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
Confidential information:
(hidden)


help.thinkiq.com/knowledge-base/getting-started/getting-started
Peter van Westen's Avatar Peter van Westen ADMIN
So ReReplacer is working fine.
If you look at the HTML output (not the Element Inspector), you can see:
<div class="jwts_tabber" id="jwts_tab1"><div class="jwts_tabbertab" title="Provision *STEP 1**"><h2 class="jwts_heading"><a href="#" title="Provision *STEP 1**">Provision <span class="badge-gray">STEP 1</span></a></h2></p>
So ReReplacer is making the replacement.

The title in your website seems to be created through javascript by jwts_tabber and ignores the HTML part.

So this is a question you should ask JWTS about...

Or use Regular Labs Tabs instead of jwts_tabber! 😁
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
I was but I had to change to JWTS because our Helix template is using BS 4.
Odin Mayland's Avatar Odin Mayland
So.... I am not sure if RL Tabs was updated since we last discussed this issue or disabling the Fade was the solution, but now your Tabs is working!

help.thinkiq.com/knowledge-base/getting-started/getting-started
Odin Mayland's Avatar Odin Mayland
I always celebrate too early 🙂.

I did find another issue but it may be more the Tabs/bootstrap issue. (I can create a new ticket if you perfer)

IF I put the *text** in the beginning of the title like this:

{tab title="*3** Model"}

THEN the browser will not open that tab.

On this page:
help.thinkiq.com/knowledge-base/getting-started/getting-started
there are these errors:

2bootstrap.bundle.min.js:6 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '#3-model' is not a valid selector.
at i ( help.thinkiq.com/templates/shaper_helixu....bundle.min.js:6:585 )
at ni.show ( help.thinkiq.com/templates/shaper_helixu...undle.min.js:6:73654 )
at HTMLAnchorElement.<anonymous> ( help.thinkiq.com/templates/shaper_helixu...undle.min.js:6:75296 )
at Function.each ( help.thinkiq.com/media/jui/js/jquery.min...38238894aa945:2:3053 )
at a.fn.init.each ( help.thinkiq.com/media/jui/js/jquery.min...e38238894aa945:2:996 )
at a.fn.init.jQueryInterface [as tab] ( help.thinkiq.com/templates/shaper_helixu...undle.min.js:6:75152 )
at Object.show ( help.thinkiq.com/media/tabs/js/script.min.js?v=8.1.3.p:10:5 )
at HTMLAnchorElement.<anonymous> ( help.thinkiq.com/media/tabs/js/script.min.js?v=8.1.3.p:51:254 )
at HTMLBodyElement.dispatch ( help.thinkiq.com/media/jui/js/jquery.min...8238894aa945:2:44204 )
at HTMLBodyElement.v.handle ( help.thinkiq.com/media/jui/js/jquery.min...8238894aa945:2:40940 )




Any idea if this is resolvable?
Peter van Westen's Avatar Peter van Westen ADMIN
Well, if you are indeed using a BS4 template, then you can indeed not use Regular Labs Tabs without issues.

Please try to separate the issues caused by the tabs extension you use and the ReReplacer results.
As far as I can tell, ReReplacer is working as it should.
Please post a rating at the Joomla! Extensions Directory
Odin Mayland's Avatar Odin Mayland
I have another clue. If the Replaced text starts with a number it breaks that tab. If the Replaced text starts with a letter then it works fine.

The example is the tab "a3 Model" vs "4 Explore".

So maybe there is something in the RR item that could resolve this so you can use just a number.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription