2012-01-11 3 views
0

어때요? 그래서 나는이 문제를 안고 있습니다.NEXTGEN 갤러리 설명을 설명의 PrettyPhoto jquery 플러그인에 넣는 방법

나는 Wordpress를 사용하여 NextGen 갤러리를 (2012-01-11까지 최신) 갤러리와 PrettyPhoto jquery 플러그인 (2012-01-11까지 최신)으로 완벽하게 작동 시켰지만 완벽하게 작동 할 필요가있다. PrettyPhoto 플러그인을 사용하여 열려있는 모든 이미지 아래의 NextGen 갤러리 설명을 각각 확인하십시오.

$ gallery는 우리가 필요로하는 모든 것을 담고 있지만 NextGen 폴더에 있습니다. mysql SELECT를 쓰고 데이터베이스에서 모든 것을 꺼내는 것 외에는 빼낼 방법을 찾을 수 없습니다. 여기에 적절한 루프를 수행하는 방법. 기본적으로 social_tools 블록이 어디

<script type="text/javascript" charset="utf-8"> 
$(document).ready(function(){ 
     $("a[rel^='prettyPhoto']").prettyPhoto({ 
      animation_speed: 'fast', /* fast/slow/normal */ 
      slideshow: 5000, /* false OR interval time in ms */ 
      autoplay_slideshow: false, /* true/false */ 
      opacity: 0.80, /* Value between 0 and 1 */ 
      show_title: true, /* true/false */ 
      allow_resize: true, /* Resize the photos bigger than viewport. true/false */ 
      default_width: 500, 
      default_height: 344, 
      counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */ 
      theme: 'pp_default', /* light_rounded/dark_rounded/light_square/dark_square/facebook */ 
      horizontal_padding: 20, /* The padding on each side of the picture */ 
      hideflash: false, /* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto */ 
      wmode: 'opaque', /* Set the flash wmode attribute */ 
      autoplay: true, /* Automatically start videos: True/False */ 
      modal: false, /* If set to true, only the close button will close the window */ 
      deeplinking: true, /* Allow prettyPhoto to update the url to enable deeplinking. */ 
      overlay_gallery: true, /* If set to true, a gallery will overlay the fullscreen image on mouse over */ 
      keyboard_shortcuts: true, /* Set to false if you open forms inside prettyPhoto */ 
      changepicturecallback: function(){}, /* Called everytime an item is shown/changed */ 
      callback: function(){}, /* Called when prettyPhoto is closed */ 
      ie6_fallback: true, 
      markup: '<div class="pp_pic_holder"> \ 
         <div class="ppt">&nbsp;</div> \ 
         <div class="pp_top"> \ 
          <div class="pp_left"></div> \ 
          <div class="pp_middle"></div> \ 
          <div class="pp_right"></div> \ 
         </div> \ 
         <div class="pp_content_container"> \ 
          <div class="pp_left"> \ 
          <div class="pp_right"> \ 
           <div class="pp_content"> \ 
            <div class="pp_loaderIcon"></div> \ 
            <div class="pp_fade"> \ 
             <a href="#" class="pp_expand" title="Expand the image">Expand</a> \ 
             <div class="pp_hoverContainer"> \ 
              <a class="pp_next" href="#">next</a> \ 
              <a class="pp_previous" href="#">previous</a> \ 
             </div> \ 
             <div id="pp_full_res"></div> \ 
             <div class="pp_details"> \ 
              <div class="pp_nav"> \ 
               <a href="#" class="pp_arrow_previous">Previous</a> \ 
               <p class="currentTextHolder">0/0</p> \ 
               <a href="#" class="pp_arrow_next">Next</a> \ 
              </div> \ 
              <p class="pp_description"></p> \ 
              {pp_social} \ 
              <a class="pp_close" href="#">Close</a> \ 
             </div> \ 
            </div> \ 
           </div> \ 
          </div> \ 
          </div> \ 
         </div> \ 
         <div class="pp_bottom"> \ 
          <div class="pp_left"></div> \ 
          <div class="pp_middle"></div> \ 
          <div class="pp_right"></div> \ 
         </div> \ 
        </div> \ 
        <div class="pp_overlay"></div>', 
      gallery_markup: '<div class="pp_gallery"> \ 
           <a href="#" class="pp_arrow_previous">Previous</a> \ 
           <div> \ 
            <ul> \ 
             {gallery} \ 
            </ul> \ 
           </div> \ 
           <a href="#" class="pp_arrow_next">Next</a> \ 
          </div>', 
      image_markup: '<img id="fullResImage" src="{path}" />', 
      flash_markup: '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>', 
      quicktime_markup: '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>', 
      iframe_markup: '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', 
      inline_markup: '<div class="pp_inline">{content}</div>', 
      custom_markup: '', 
      social_tools: '<div class="pp_social"><div class="need_gallery_desc_here" style="color:black"><?php echo 'need_gallery_desc_here' ?></div></div>' 
     }); 
    }); 
</script> 

당신은의 prettyPhoto에 장소를 볼 수 있습니다 : 여기

http://sinergijait.lt/alex/hittoak/photo-gallery/ 내가 header.php에서 사용하는 prettyphoto 스크립트입니다 : 여기

링크의

social_tools: '<div class="pp_social"><div class="need_gallery_desc_here" style="color:black"><?php echo 'need_gallery_desc_here' ?></div></div>' 

그래서 기본적으로 설명 (데이터베이스에서 'galdesc'열)을 $ gallery 밖으로 꺼내거나 데이터베이스 자체에서 꺼내야합니다. f 가능한 첫 번째) 갤러리의 모든 prettyPhoto 이미지에 갤러리의 설명을 표시하는 루프를 만듭니다.

너무 복잡하게 들리지 않았 으면 좋겠다. 미리 감사드립니다.

안부 인사.

답변

0

이미지에 설명을 쓰려면 title 속성을 사용하십시오.

<ul class="gallery clearfix"> 
<li><a href="images/fullscreen/1.JPG?lol=lol" rel="prettyPhoto[gallery1]" title="You can add caption to pictures. You can add caption to pictures. You can add caption to pictures."><img src="images/thumbnails/t_1.jpg" width="60" height="60" alt="Red round shape" /></a> 
</li> 
</ul> 

예를 들어 설명을 개인 설정할 수 있습니다. 이

을하는 데 도움이

<a href="" rel="fotos[galeria]" data-desc="Description">Examinar en Mapa</a> 

는 그런 꽤 사진 소스에서이 라인을

pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('data-desc')) ? $(n).attr('data-desc') : ""; }) : $.makeArray($(this).attr('data-desc')); 

희망을 변경해야

관련 문제