[support] How do you stop info on search result?

Jason Flatt drupal at oadaeh.net
Sat May 26 12:35:27 UTC 2007


On Saturday 26 May 2007 00:46:17 A-NO-NE Music wrote:
> sessy / 2007/05/26 / 05:23 AM wrote:
> >I don't think there's an admin settings page or module to do it, but you
> >can quickly override
> >themes_search_item:
> >http://api.drupal.org/api/5/function/theme_search_item
>
> Nice!  Thank you!
>
> Well, commenting out a few lines made it work as I wanted, but I don't
> exactly know what I am doing.
>
>     ($item['snippet'] ? '<p>'. $item['snippet'] . '</p>' : '')
>
> Why this way, is way beyond my PHP knowledge.  But I hope I should see
> obvious error if my modification was bad, and since I see the result as
> expected, I am doing OK, yes?

This is what sessy meant:
http://drupal.org/node/11811
http://drupal.org/node/55126

While it will be more work and effort to do so, it will be better in the long 
run to override the function rather than to modify the core code. The reason 
being that you will end up with a problem when you go to do your upgrade to 
Drupal 5.2 or 6 and your changes get reverted.

-- 
Jason Flatt
http://www.oadaeh.net/
Father of Six:  http://www.flattfamily.com/ (Joseph, 14; Cramer, 12; Travis, 
10; Angela; Harry, 7; and William, 12:04 am, 12-29-2005)
Linux User:     http://www.xubuntu.org/
Drupal Fanatic: http://drupal.org/


More information about the support mailing list