1
bjuti
Classifieds + Fancybox
  • 2010/1/14 22:27

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Installing Classifieds module on XOOPS 2.4.3 I have found that LightBox option doesn't work.

I was to lazy to find what is the matter, so I replaced it with FancyBox.

Step 1:
Enable jQuery in Xoops, or download it.

Download FancyBox from upper link and copy 'fancybox' from the archive in root of module (modules/classifieds/). Copy jquery in modules/classifieds/fancybox and rename it as jquery.js

Step 2:
Open with editor modules/classifieds/index.php
Search for: "$header_lightbox"
Replace the code with:
$header_lightbox '<link rel="stylesheet" href="include/yogurt.css" type="text/css" media="screen" />
<link rel="stylesheet" href="fancybox/jquery.fancybox-1.2.6.css" type="text/css" media="screen" />
<script type="text/javascript" src="fancybox/jquery.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox-1.2.6.pack.js"></script>'
;


Step 3:
Go to system/templates module classifieds > classifieds_item.html
Find "<{if $photo != ""}>" and under it place this code:

<script>
jQuery(document).ready(function() {
 
/* This is basic - uses default settings */
jQuery("a#single_image").fancybox(); /* Using custom settings */ jQuery("a#inline").fancybox({ 'hideOnContentClick'true }); jQuery("a.group").fancybox({ 'zoomSpeedIn'300'zoomSpeedOut'300'overlayShow'false }); }); 
</
script>


Then replace this:
<a href="<{$path_uploads}>/<{$pics_array[i].url}>" target ="_self" rel="lightbox[album]" title="<{$pics_array[i].desc}>">
                    <
img class="thumb" src="<{$path_uploads}>/thumbs/thumb_<{$pics_array[i].url}>" rel="lightbox" title="<{$pics_array[i].desc}>">


With this:
<a href="<{$path_uploads}>/<{$pics_array[i].url}>" id="single_image" title="<{$pics_array[i].desc}>" rel="lightbox[album]">
                    <
img class="thumb" src="<{$path_uploads}>/thumbs/thumb_<{$pics_array[i].url}>" title="<{$pics_array[i].desc}>" rel="lightbox"/>


Step 4:
Clear caches or turn on check templates for modifications.


That's it. Work for me :)


Login

Who's Online

160 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits