Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: !!! GREYBOX THE EASY WAY !!!  (Read 12627 times)
ciprianrpp
Newbie
*
Posts: 15



« on: April 21, 2008, 05:52:25 AM »

At Forsh's request i've modified the original lightbox tutorial for the use of GREYBOX.

DOCUMENTATION AND EXAMPLES OF GREYBOX YOU CAN FIND HERE:

http://apan.net/tools/grey/examples.html

The original site is:  http://www.orangoo.com/labs/GreyBox/

but it seems it's now offline.(that's why i've uploaded the zip to filefront)

1. Download greybox

http://files.filefront.com/greyboxzip/;10049059;/fileinfo.html

2. unzip greybox into your joomla template directory

ex: templates/rpp/greybox

3. set permissions to 777 on directory and files

chmod -R 777 greybox

4. Modify and add greybox stuff into the HEADER SECTION

<script type="text/javascript">
    var GB_ROOT_DIR = "http://mydomain.com/templates/yourtemplate/greybox/";
</script>

<script type="text/javascript" src="templates/yourtemplate/greybox/AJS.js"></script>
<script type="text/javascript" src="templates/yourtemplate/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="templates/yourtemplate/greybox/gb_scripts.js"></script>
<link href="templates/yourtemplate/greybox/gb_styles.css" rel="stylesheet" type="text/css" />


5. Modify shop.product_details.php (located in administrator/components/com_virtuemart/html)

Look for:
/* Build the "See Bigger Image" Link */
      if( @$_REQUEST['output'] != "pdf" ) {
      $link = $imageurl;
      $text = $ps_product->image_tag($product_thumb_image, "alt=\"".$product_name."\"", 1)."<br/>".$VM_LANG->_PHPSHOP_FLYPAGE_ENLARGE_IMAGE;
      // vmPopupLink can be found in: htmlTools.class.php
      $product_image = vmPopupLink( $link, $text, $width, $height );
      }

REPLACE $product_image = vmPopupLink( $link, $text, $width, $height );

with

$product_image = "<a href=\"$imageurl\" target=\"_blank\" rel=\"gb_image[]\" title=\"$product_name\">".$text."</a>";



DONE.

GOOD LUCK & HAVE FUN!

see ya


PS: I'm working to make them work (both lightbox and greybox) for MORE IMAGES tag

« Last Edit: April 21, 2008, 05:56:02 AM by ciprianrpp » Logged
Forsh
Jr. Member
**
Posts: 93


WWW
« Reply #1 on: April 21, 2008, 06:26:53 AM »

You rock!!!   Grin
Logged

trader4300
Newbie
*
Posts: 23


« Reply #2 on: May 04, 2008, 10:53:25 AM »

How about telling us what this will do for us???
Thanks
Logged
trader4300
Newbie
*
Posts: 23


« Reply #3 on: May 06, 2008, 06:17:44 AM »

NEVER MIND!  Found it,
Logged
ciprianrpp
Newbie
*
Posts: 15



« Reply #4 on: May 06, 2008, 23:37:14 PM »

i'm glad.

this is usefull for those who are using vm 1.0.x

in vm 1.1.x the lightbox is implemented by default.

have fun.
Logged
jjj2
Jr. Member
**
Posts: 53


« Reply #5 on: October 01, 2009, 09:01:13 AM »

But displaying flypage (product detail page) in lightbox is not by default..

wish someone can come out with a solution on this !
Logged
Pages: [1]   Go Up
Print
Jump to: