| Lightbox into news or articles |
| Author | Text |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 01/04/2010 23:12 Lightbox into news or articles | #post23851 | Site url: http://sevenresources.net
MemHT version: 4.0.1
Hosting OS: Linux
PHP and MySQL versions: 5
Installed addons/scripts: 5
Error/Problem: Lightbox on normal image
Hi to all
i can enable the lightbox on the images included in the articles or news? Maybe the editor by entering the class image. I tried to add the class "lightbox" to an image but does not work. How can you do? |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 02/04/2010 14:10 Re: Lightbox into news or articles | #post23854 | i have added rel="lightbox" on image link outside gallery page, but does not work |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 03/04/2010 13:11 Re: Lightbox into news or articles | #post23858 | any suggestions? |
|
 |
| |
slashado Donator
Posts: 323

Gender:  Online: No
Version: 4.0.1 Country: Brasil Languages: Português, Inglês (via Google), e todas as outras (via google) |
Date: 04/04/2010 04:58 Re: Lightbox into news or articles | #post23860 | Hello dear Tiauz,
Sorry for the absence of the majority here, with the expectation MemHT 5 and the problem with the PC Mem arrears have the answers on the topic, not to mention the hard work lately.
To add Lightbox throughout memht, you must transfer the Lightbox Gallery for your template.
Only then the code rel = "lightbox" will work.
I create the steps for this change and post again tomorrow ok? because now I will sleep and I do not know the steps decorated.
See you soon! |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 04/04/2010 12:15 Re: Lightbox into news or articles | #post23862 | ok, thanks ^^ |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 04/04/2010 19:23 Re: Lightbox into news or articles | #post23869 | help? |
|
 |
| |
slashado Donator
Posts: 323

Gender:  Online: No
Version: 4.0.1 Country: Brasil Languages: Português, Inglês (via Google), e todas as outras (via google) |
Date: 05/04/2010 14:48 Re: Lightbox into news or articles | #post23874 | Ok, follow these steps:
1 - Copy the code below and paste it on top of your template file home.html;
| code |
<?php
echo "<script type='text/javascript' src='".$siteConfig['site_url']."/inc/javascript/jquery/plugins/lightbox/js/jquery.lightbox.js'></script>\n";
echo "<link rel='stylesheet' href='".$siteConfig['site_url']."/inc/javascript/jquery/plugins/lightbox/css/jquery.lightbox.css' type='text/css'>\n";
?>
<script type="text/javascript">
$(function() {
$('a.lightbox').lightBox({
imageLoading: 'inc/javascript/jquery/plugins/lightbox/images/lightbox-ico-loading.gif',
imageBtnClose: 'inc/javascript/jquery/plugins/lightbox/images/lightbox-btn-close.gif',
imageBtnPrev: 'inc/javascript/jquery/plugins/lightbox/images/lightbox-btn-prev.gif',
imageBtnNext: 'inc/javascript/jquery/plugins/lightbox/images/lightbox-btn-next.gif',
imageBlank: 'inc/javascript/jquery/plugins/lightbox/images/lightbox-blank.gif'
});
});
</script>
|
2 - Now add the attribute class = 'lightbox' in all image links to your site, for example:
<a href='pages/gallery/gallery/image.jpg' class='lightbox'><img src='pages/gallery/gallery/image.jpg'></a>
You need to create a link on your image for herself, so that the lightbox can be called as well as in the example above!
Re-posting in case of any problem!
Good Luck! |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 05/04/2010 15:45 Re: Lightbox into news or articles | #post23876 | i have insert the code on top of home.html, but i have a php error shown on top. i have attached the screenshot error Edited: 05/04/2010 15:48 |
|
 |
| |
tiauz Junior Member
Posts: 42

Gender:  Online: No
Country: Italy Languages: Italian |
Date: 05/04/2010 15:58 Re: Lightbox into news or articles | #post23877 | if i chancge the src of css and js file, with complete url, does not work. |
|
 |
| |