See http://ages.ca/documents

Search for document using biblio search (not drupal site search)

result title has em tags around it, i.e.

Search results for em search term /em [Reset Search]

CommentFileSizeAuthor
#1 biblio_style_search_result.patch995 bytesFrank Steiner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Frank Steiner’s picture

Assigned: Unassigned » Frank Steiner
Status: Active » Needs review
FileSize
995 bytes

Tags were added before check_plain.

Please try the attached patch.

LIQUID VISUAL’s picture

Will this result in overlapping tags?

$content .= '<div class="biblio-current-filters"><b>'.t('Search results for <em>').'</b>';

rjerome’s picture

Yes it will.

I would recommend (and have already implemented in the code)...

### 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.97
diff -u -r1.1.2.97 biblio.pages.inc
--- biblio.pages.inc	30 Sep 2009 15:48:25 -0000	1.1.2.97
+++ biblio.pages.inc	7 Oct 2009 12:57:27 -0000
@@ -588,7 +588,7 @@
       array_shift($args);
       $value = db_escape_string($args[0]);
       if ($type == 'search') {
-        $search_content = '<em>'. array_shift($args).'</em>';
+        $search_content = array_shift($args);
         continue;
       }
       if ($type == 'term_id') {
@@ -634,7 +634,7 @@
     }
     if ($search_content) {
       $content .= '<div class="biblio-current-filters"><b>'.t('Search results for ').'</b>';
-      $content .= check_plain($search_content);
+      $content .= '<em>'. check_plain($search_content) .'</em>';
       if ($filtercontent) {
         $content .= '<br><b>'.t('Filters').': </b>';
       }
LIQUID VISUAL’s picture

Thanks for both the patches...let me see where the issue is in the code.

Does that mean that the easiest thing to do is to download the module, extract the one file, and upload that to my site(s)?

rjerome’s picture

You could just edit biblio.pages.inc and change line 591 to look like this...

 $search_content = array_shift($args);

and change line 637 to look like this...

      $content .= '<em>'. check_plain($search_content) .'</em>';

Ron.

LIQUID VISUAL’s picture

poifect! Many thanks!

rjerome’s picture

Status: Needs review » Fixed
rjerome’s picture

Status: Fixed » Closed (fixed)

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