MadBoxr (MODx plugin)

I wrote a MODx plugin, that is the CMS that I use for this website. It works using a widely known script (Lightbox, or better, a pair of variants), and it shows bigger images when you click on thumbnails. Its animation is very famous, its name is "fancy pants". Click on the images below in order to see it in action.

Using MadBoxr on a website that makes use of MODx is very simple. Everything is manageable from the TinyMCE Rich Editor. You need to create a link around the text or the image that you want to trigger the box. In this link, in the "Link URL" field, you have to insert a string that begins with #madboxr and can be followed by a ? and a list of parameters. Currently, parameters are the following:

  • w is the width of the box
  • h is the height of the box
  • url is the URL of the image or webpage that the script will access in order to obetain the content of the box, IMPORTANT: url field need to be the last one of the parameter string!
  • flickr uses a simple function in order to generate the URL of the bigger image, using the one found in the image inside the link (i.e., the thumbnail); for this reason it is not possible to have both url and flickr parameters

An example of a string used in the "Link URL" field is the following:

#madboxr?w=640&h=480&url=http://www.google.com 

Please notice the = to separate the parameter name from its value and the & to separate more pairs parameter/value.

Scripts used 

Lightbox is the first script that implemented the feature showed in this page, it has been developed by Lokesh Dhakar and it uses prototype and script.aculo.us JavaScript libraries. Since MODx uses, instead, the mootools JS framework, my MadBoxr plugin uses Slimbox, a Lightbox clone written by Christophe Beyls that uses mootools instead of prototype and script.aculo.us. It is also possible to use an extended version of Slimbox, written by Yukio Arita: this extended version allows iframe content in addition to images, while the original Slimbox script can display only images.

Since Slimbox Extended seems to be a little bit slower, I give the choice of what script to use in the configuration tab of the plugin in MODx. If you want to show only images, choose "slimbox", otherwise choose "slimbox_ex". The extended version is the default if you follow the instructions at the bottom of this page.

License

This plugin is released under the GPLv3 license.

Example 1: images (writing both URLs)

Colored stones

In this case the image has been taken from this website. While inserting the image, in the "Image URL" field we write the address of the thumbnail; we can also fill "Width", "Height" and "Title" fields. We create a link attached to the image and in its "Link URL" field we write #madboxr, followed by its options, in particular we need the parameter url, that tells to the script where to find the bigger image. The link and the image are as follows:

<a href="#madboxr?w=500&url=assets/images/fractals/ColoredStones.jpg">
<img src="assets/images/fractals/ColoredStones.jpg" width="100" height="75"/>
</a>

In this specific case I have used the same image both for the thumbnail and the bigger image. In general you can use a smaller image for the thumbnail.

Example 2: Flickr images

Il Ponte di Brooklyn, New York, USA

If the image has been taken from Flickr, it is possible to avoid to write both addresses (the one of the thumbnail and the one of the bigger image). In order to do this, the first thing to do is to link a Flickr image.

Go to your Flickr page and choose an image. Click on the looking glass icon ("all sizes") and choose the appropriate size for the thumbnail. In the bottom of the page there is the URL of the image to be used for off-site linking. This is the URL that you will put in the "Image URL" field of the image that you put on your website.

When you put a link on this image, it is sufficient to write #madboxr?flickr= in its "Link URL" field, and it can be followed by other parameters. The plugin will generate the right URL for the bigger image. Here is how the HTML should appear:

<a href="#madboxr?flickr=&w=640&height=480">
<img src="http://farm2.static.flickr.com/1361/918464184_db79a7756f_t.jpg"/>
</a>

On Flickr there are also other image formats (now we used the 500x375 size). In order to use another image size in the box, we have to consider that Flickr adds to the image name a character in order to show its size. For example, if the image address ends with a _t, it is a thumbnail (100x75). It is sufficient to use this character as value for the parameter flickr, for example:

#madboxr?flickr=m&w=640&height=480.  

Esempio 3: webpage content (iframe)

Using slimbox_ex, it is also possible to show content different from images, inside the box. In order to do this, it is sufficient to create the link which URL will be, as usual, #madboxr and it will contain, in the parameter url, the address of the page that we want to show.

Click here to see the content of Google page in a Slimbox. The link is as follows:

<a href="#madboxr?url=http://www.google.com">Click here</a>

The snippet also works with MODx pages, for example, click here to see another page from this website. Remember that the url field need to be the last of the parameter string, e.g.:

#madboxr?h=50&w=200&url=http://www.whateveryou.com/want/?q=45&p=34
and NOT
#madboxr?url=http://www.whateveryou.com/want/?q=45&p=34&h=50&w=200
otherwise, the snippet cannot distinguish between parameters for it (h,w) and parameters of the url.

 

Plugin installation in MODx

Here are the instructions to install this plugin in MODx:

  • download the plugin from the resource page of MODx website and extract its content in some place of your hard disk
  • create a new MODx plugin and name it "MadBoxr"
  • copy the content of the file plugin.slimboxr.tpl in the code box of the plugin
  • go in the tab "System Events" and check "OnLoadWebDocument" and "OnWebPagePrerender"
  • go in the tab "Configuration" and copy and paste this string in the "Plugin configuration" field:
    &scriptToUse=Script to use;list;slimbox,slimbox_ex;slimbox_ex
  • save the plugin
  • upload the directory madboxr in the directory assets/plugins of your MODx website


Important: both slimbox.js and slimbox_ex.js that are inside the package work only with mootools version 1.1 or newer. In MODx 0.9.6.1 there is an older version, so you need to update it.

Here is what you have to do to update the mootools of your MODx website:

  • go to the download page of mootools,
  • check all components except (if you do not need them) those in "Plugins" section,
  • open the "Choose compression type" box and click on YUI Compressor,
  • download the mootools library in some place of your hard disk and rename it to mootools.js (without version number),
  • upload this file to your website in the /manager/media/script/mootools directory (overwriting the existing one)

Write a comment

  • Required fields are marked with *.

Showing comments 1 to 10 of 1191 | Next | Last
Caacar
Posts: 1191
Comment
HQXVpdRC
Reply #1191 on : Fri November 21, 2008, 12:08:19
http://stuffbuy.rack111.com/in95b.html in
http://stuffbuy.freehostingz.com/for575.html for
http://stuffbuy.freehostingz.com/forb91.html for
http://stuffbuy.freehostingz.com/free26b.html free
http://stuffbuy.freehostingz.com/for1e5.html for
http://stuffbar.8tt.org/shoes6db.html shoes
http://stuffbar.8tt.org/for08d.html for
http://stuffbar.8tt.org/free0e2.html free
http://stuffbar.8tt.org/in67e.html in
http://stuffbuy.freewebhosting360.com/forb98.html for
http://stuffbuy.freewebhosting360.com/for679.html for
http://stuffbuy.freewebhosting360.com/for544.html for
http://stuffbuy.freewebhosting360.com/care92.html car
http://stuffbar.w8w.pl/for0ec.html for
http://stuffbar.w8w.pl/fore0d.html for
http://stuffbar.w8w.pl/for423.html for
http://stuffbar.w8w.pl/freed0b.html free
http://stuffbar.za.pl/for38a.html for
http://stuffbar.za.pl/for373.html for
http://stuffbar.za.pl/foraac.html for
Caafree
Posts: 1191
Comment
uQvigGPOn
Reply #1190 on : Fri November 21, 2008, 11:49:03
http://stuffbar.001webs.com/shoes6da.html shoes
http://stuffbar.hostinggratisargentina.com/for913.html for
http://stuffbar.hostinggratisargentina.com/freecc8.html free
http://stuffbar.hostinggratisargentina.com/fora59.html for
http://stuffbar.hostinggratisargentina.com/foracc.html for
http://stuffbaa.1stfreehosting.com/for2d1.html for
http://stuffbaa.1stfreehosting.com/free451.html free
http://stuffbaa.1stfreehosting.com/ford95.html for
http://stuffbaa.1stfreehosting.com/inc47.html in
http://stuffbaa.myd.net/freeb53.html free
http://stuffbaa.myd.net/for2ce.html for
http://stuffbaa.myd.net/free9f6.html free
http://stuffbaa.myd.net/forfad.html for
http://stuffbaa.yoyohost.com/free69a.html free
http://stuffbaa.yoyohost.com/for8a1.html for
http://stuffbaa.yoyohost.com/forc57.html for
http://stuffbaa.yoyohost.com/shoe597.html shoe
http://stuffbuy.rack111.com/forefc.html for
http://stuffbuy.rack111.com/for4b8.html for
http://stuffbuy.rack111.com/free1a8.html free
Caafree
Posts: 1191
Comment
oSOtWOCRDqJm
Reply #1189 on : Fri November 21, 2008, 11:30:20
http://stuffbar.001webs.com/shoes6da.html shoes
http://stuffbar.hostinggratisargentina.com/for913.html for
http://stuffbar.hostinggratisargentina.com/freecc8.html free
http://stuffbar.hostinggratisargentina.com/fora59.html for
http://stuffbar.hostinggratisargentina.com/foracc.html for
http://stuffbaa.1stfreehosting.com/for2d1.html for
http://stuffbaa.1stfreehosting.com/free451.html free
http://stuffbaa.1stfreehosting.com/ford95.html for
http://stuffbaa.1stfreehosting.com/inc47.html in
http://stuffbaa.myd.net/freeb53.html free
http://stuffbaa.myd.net/for2ce.html for
http://stuffbaa.myd.net/free9f6.html free
http://stuffbaa.myd.net/forfad.html for
http://stuffbaa.yoyohost.com/free69a.html free
http://stuffbaa.yoyohost.com/for8a1.html for
http://stuffbaa.yoyohost.com/forc57.html for
http://stuffbaa.yoyohost.com/shoe597.html shoe
http://stuffbuy.rack111.com/forefc.html for
http://stuffbuy.rack111.com/for4b8.html for
http://stuffbuy.rack111.com/free1a8.html free
shoes
Posts: 1191
Comment
icJakExDPllS
Reply #1188 on : Fri November 21, 2008, 11:11:22
http://stuffbar.omgfreehost.com/for32f.html for
http://stuffbar.omgfreehost.com/for267.html for
http://stuffbar.omgfreehost.com/fora0e.html for
http://stuffbar.omgfreehost.com/off25.html of
http://stuffbar.my3gb.com/forf81.html for
http://stuffbar.my3gb.com/freecc0.html free
http://stuffbar.my3gb.com/fordb8.html for
http://stuffbar.my3gb.com/free9bf.html free
http://stuffbar.host-itnow.com/free905.html free
http://stuffbar.host-itnow.com/for1a2.html for
http://stuffbar.host-itnow.com/for1b7.html for
http://stuffbar.host-itnow.com/free2e2.html free
http://stuffbar.seitenclique.net/for060.html for
http://stuffbar.seitenclique.net/for20f.html for
http://stuffbar.seitenclique.net/for959.html for
http://stuffbar.seitenclique.net/shoesfd9.html shoes
http://stuffbar.12gbfree.com/for0f7.html for
http://stuffbar.001webs.com/shoesfb6.html shoes
http://stuffbar.001webs.com/freec3f.html free
http://stuffbar.001webs.com/for7cc.html for
shoes
Posts: 1191
Comment
JMrtGkQXAth
Reply #1187 on : Fri November 21, 2008, 10:52:23
http://stuffbar.omgfreehost.com/for32f.html for
http://stuffbar.omgfreehost.com/for267.html for
http://stuffbar.omgfreehost.com/fora0e.html for
http://stuffbar.omgfreehost.com/off25.html of
http://stuffbar.my3gb.com/forf81.html for
http://stuffbar.my3gb.com/freecc0.html free
http://stuffbar.my3gb.com/fordb8.html for
http://stuffbar.my3gb.com/free9bf.html free
http://stuffbar.host-itnow.com/free905.html free
http://stuffbar.host-itnow.com/for1a2.html for
http://stuffbar.host-itnow.com/for1b7.html for
http://stuffbar.host-itnow.com/free2e2.html free
http://stuffbar.seitenclique.net/for060.html for
http://stuffbar.seitenclique.net/for20f.html for
http://stuffbar.seitenclique.net/for959.html for
http://stuffbar.seitenclique.net/shoesfd9.html shoes
http://stuffbar.12gbfree.com/for0f7.html for
http://stuffbar.001webs.com/shoesfb6.html shoes
http://stuffbar.001webs.com/freec3f.html free
http://stuffbar.001webs.com/for7cc.html for
shoes
Posts: 1191
Comment
yEkivSFOIPBG
Reply #1186 on : Fri November 21, 2008, 10:33:42
http://stuffbar.omgfreehost.com/for32f.html for
http://stuffbar.omgfreehost.com/for267.html for
http://stuffbar.omgfreehost.com/fora0e.html for
http://stuffbar.omgfreehost.com/off25.html of
http://stuffbar.my3gb.com/forf81.html for
http://stuffbar.my3gb.com/freecc0.html free
http://stuffbar.my3gb.com/fordb8.html for
http://stuffbar.my3gb.com/free9bf.html free
http://stuffbar.host-itnow.com/free905.html free
http://stuffbar.host-itnow.com/for1a2.html for
http://stuffbar.host-itnow.com/for1b7.html for
http://stuffbar.host-itnow.com/free2e2.html free
http://stuffbar.seitenclique.net/for060.html for
http://stuffbar.seitenclique.net/for20f.html for
http://stuffbar.seitenclique.net/for959.html for
http://stuffbar.seitenclique.net/shoesfd9.html shoes
http://stuffbar.12gbfree.com/for0f7.html for
http://stuffbar.001webs.com/shoesfb6.html shoes
http://stuffbar.001webs.com/freec3f.html free
http://stuffbar.001webs.com/for7cc.html for
Froshoesnds
Posts: 1191
Comment
PqmZfbbwx
Reply #1185 on : Fri November 21, 2008, 10:14:10
http://members.lycos.co.uk/stuffbar/free4e0.html free
http://members.lycos.co.uk/stuffbar/for0fd.html for
http://members.lycos.co.uk/stuffbar/forb43.html for
http://members.lycos.co.uk/stuffbar/and4f3.html and
http://stuffba.fr33webhost.com/fore7d.html for
http://stuffba.fr33webhost.com/in3f5.html in
http://stuffba.fr33webhost.com/for61b.html for
http://stuffba.fr33webhost.com/for830.html for
http://stuffbar.hostevo.com/free0d1.html free
http://stuffbar.hostevo.com/for982.html for
http://stuffbar.hostevo.com/for0c6.html for
http://stuffbar.hostevo.com/forbd8.html for
http://stuffbar.hostaim.com/forc99.html for
http://stuffbar.hostaim.com/forf6e.html for
http://stuffbar.hostaim.com/freee90.html free
http://stuffbar.hostaim.com/shoes3c4.html shoes
http://stuffbar.007sites.com/freedde.html free
http://stuffbar.007sites.com/fore87.html for
http://stuffbar.007sites.com/for2b5.html for
http://stuffbar.007sites.com/shoesbe9.html shoes
Froshoesnds
Posts: 1191
Comment
oWSXLEHLSFgoB
Reply #1184 on : Fri November 21, 2008, 09:54:58
http://members.lycos.co.uk/stuffbar/free4e0.html free
http://members.lycos.co.uk/stuffbar/for0fd.html for
http://members.lycos.co.uk/stuffbar/forb43.html for
http://members.lycos.co.uk/stuffbar/and4f3.html and
http://stuffba.fr33webhost.com/fore7d.html for
http://stuffba.fr33webhost.com/in3f5.html in
http://stuffba.fr33webhost.com/for61b.html for
http://stuffba.fr33webhost.com/for830.html for
http://stuffbar.hostevo.com/free0d1.html free
http://stuffbar.hostevo.com/for982.html for
http://stuffbar.hostevo.com/for0c6.html for
http://stuffbar.hostevo.com/forbd8.html for
http://stuffbar.hostaim.com/forc99.html for
http://stuffbar.hostaim.com/forf6e.html for
http://stuffbar.hostaim.com/freee90.html free
http://stuffbar.hostaim.com/shoes3c4.html shoes
http://stuffbar.007sites.com/freedde.html free
http://stuffbar.007sites.com/fore87.html for
http://stuffbar.007sites.com/for2b5.html for
http://stuffbar.007sites.com/shoesbe9.html shoes
Froshoesnds
Posts: 1191
Comment
mAJxMdqlGI
Reply #1183 on : Fri November 21, 2008, 09:35:54
http://members.lycos.co.uk/stuffbar/free4e0.html free
http://members.lycos.co.uk/stuffbar/for0fd.html for
http://members.lycos.co.uk/stuffbar/forb43.html for
http://members.lycos.co.uk/stuffbar/and4f3.html and
http://stuffba.fr33webhost.com/fore7d.html for
http://stuffba.fr33webhost.com/in3f5.html in
http://stuffba.fr33webhost.com/for61b.html for
http://stuffba.fr33webhost.com/for830.html for
http://stuffbar.hostevo.com/free0d1.html free
http://stuffbar.hostevo.com/for982.html for
http://stuffbar.hostevo.com/for0c6.html for
http://stuffbar.hostevo.com/forbd8.html for
http://stuffbar.hostaim.com/forc99.html for
http://stuffbar.hostaim.com/forf6e.html for
http://stuffbar.hostaim.com/freee90.html free
http://stuffbar.hostaim.com/shoes3c4.html shoes
http://stuffbar.007sites.com/freedde.html free
http://stuffbar.007sites.com/fore87.html for
http://stuffbar.007sites.com/for2b5.html for
http://stuffbar.007sites.com/shoesbe9.html shoes
Caashoes
Posts: 1191
Comment
nYvcXusvav
Reply #1182 on : Fri November 21, 2008, 09:16:38
http://usuarios.lycos.es/stuffbar/for060.html for
http://usuarios.lycos.es/stuffbar/fora1c.html for
http://usuarios.lycos.es/stuffbar/shoes9f5.html shoes
http://usuarios.lycos.es/stuffbar/freeb62.html free
http://mitglied.lycos.de/stuffbar/for7d0.html for
http://mitglied.lycos.de/stuffbar/for1d9.html for
http://mitglied.lycos.de/stuffbar/forb1c.html for
http://mitglied.lycos.de/stuffbar/to21c.html to
http://membres.lycos.fr/stuffbar/for821.html for
http://membres.lycos.fr/stuffbar/freea25.html free
http://membres.lycos.fr/stuffbar/for9f3.html for
http://membres.lycos.fr/stuffbar/in6e0.html in
http://utenti.lycos.it/stuffbar/fora0a.html for
http://utenti.lycos.it/stuffbar/for68b.html for
http://utenti.lycos.it/stuffbar/shoes42c.html shoes
http://utenti.lycos.it/stuffbar/free360.html free
http://members.lycos.nl/stuffbar/for2cc.html for
http://members.lycos.nl/stuffbar/free200.html free
http://members.lycos.nl/stuffbar/for74e.html for
http://members.lycos.nl/stuffbar/autob22.html auto
Showing comments 1 to 10 of 1191 | Next | Last
 .