Dec 04, 2008, 12:51 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1] 2 3   Go Down
  Print  
Author Topic: [Snippet] MiniGallery 3 - Featuring LightBox JS  (Read 16140 times)
0 Members and 1 Guest are viewing this topic.
Dr. Scotty Delicious
Coding Team
*
Posts: 1,172


Dr. of Fine Pirate Arts


WWW
« on: Mar 02, 2006, 11:09 PM »

This snippet is based on the work "EtoGal" by Frank Siegert (hugelmopf / hugelmpopf [at] web [dot] de).
The original snippet can be found and discussed at the etomite forums: http://www.etomite.org/forums/index.php?showtopic=3022


This snippet has been updated to correct an error in which credit to the original author(s) of the snippet was unintentionally left out.  Please re-download the zip file if you are using this snippet.  Alternately, consider an upgrade to MaxiGallery [ http://modxcms.com/forums/index.php/topic,3843 ], which is a much more refined and feature rich image gallery snippet.

I have been reading a lot about this LightBox JS around the MODx forums and I thought, wouldn't it be cool to integrate that into a MODx gallery snippet.  I have MiniGallery running on most of my sites, so I decided to start there.  I added some code to the MiniGallery snippet (With a lot of help from Mark Kaplan the PHP God!) and added the proper paths to the lightbox.js code.
Just add these lines somewhere between the <head> and </head> of your MODx template

Code:
<link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>

You can see it in use at my website:

http://www.scottydelicious.com/photos/minigallerytest.html

Enjoy,

-sD-
scotty Delicious

***Edit***
I have edited the INSTALL.txt file to include the instructions above for calling the css and js files from the head of your html document.  I also added the folder assets/galleries/ with instructions in the INSTALL.txt document.

-sD-
scotty Delicious

* MiniGallery3 featuring LightBox JS.zip (17.9 KB - downloaded 632 times.)
* MiniGallery3 featuring LightBox JS.zip (18.02 KB - downloaded 468 times.)
« Last Edit: Apr 11, 2006, 11:29 AM by ScottyDelicious » Logged

We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho!
We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho!
Yo Ho, Yo Ho! A pirate's life for me.
rthrash
Foundation
*
Posts: 9,575



WWW
« Reply #1 on: Mar 03, 2006, 12:20 AM »

Nice work. Cheesy
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
sottwell
Documentation Team
*
Posts: 8,170



WWW
« Reply #2 on: Mar 03, 2006, 02:21 AM »

Excellent! 
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
davidm
Marketing & Design Team
*
Posts: 6,777


The best way to predict the future is to invent it


WWW
« Reply #3 on: Mar 03, 2006, 03:32 AM »

Waow, this is cool Grin

Thanks !
I'll go toy with that...
Logged

.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.6 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net
Kunal Kapoor
Full Member
***
Posts: 145


Effective, Functional, Standards Compliant


WWW
« Reply #4 on: Mar 03, 2006, 03:44 AM »

Excellent... just what MiniGallery was missing! Good job!
Logged

Kunal Kapoor
Technical Director
Limesharp Internet Limited - Effective, Functional, Standards Compliant

IRC Nick: KingKoopa
Skype ID: KingKoopa16
nissai
Full Member
***
Posts: 159


WWW
« Reply #5 on: Mar 03, 2006, 07:08 AM »

sure it's easy for you but not for people like me and maybe in the install document you have to introduce
that we have to put in the template
Code:
       
<link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>

thanks for your work
Logged
Kunal Kapoor
Full Member
***
Posts: 145


Effective, Functional, Standards Compliant


WWW
« Reply #6 on: Mar 03, 2006, 07:34 AM »

Maybe you could use regClientStartupScript() and regClientCSS() like I do in my script. Although you need to apply fixes to /manager/includes/document.parser.inc.php before you can get that to work.

This way,

Code:
<link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>

only gets called when it needs to be.
« Last Edit: Mar 03, 2006, 09:33 AM by Kunal Kapoor » Logged

Kunal Kapoor
Technical Director
Limesharp Internet Limited - Effective, Functional, Standards Compliant

IRC Nick: KingKoopa
Skype ID: KingKoopa16
Dr. Scotty Delicious
Coding Team
*
Posts: 1,172


Dr. of Fine Pirate Arts


WWW
« Reply #7 on: Mar 03, 2006, 08:44 AM »

sure it's easy for you but not for people like me and maybe in the install document you have to introduce
that we have to put in the template
Code:
       
<link media="all" type="text/css" href="assets/js/lightbox/lightbox.css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/lightbox/lightbox.js"></script>

thanks for your work

Thank you for pointing that out.  This is a very important step that I missed.  I added it to the first post, and I will add it to the INSTALL.txt as soon as I get home today.

thanks

-sD-
Logged

We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho!
We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho!
Yo Ho, Yo Ho! A pirate's life for me.
banzai
Testers
*
Posts: 857


MODx Italia


WWW
« Reply #8 on: Mar 03, 2006, 09:20 AM »

Very cool!! great work Scotty!!
Logged

MODx Websites Showcase 
Add your site to www.modx.it!
-----------------------------------------------------
FREE MODx Templates
www.tattoocms.it
-----------------------------------------------------
VIDEO: whats new in MODx 0.9.5   | VIDEO: MODx PHP Application Framework  |  bubuna.com - Web & Multimedia Design
chanh
Guest
« Reply #9 on: Mar 03, 2006, 11:02 AM »

Very nice!
Logged
xeres
Full Member
***
Posts: 171


« Reply #10 on: Mar 03, 2006, 06:20 PM »

Your snippet looks so cool but I am not able to use it.
I changed file access on the server but page reload on the same page when I press "manage image",
So I tested everything and remove / in the config file, I put "assets/galleries" in place of "assets/galleries/" and (don't ask me why) it works, but my happyness was very short cause I can't upload file, page reload whitout thumbnails. No message, no errors, nothing Huh I tried to create alias file on the server without success...I just know this is only a minigallery problem.
Any Ideas?
Logged
nissai
Full Member
***
Posts: 159


WWW
« Reply #11 on: Mar 03, 2006, 06:39 PM »

somebody can do that for Easy Peasy Gallery 2 cause i try but the probem is that the files are stored in the bd.

i think i have to put this
Code:
rel=\"lightbox\"
  here
Code:
  $output .=    '<a target="_blank" href="'.$modulePath.'image.php?type=pic_large&id='.$picture['id'].'"><img src="'.$modulePath.'image.php?type=pic_thumb&id='.$picture['id'].'" alt="'.$picture['title'].'" /></a>';
Logged
Dr. Scotty Delicious
Coding Team
*
Posts: 1,172


Dr. of Fine Pirate Arts


WWW
« Reply #12 on: Mar 03, 2006, 07:53 PM »

Your snippet looks so cool but I am not able to use it.
I changed file access on the server but page reload on the same page when I press "manage image",
So I tested everything and remove / in the config file, I put "assets/galleries" in place of "assets/galleries/" and (don't ask me why) it works, but my happyness was very short cause I can't upload file, page reload whitout thumbnails. No message, no errors, nothing Huh I tried to create alias file on the server without success...I just know this is only a minigallery problem.
Any Ideas?

did you create the directory www.yourdomain.com/assets/galleries/ and make sure it chmod it to 777?

-sD-
Logged

We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho!
We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho!
Yo Ho, Yo Ho! A pirate's life for me.
Dr. Scotty Delicious
Coding Team
*
Posts: 1,172


Dr. of Fine Pirate Arts


WWW
« Reply #13 on: Mar 03, 2006, 07:57 PM »

somebody can do that for Easy Peasy Gallery 2 cause i try but the probem is that the files are stored in the bd.

http://modxcms.com/forums/index.php/topic,3085.0.html

Braininator says he has it working.  Check with him.

-sD-
scotty Delicious
Logged

We pillage, we plunder, we rifle and loot. Drink up me 'earties, Yo Ho!
We kidnap and ravage and don't give a hoot. Drink up me 'earties, Yo Ho!
Yo Ho, Yo Ho! A pirate's life for me.
Braininator
Jr. Member
*
Posts: 21


« Reply #14 on: Mar 03, 2006, 09:13 PM »

I've posted something in that topic.
Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!