SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Plugin: Wordpress NextGen Gallery]Album gallery thumbnail not linking to gallery

    Hello all,

    I'm having a issue with my gallery thumbnail on the nextgen gallery album page not linking. Instead of using the given code located in the album.extend.php file of the plugin.:

    PHP Code:
    <div class="ngg-thumbnail">
           <a href="<?php echo $gallery->pagelink ?>"><img class="Thumb" alt="<?php echo     $gallery->title ?>" src="<?php echo $gallery->previewurl ?>"/></a>
    </div>
    To be able to use larger album gallery thumbnails(please see wordpress forum: http:Larger Thumbnails) I am using the code:

    PHP Code:
    <div class="ngg-thumbnail">
             <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" />
    </div>
    The results can be seen at: Galleries. Please note: Only the "Forgotten Music" icon has been placed.

    When clicking on the title "Forgotten Music" I am sucessfully taken to that gallery page. Unfortunately when clicking on the thumbnail instead of being taken to that same page nothing happens.

    I'm not sure what I've missed, or what I have done wrong. Any help, guidance or answers would be greatly appreciated.

    PChuprina

  2. #2
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    PC, it seems like it doesn't know what gid means. I couldn't find anything in the codex about $gallery. I am guessing that the images are in another table and you need to point it there. If you can link me to where you found out about gid?
    Ryan B | My Blog | Twitter

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I got it from Wordpress Forum: Larger thumbnail, cut and pasted the replacement code from there, unfortunately this forum question has been closed for a year now. So I can't ask about gid. Hope that helps.

    PChuprina

  4. #4
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    it looks like bitly is down, how about a direct link?
    Ryan B | My Blog | Twitter

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2009
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Hello all,

    I solved the problem, which was a mistake made by me omitting some basic code.

    Instead of:
    Code:
    <div class="ngg-thumbnail"> 
             <img alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" /> 
             </div>
    I did:
    Code:
    <div class="ngg-thumbnail">
                        <a href="<?php echo $gallery->pagelink ?>"><img class="thumb" alt="<?php echo $gallery->title ?>" src="<?php bloginfo('url'); ?>/wp-content/gallery/albumthumbs/<?php echo $gallery->gid ?>.jpg" /></a>
    	   </div>
    I forgot <a> linking...... Now if I only knew more about "gid"

    Thanks, by posting here, I thought about it more, and corrected my own silly mistake.

    PChuprina


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •