Add a drop-down list to a pager I want to add drop-down list that allows users to select which page they want to visit.

How can I accomplish this?
What code should I use?
If you want to replace the whole site pager with a drop-down list, you should write a custom module (see 1 and 2). If you want to show it only for some pages, you just invoke the module (see 2):
1. Declare this in the template.php of your theme (replace YOURTHEMENAME and YOURMODULENAME with the appropriate theme/module name):

function YOURTHEMENAME_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9) {
  global $pager_page_array, $pager_total;
  // Calculate various markers within this pager piece:
  // current is the page we are currently paged to
  $pager_current = $pager_page_array[$element] + 1;
  // max is the maximum page number
  $pager_max = $pager_total[$element];
  // End of marker calculations.

  return drupal_get_form('YOURMODULENAME_pagerform', $_GET['q'], $pager_max, $pager_current);
}



2. Create a custom module, adding the following code to the YOURMODULENAME.module file:

function YOURMODULENAME_pagerform(&amp;$form_state, $path, $pager_max, $pager_current = 0) {
  $form = array();  
  $pagers = array();

  for ($i=0;$i&lt;$pager_max;$i++) {
    $pagers[$i] = $i+1;
  }

  $form['pager'] = array(
    '#type' =&gt; 'select',
    '#title' =&gt; t('Current page'),
    '#options' =&gt; $pagers,
    '#default_value' =&gt; $pager_current,
    '#attributes' =&gt; array('onchange' =&gt; 'this.form.submit();'),
  );
  $form['path'] = array(
    '#type' =&gt; 'value',
    '#value' =&gt; $path,
  );
  $form['submit'] = array(
    '#type' =&gt; 'submit', 
    '#value' =&gt; t('Submit'), 
    '#attributes' =&gt; array('style' =&gt; 'display: none;') 
  );

  return $form;
}

function YOURMODULENAME_pagerform_submit($form, &amp;$form_state) {
  drupal_goto($form_state['values']['path'], 'page='.$form_state['values']['pager']);
}


p.s. The code was quickly written in browser without any debugging, so may be some errors happen, but it's should give "idea".