A minor problem: when Drupal is installed in a user's ~/public_html, the small arrows beside the "Sort by" links do not show up, because the generated links pointing at the wrong location. Attached you find a patch, which essentially changes the links to the images to relative ones.

CommentFileSizeAuthor
biblio.pages_.inc_.diff986 byteslifepillar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjerome’s picture

I had it like that before, but I think there will still be a problem if you apply any filters.

lifepillar’s picture

Status: Patch (to be ported) » Active

You're right... But maybe there is a way to generate a link that works in every case?

rjerome’s picture

Could you try adding the "$base_path" global as shown below...

 function _biblio_sort_tabs($attrib, $options) {
  global $base_path       //  <====== add this line                                 
  $content = '';
  $sort_links = array();
  $tabs = variable_get('biblio_sort_tabs_style', 0);
  $order = ($attrib['order'] == "desc" || $attrib['order'] == "DESC")?"asc":"desc";
  $cur_order = ($attrib['order'] == "desc" || $attrib['order'] == "DESC")?"desc":"asc";
  $path = drupal_get_path('module','biblio');
 // add $basei_path to this line...
  $order_arrow = ($order == 'asc') ? '<img src ="'.$base_path.$path.'/arrow-asc.png" alt =" (Desc)" />':'<img src ="/'.$path.'/arrow-desc.png" alt = " (Asc)" />';
  $sort_links =  variable_get('biblio_sort_tabs', array('author'=>'author', 'title'=>'title', 'type'=>'type', 'year'=>'year', 'keyword'=>'keyword'));
  ksort($sort_links);
  $content .= $tabs ? '<ul class="tabs secondary ">':'';

or this diff...

### Eclipse Workspace Patch 1.0
#P biblio-dev
Index: biblio.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/biblio/biblio.pages.inc,v
retrieving revision 1.1.2.90
diff -u -r1.1.2.90 biblio.pages.inc
--- biblio.pages.inc	11 Jun 2009 13:23:40 -0000	1.1.2.90
+++ biblio.pages.inc	11 Jun 2009 20:58:20 -0000
@@ -525,12 +525,13 @@
 
 function _biblio_sort_tabs($attrib, $options) {
   $content = '';
+  global $base_path;
   $sort_links = array();
   $tabs = variable_get('biblio_sort_tabs_style', 0);
   $order = ($attrib['order'] == "desc" || $attrib['order'] == "DESC")?"asc":"desc";
   $cur_order = ($attrib['order'] == "desc" || $attrib['order'] == "DESC")?"desc":"asc";
   $path = drupal_get_path('module','biblio');
-  $order_arrow = ($order == 'asc') ? '<img src ="/'.$path.'/arrow-asc.png" alt =" (Desc)" />':'<img src ="/'.$path.'/arrow-desc.png" alt = " (Asc)" />';
+  $order_arrow = ($order == 'asc') ? '<img src ="'.$base_path.$path.'/arrow-asc.png" alt =" (Desc)" />':'<img src ="/'.$path.'/arrow-desc.png" alt = " (Asc)" />';
   $sort_links =  variable_get('biblio_sort_tabs', array('author'=>'author', 'title'=>'title', 'type'=>'type', 'year'=>'year', 'keyword'=>'keyword'));
   ksort($sort_links);
   $content .= $tabs ? '<ul class="tabs secondary ">':'';
lifepillar’s picture

Status: Active » Patch (to be ported)

Of course, it should be:

$order_arrow = ($order == 'asc') ? '<img src ="'.$base_path.$path.'/arrow-asc.png" alt =" (Desc)" />':'<img src ="'.$base_path.$path.'/arrow-desc.png" alt = " (Asc)" />';

Yes, that works for me, thank you.

rjerome’s picture

Status: Patch (to be ported) » Fixed

Right you are! This has been committed to the -dev branch and will be subsequent releases.

Ron.

xoxox’s picture

how to apply the patch?

rjerome’s picture

You can download and install the -dev version just like 1.5 version and then when 1.6 comes out, you can go back to the release version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.