Search
Other ReReplacer questions
Forum

Replace in title in body and in title head

Stefano D'Eliseo's Avatar Stefano D'Eliseo
Hi, I'm using ReReplacer because I need to write information in mymap location component that should not appear when visiting the website.

I was thinking of inserting something like this in the title:

[C]text[/C]

and insert a replacement like this:

[C]
becomes
{hide accessgrouplevels="Guest,Registered"}

[/C]
becomes
{/hide}

Unfortunately it doesn't work, if I set it to replace everywhere, it inhibits the map.
If I say to stop at the body, it works but not everywhere.
If I say to look in the head, it still doesn't work and leaves the content.

What am I doing wrong?
Peter van Westen's Avatar Peter van Westen ADMIN
Why are you trying to replace it with Conditional Content tags? Why not use ReReplacer to remove the content directly using the Conditions?
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
With Regular Expressions search for:
\[C\](.*?)\[/C\]

Replace with nothing.

Use the conditions to assign it to the usergroups you want.
Then use the "Else: Replace with something else" with:
\1
Please post a rating at the Joomla! Extensions Directory
Stefano D'Eliseo's Avatar Stefano D'Eliseo
Unfortunately it doesn't work.

I set it to replace everywhere.

If I insert \1 in "replace", this happens:

[C]CUSTOMER NAME[/C]

I would like everything written between the two Cs to not be displayed on the website at all, instead it writes like this:

[C]MARIO ROSSI

and in the map it writes it in full anyway.
Stefano D'Eliseo's Avatar Stefano D'Eliseo
A clarification, if I try to make the issue more complex, in the head

[Cl]MARIO ROSSI[/Cl]

It only removes the [Cl][/Cl] but the content remains and becomes:

MARIO ROSSI
Stefano D'Eliseo's Avatar Stefano D'Eliseo
I did some tests, and I found a solution that would work.

If I write

<cliente MARIO ROSSI>

using RegEx with the following formula:
\<cliente (.*?)\>

I don't see anything anymore, the problem is that it still remains in the html code of the page. In the title and in the alt image.

With [ not work, so I use <>
Stefano D'Eliseo's Avatar Stefano D'Eliseo
For clarification, in the html code:

<cliente MARIO ROSSI>
becomes:

<cliente mario="" rossi=""></customer>
Stefano D'Eliseo's Avatar Stefano D'Eliseo
After further testing, I realized that actually using the greater than and less than signs <> is not good, because it turns into code and is therefore not displayed, not because the ReReplacer plugin takes over.

If I use the brackets {} it works everywhere, but not on the main page because the map pointers open the popup on click, so the plugin does not work.
Peter van Westen's Avatar Peter van Westen ADMIN
I would have to see it in action to know why that would happen...
Do you have this online so I can take a look?
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
Also please state what exactly you want replaced with what in which cases.
And what your ReReplacer search and replacement look like.
Please post a rating at the Joomla! Extensions Directory
Stefano D'Eliseo's Avatar Stefano D'Eliseo
Sure, website is in a staging area.
I've send you in "confidential information" how to access.

Now I've set:

\\cliente (.*?)\\

And work partially.
If you click on MAPPA menù, you can see a map pointer in red hover Pavia.
If you click, you still see them /customer MARIO ROSSI/ and that's not good.
If you click on details, it works on the following pages (even on the map)

Confidential information:
(hidden)
Stefano D'Eliseo's Avatar Stefano D'Eliseo
Sorry I hadn't read your second message yet.

I would like

/customer MARIO ROSSI/

not to be visible anywhere, I only need it as a search in the administrator.

MARIO ROSSI is obviously variable, whatever name is put there must not appear, not even in the HTML code (otherwise I would have solved it with a simple css display:none)
Peter van Westen's Avatar Peter van Westen ADMIN
Check your html output. There is no mention of "MARIO ROSSI" anywhere.
So the map extension loads that data via another way and doesn't pass that through the plugins.
In other words, ReReplacer never gets a chance to alter that content.
Neither ReReplacer not any other (system) plugin will work in that content.

I recommend you ask the developers of that extension for help on this.
Please post a rating at the Joomla! Extensions Directory
Stefano D'Eliseo's Avatar Stefano D'Eliseo
Confidential information:
(hidden)


Here you can see MARIO ROSSI simply on click on Pavia.

The problem is that that pointer is only called on click, so the ReReplacer plugin doesn't detect it.
Peter van Westen's Avatar Peter van Westen ADMIN
Yes I know, but that is NOT in the HTML output of your site. Check the HTML output. See my previous reply.
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription