I think Acidfree would be even better if instead of the typical pager display with numbers, we could have thumbnails displayed across the top! OK, so this is probably not easy to implement, and you're probably busy answering all the support requests / getting it ready for 4.7. I still think it would be very cool. :)

Comments

vhmauery’s picture

Status: Active » Closed (works as designed)

The pager is the standard pager so it integrates with the rest of the site. I don't think I would ever do anything different. But if you really want to have thumbnails for your pager, you could do it this way:

1. Create a theme function to called {my_theme}_acidfree_print_full_album that looks similar to theme_acidfree_print_full_album defined in class_album.inc.
2. replace the line that looks like
$output .= theme('pager', NULL, $nodes_per_page, ALBUM_PAGER);
with a function that draws your custom pager.

I realize that not everyone wants to (or can) write custom themed functions and such, but that is all that needs to be done. I just don't think it is appropriate in the core acidfree code.

cpeter’s picture

Version: 4.6.x-1.x-dev » 5.x-1.x-dev

Hi,

We are using now a newer version of acidfee 5.x. How can we change the pager to show only just the previous and next links I suppose?

It would be nice a solution with a hook or some other way which does not imply changing directly the module scripts.

Thank you for you advice!
Peter

I have tried with defining:
1. function explore_views_view_album_grid_view($view, $type, $nodes, $teasers = false, $links = true) { ... where explore is my theme name. The function is not called.

2. I have tried with
function phptemplate_pager($tags = array(), $page_size = 10, $element = 0, $attributes = array()) {
which works but that changes the pagers on all pages not only on nodes of type acidfree. (and for other nodes I don't know how to set the default pager links)

function phptemplate_pagerX($tags = array(), $page_size = 10, $element = 0, $attributes = array()) {
	global $pager_page_array, $pager_total;

	$path = explode('/', $_GET['q']);
	if ($path[0] == 'node' && is_numeric($path[1])) {
        $node = acidfree_get_node_by_id($path[1]);
        if ($node && ($node->type == 'acidfree' && $_GET['page'])) {
        	//$pager_sort = 'changed DESC';
		    $pager_sort = _acidfree_content_sort_clause($pnode);
        	$nodes_per_page = '-1';

        	$nodes = _acidfree_get_children($node->tid, $nodes_per_page, ALBUM_PAGER, true, $pager_sort);

			list(,$page_curr) = explode(',', $_GET['page']);
			$page_curr = intval($page_curr);

			if (count($nodes) > 1) {
		    	$output = '<div class="previous-next"><ul>';
		    	if ($page_curr!=0) $output.= '<li><a href="'.url('node/'.$nodes[$page_curr-1]).'" class="previous">'.t('Previous').'</a></li>';
				// $output.= '<div class="previous-next-page">Page '.$page_curr.'/'.$pager_total[$element].'</div>';
		    	if ($page_curr!=(count($nodes)-1)) $output.= '<li><a href="'.url('node/'.$nodes[$page_curr+1]).'" class="next">'.t('Next').'</a></li>';
		    	$output.= '</div>';
		    }
        	return $output;
        }
    }
}