ISBN format

csc4 - August 31, 2006 - 21:10
Project:Book Review
Version:4.6.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

The ISBN entry seems to allow entry of ISBNs in any format, but the Book Review store %ISBN needs to have spaces or hyphens removed for links to work.

Is this something the module should do or is there an easy call in the snippet which would strip non-numeric characters?

#1

peterx - September 2, 2006 - 02:30

Book Review 4.7.0 function bookreview_block() contains code to remove dashes:

        $node = db_fetch_object($result);
        $isbn = preg_replace('/-/', '', $node->isbn);
        $block['subject'] = variable_get('bookreview_store_blocktitle', '');
      $content = preg_replace('/%ISBN/', $isbn, variable_get('bookreview_store_snippet', ''));
        $block['content'] = $content;

Try 4.7.0 or convert the code back to 4.6.0.

#2

csc4 - September 2, 2006 - 23:02

Thanks a lot - that's a huge help! Fixed.

 
 

Drupal is a registered trademark of Dries Buytaert.