Not properly striping out {} style code.

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Wed Sep 15, 2010 12:10 am
Hi,

First of all I want to thank you for such great product.

I have some code in my article text that uses the curly bracket syntax. For example from Simple Image Gallery Pro, the syntax would be

Code: Select all
{gallery}hardwood-gallery/bethesda-md-maple:200:160:1:2{/gallery}


and then in the front end inside the news box it shows up "hardwood-gallery/bethesda-md-maple:200:160:1:2"
in the text.

Of course I would like the text between {}....{/} to be removed also.

Any help would be appreciated.
User avatar
Fresh Boarder

GK User
Wed Sep 15, 2010 1:01 am
Hi

Did you try set "Parse plugins" and "Clean plugins" ON ?
User avatar
Platinum Boarder

GK User
Wed Sep 15, 2010 1:07 am
Yep tried that. When I do that it display the gallery in the news module. It's like the clean plugin is overridden by parse.
User avatar
Fresh Boarder

GK User
Wed Sep 15, 2010 1:37 am
The regex needs to capture everything between the {}..{/}, not just inside the {}.

well I think we need to change

Code: Select all
// CLEANING PLUGINS
                if($this->config['clean_plugins'] == TRUE) {

                    //$news_textt = preg_replace("/{.+?}/", "", $news_textt);
                    $news_textt = preg_replace("/{.+}.+{/.+?}/", "", $news_textt);

                }


[strike]something like this, but it's not working for me.[/strike]

OK this is now, working for me. But someone need to check my regex. May it's greedy?
what would happen to

-----

The quick brown fox {gallery}....{/gallery} jumped over {gallery}....{/gallery} the lazy dog.

---
User avatar
Fresh Boarder

GK User
Wed Sep 15, 2010 4:01 am
Do you have the latest version 1.7?
I'm asking this because from 1.5 to 1.7, there's some updates related with this feature and 1.7 works perfectly with me.
User avatar
Platinum Boarder

GK User
Wed Sep 15, 2010 4:53 am
Yep. GK4 v1.7

Is that section of code different in your helper.php?

See the image. I am going by the "Description" on the left hand panel, not the "updates available" on the right.

This part was confusing for me.
User avatar
Fresh Boarder


cron