Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: [MOD] Additional Search Information  (Read 2805 times)

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[MOD] Additional Search Information
« on: June 24, 2007, 06:54:14 am »

Another very small MOD from me, just to enhance the user experience of your website :)
This will add additional information for your search queries.

Default seach query returns the following:

and after applying this little MOD:


THE CODE
In // SITE LANGUAGE VARIABLES, find:
Quote
$l['resultsfound'] = 'results were found for query';
and below it add:
Quote
$l['published_cat'] = 'published in Category';
Next, in // SEARCH FORM, find:
Quote
echo '<p><a href="'.db('website').find_cat_sef($r['category']).'/'.$r['seftitle'].'/">'.$r['title'].'</a> - '.$date.'</p>';
and replace it with:
Quote
//echo '<p><a href="'.db('website').find_cat_sef($r['category']).'/'.$r['seftitle'].'/">'.$r['title'].'</a> - '.$date.'</p>';
echo '<p>'.l('article').': <a href="'.db('website').find_cat_sef($r['category']).'/'.$r['seftitle'].'/">'.$r['title'].'</a> '.l('published_cat').' <a href="'.db('website').find_cat_sef($r['category']).'/" title="'.$r['description'].'">'.find_cat_sef($r['category']).'</a> '.l('on').' '.$date.'</p>';
And that's it.  Simple but provides your visitors with a little more information when searching :cool:
« Last Edit: August 22, 2007, 12:20:30 am by Phil Martin »
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

centered

  • Guest
[MOD] Additional Search Information
« Reply #1 on: June 24, 2007, 07:56:01 am »

Very helpful mod, thanks!
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[MOD] Additional Search Information
« Reply #2 on: August 15, 2007, 03:06:29 pm »

Yupp, stolen it, integrated it, and its nice ;) Thanks Pix-man...
Logged
"It's only dead fish that goes with the flow... "
Updated