We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17895
    • 209 Posts
    This is an auto-generated support/comment thread for MadBoxr.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    This plugins allows the use of Lightbox/Slimbox effect very easily: it will translate a special <a> html tag (that you can insert with any rich editor) in a Slimbox link, that make you open a bigger image with a cool mootools effect. This plugin has two other important feature: the possibility to show a webpage inside the box (it uses Slimbox Extended) and it can also easily use Flickr off-site images.
      Daniele "MadMage" Calisi
      • 87
      • 51 Posts
      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.
        • 87
        • 51 Posts
        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.
          • 87
          • 51 Posts
          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.
            • 28042 ☆ 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' ...));
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 87
              • 51 Posts
              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.
                • 20289
                • 958 Posts
                I never tried this snippet thus i didn’t even run it to see this might work or not, but with a quick look on the code i thought this might solve the issue...

                Add the first line of the below code to the end statement of the slimboxr (or what ever you named it) snippet code:

                        $str_replace("=", "%", "$pattern");
                		$modx->documentOutput = preg_replace_callback($pattern, 'replaceCallback', $modx->documentOutput);
                		break;
                			    
                	default:	// stop here
                		return; 
                		break;	
                }


                  [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                  [td][Wiki] [Persian support forum]
                  [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                  [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                  • 87
                  • 51 Posts
                  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"
                    • 20289
                    • 958 Posts
                    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.
                      [img]http://i10.tinypic.com/52c4eir.gif[/img][/td]
                      [td][Wiki] [Persian support forum]
                      [SVN] [RTL SVN Branch] [bugs] [FishEye+Crucible] [Learn MODx!] | [My Google Code]
                      [font=tahoma][برای دسترسی به راهنمای فارسی به [url=http://www.modxcms.ir]
                      • 87
                      • 51 Posts
                      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!