Thursday 15 March 2012

php - fancybox for image gallery in zend -



php - fancybox for image gallery in zend -

i working on project in zend need display photos uploaded in image gallery, don't know how implement that. code of view uses'r info displayed...

profile.phtml

<html> <head><link rel="stylesheet" href="/css/demo.css" type="text/css" > <link href="fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet"> <script src="fancybox/jquery.fancybox-1.3.4.min.js"></script></head> <a href='<?php $i=$this->basepath()."/../project/login/logout"; echo $i; ?>'>click here logout</a></font> <section> <?php $a=$this->abc; $c=$a['cityname']; ?> <p><b>you viewing total profile of <?php echo $a['name'];?></b></p> <ul id="tabs" class="nav nav-tabs" data-tabs="tabs"> <li class="active"><a href="#tabs-1" data-toggle="tab" >general details</a></li> <li><a href="#tabs-2" data-toggle="tab">basic details</a></li> <li><a href="#tabs-3" data-toggle="tab">education details</a></li> <li><a href="#tabs-4" data-toggle="tab">occupation details</a></li> <li><a href="#tabs-5" data-toggle="tab">family details</a></li> <li><a href="#tabs-6" data-toggle="tab">kundli details</a></li> <li><a href="#tabs-7" data-toggle="tab">other deatils</a></li> <li><a href="#tabs-8" data-toggle="tab">photos</a></li> </ul> <?php $form = $this->form; $form->setattribute('action', $this->url(null,array('controller'=>'search', 'action' =>'confirm'))); $form->setattribute('method', 'post'); $form->setattribute('enctype','multipart/form-data'); ?> <div id="my-tab-content" class="tab-content"> <div class="tab-pane active" id="tabs-8"> <h3><center>photos</center></h3> <table class="table a8"> <tr><td><a href="confirm?id=<?php echo $a['memcode'];?> "> </td></tr> <tr><th>photos</th><td> <div > <a href="<?php echo $this->basepath("upload/".$a['imageupload']);?>" rel="gallery"> <img src="<?php echo $this->basepath("upload/".$a['imageupload']);?>" height="50px" width="50px" alt="description here"> </a> </div> </table> </div> </section>

i got solution problem. have downloaded fancybox plugin http://fancyapps.com/fancybox/ , copied css , js files in relevant folder.

and wrote code <link rel="stylesheet" href="/css/jquery.fancybox.css" type="text/css"> <link rel="stylesheet" href="/css/jquery.fancybox-buttons.css" type="text/css"><script src="/js/jquery.fancybox.js"></script> <script type="text/javascript" src="/js/jquery.fancybox.pack.js"></script> <script type="text/javascript"> $(document).ready(function() { $(".fancybox").fancybox({ beforeshow : function() { var alt = this.element.find('img').attr('alt'); this.inner.find('img').attr('alt', alt); this.title = alt; } }); }); </script> <a rel="gallery" class="fancybox" href="http://fancyapps.com/fancybox/demo/1_b.jpg"> <img src="http://fancyapps.com/fancybox/demo/1_s.jpg" alt="first picture"/></a>

php jquery zend-framework

No comments:

Post a Comment