RE: PHx
I’m looking at how PHx does things. I’d be very interested in any difference in Easy Events for folks with Easy Events AND PHx if Easy Events is/isn’t called uncached. In other words, is there a difference between:
[[EasyEvents...]]
and
[!EasyEvents...!]
PHx apparently considers [!uncachedSnippets!] "safe tags" and doesn’t process them. At least from what I can gather. So would be interested if that makes any difference. I’ll probably have to break down and install PHx myself if I can’t brain parse things correctly.
The regular expressions in PHx are amazing. Kudos to bS for writing them. They’re hard enough to understand let alone write!
@rajfantastic
I don’t think it is the templates inside Easy Events [config file] that are the issue. I believe it is the placeholders embedded in the content that are probably the problem. We can eliminate the possibility of them being the internal templates easily:
In the config file, change templates to NOT use traditional placeholder syntax. In other words change these type templates
$_templates['listGroup'] = <<<STOP
<div class="easyEventsList_group">
<div class="easyEventsList_heading">[+heading+]</div>
<div class="easyEventsList_events">[+events+]</div>
</div><!--end easyEventsList_group-->
STOP;
To this
$_templates['listGroup'] = <<<STOP
<div class="easyEventsList_group">
<div class="easyEventsList_heading">--heading--</div>
<div class="easyEventsList_events">--events--</div>
</div><!--end easyEventsList_group-->
STOP;
In this example, I replaced "[+" with "--" and "+]" with "--". It doesn’t really matter what you use as long as all the prefixes match each other, and all the suffixes match each other.
Then in the class file, you’d need to alter 3 calls to the [i]templify[/] method (on or about lines: 660, 668, and 706) to include these prefix/suffixes. For example this
$eventList .= $this->templify('listItem',$eventData);
To this
$eventList .= $this->templify('listItem',$eventData,'--','--');
By doing this, we remove any similarity and all triggers for MODx or PHx to "see" these as placeholders. I’d love someone to try this, but frankly, I doubt it’s the issue. All that’s happening behind the scenes is a simple string replacement - and it happens within the snippet call, so I don’t even think the outer objects (MODx, PHx) are aware of it. Still... might be worth a shot.