Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
prettyPhoto Integrated #Hack
#1
Hey guys,

this hack gives you the option of THUMB to prettyPhoto

Applying prettyphoto in general
1) download prettyphoto from http://www.no-margin-for-errors.com/proj...box-clone/
2) add: the following code to your header of your theme:-
Code:
<script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" />
    <script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
and
Code:
<script type="text/javascript" charset="utf-8">
        $(document).ready(function(){
            $("a[rel^='prettyPhoto']").prettyPhoto();
        });
    </script>

Applying the hack

3) Open & edit in notepad /admin/image.php; add after line 77
Code:
<option value="code-imgthumb-prettyPhoto" ><?php echo $i18n['HTML_THUMB_PRETTYPHOTO'];?></option>

4) add around line 87
Code:
<p id="code-imgthumb-prettyPhoto">&lt;a href="<?php echo tsl($SITEURL) .'data/uploads/'. $src; ?>" rel="prettyPhoto" class="gs_image_link" >&lt;img src="<?php echo tsl($SITEURL) .'data/thumbs/thumbnail.'.$src; ?>"  rel="prettyPhoto" class="gs_thumb" alt="" />&lt;/a></p>

5) open & edit admin/lang/en_US.php add after line 455
Code:
"HTML_THUMB_PRETTYPHOTO"     => "Thumbnail-to-PrettyPhoto",

your done! Wink you'll now have the following from the drop down when adding images (see attached)
Reply
#2
Hi !
Should you not add CR/Linefeed at the end of the code in the windows with the code.
I can not select the one line codes for copying.

Sincerely
Einarkol
Reply




Users browsing this thread: 1 Guest(s)