I cant get this working. I followed the steps and it does nothing. I updated the Mootools.js and reviewed the steps several times. I even copy/pasted your examples (of google.com, and flickr) and no luck. I click on the link and it just acts like it is a normal link.
ok strange, the plugin works now, but i have one problem.
When I put in a url with ’index.php?id=1’ it takes away the ’=1’ part.
Any solution or update for this? If not I can’t use it for a modx site.
any help on this? This would allow me to complete my website. Also i’d think it’d be a big portion of the reason you’d want this in modx...to link to other modx files.
-
☆ A M B ☆
- 24,524 Posts
You can’t have = or & characters in snippet parameter values. Those characters are reserved for the snippet parameter delimiters.
There are two ways you can work around this. Use different characters, such as %% or ##, then at the beginning of the snippet code use a str_replace to replace your characters with the = character.
The other way is to wrap the snippet in another snippet that only has a call to
$modx->runSnippet('snippetName', array('param1' => 'value1', 'param2' -> 'value2' ...));
unfortunatly I’m still learning to deal with Snippets and I’ve not been able to write one yet so what you said sounds like it makes sense but I cannot impliment it. Hopefully the author of MadBoxr can resolve the issue.
I got an error when I put that code in.
"Fatal error: Call to undefined function: () in //manager/includes/document.parser.class.inc.php(742) : eval()’d code on line 76"
Hmm, As i said i didn’t work with but, i got the snippet cause i thought its easy to resolve so i guessed that $pattern function is the one in charge of the final result!.
I’ll have a closer look tonight and get back to you.
Thanks I really appreciate the help.
I really would love to learn more about how to code the snippets but time isnt’ on my side these days!