On my gallery pages such as this: "/gallery/mirage-album-release-party?page=4&titles=", the pager only shows previous/next links even though I have 4 pages of images. This is on the page GA takes you to after you edit the node.
I have the pager set to "Full" in GA settings.

thanks

Comments

Category:support» task

Hello ericpai,

I am sure what you mean is the pager from the thumbnails view (gallery view).
The pager was programed a simple pager. Now exist more than one feature request regarding this issue.
I plan to add the D-Pager as an other option.

Regards
Juan Carlos

Hi Juan,

I'm trying to find where you are building the prev/next links but I'm having trouble.
I thought it might be in gallery_assist_load() ? I was going to try and build a pager for it.
I see that function theme_gallery_assist_pager() gets called but who is calling it for the display I need?
I found that it's in gallery_assist_lightboxes_display.inc gallery_assist_display().

Update: I was able to write a small function to display a full page for now until you get the official one going. It's just a hack to get me going for now. If anyone is interested I'll post it, but it's not pretty.

thanks

super ericpai,

Please not hesitate to contribute, do not forget: We are within one of the largest most active open source CMS projects.

Regards
Juan Carlos

PS
The pager code you are looking for is in the file gallery_assist_display.inc, It is hard coded.

Here is my quick and dirty hack for the pager:
Around line 260 of "sites/all/modules/gallery_assist_lightboxes/gallery_assist_lightboxes_display.inc"

if (count($node->gallitems) > $node->gall_pager->show && $opt == 'page') {
    $links = implode($my_separator, $link);
######################  eric hack ######################
$pageNum  = (isset($_GET["page"]))?$_GET["page"]:1;
$numPages = ceil((count($node->gallitems)) / ($my_page_count));
$recnav_link = base_path().drupal_get_path_alias($_GET['q']); //get alias of URL;
$recnav_link.= '?page=';
$links = showRecNav($pageNum, $numPages, $recnav_link);
###################### end: eric hack ############################
  $node_light = new stdClass();
  $pager .= theme('gallery_assist_pager', $node_light, $links, $extras);
  $node_light = new stdClass();
  $pager .= theme('gallery_assist_pager', $node_light, $links, $extras);
}

Then added a function at the bottom of the file:

function showRecNav($page, $numPages, $recnav_link){
$html='';
$html.= '<br>';
$html.= '<table width="98%" border="0" cellpadding="0" cellspacing="0" class="RecNav-Paging-Table">
      <tr>
        <td>';
$nav = '';
// Can we have a link to the previous page?
if($page > '1'){
$nav .= '<a href="'.$recnav_link. ($page-1) . '" class="RecNav-Paging">&lt;&lt; Prev</a> |';
}
for($i = 1; $i < $numPages+1; $i++)
{
if($page == $i)
{
// Bold the page and dont make it a link
$nav .= ' <b>'.$i.'</b> |';
}else{
// Link the page
$nav .= ' <a href="'.$recnav_link.$i.'" class="RecNav-Paging">'.$i.'</a> |';
}
}
// Can we have a link to the next page?
if($page < $numPages){
$nav .= ' <a href="'.$recnav_link. ($page+1) . '" class="RecNav-Paging">Next &gt;&gt;</a>';
}
// Strip the trailing pipe if there is one
$nav = ereg_replace("\|$", "", $nav);
$html.= '<span class="RecNav-Paging">'.$numPages.' Pages: &nbsp;  '.$nav.'</span>';
$html.= '</td></tr></table>';
$html.= '<br>';
return $html;
}

Status:Active» Needs review

Hello ericpai,

I have take over your code and made some modifications according the Drupal style guide.
You can test the implemented pager functionality in version gallery_assist-6.x-1.19-beta1.tar.gz.

Thank and Regards
Juan Carlos

I have one question, is this possible to duplicate next/prev link or #4 idea on the bottom of gallery page too???

Hello shwx,

you can achieve this at Administer › Site configuration › Gallery Assist › Assignment.
Change in the form group "Pager" the Position: to both.

Regards
Juan Carlos

Hello people,

I have not idea if my implementation works in your sites.
Can some body give me feedback?

jcmc Thnx a lot :) !

Status:Needs review» Fixed

;-)

Version:6.x-1.18» 6.x-1.19-beta2
Status:Fixed» Needs review

It's not working on 6.x-1.19-beta2. I can see no numbers? Whats wrong?