Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 10:27 pm EST

Geeklog Forums

custom search results - only articles


IW

Anonymous
angelic
Hi there, i have been searching for help here in gl site, but i could not find it.

1.) So, i want to customize search results - so that only articles would be shown/found in results page. I don't wont a comments or staticpages to appear in search results, only articles. I have changed searchform allready to fit our suits. So, all i want is to get rid of comments and staticpages results, to exclude them from search results.

2.) And just one more thing : i want to show o1ly title of articles, without the date of publishing, author and hits count.

3.) And just one more thing : i want to display first paragraph (like intro with link read more in topics) of article under the title of it.

And know what? I need some concrete help, specialy for first problem, something like step by step, easy. Thank you, geeks, read ya, lya! Its a deal - shaking hands
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by IW: I need some concrete help, specialy for first problem, something like step by step, easy.

I'm afraid what you want would require code changes. So the first step would be to learn some PHP ...

bye, Dirk
 Quote

Status: offline

drshakagee

Forum User
Full Member
Registered: 10/01/03
Posts: 231
Quote by IW: Hi there, i have been searching for help here in gl site, but i could not find it.

1.) So, i want to customize search results - so that only articles would be shown/found in results page. I don't wont a comments or staticpages to appear in search results, only articles. I have changed searchform allready to fit our suits. So, all i want is to get rid of comments and staticpages results, to exclude them from search results.


Depending on what theme you use you can change this in your search form:
Text Formatted Code

<input type="hidden" name="type" value="all">

 

to this:
Text Formatted Code

<input type="hidden" name="type" value="stories">

 

That will work for the search block on the home page if you also want to limit the advanced search you will have to edit the searchform.thtml file and remove the items you don't want from the select name="type" area.
Quote by IW:
2.) And just one more thing : i want to show o1ly title of articles, without the date of publishing, author and hits count.

You need to edit your story.thtml, featuredstorytext.thtml, and archivestorytext.thtml, just removing the
Text Formatted Code

{story_date},{lang_contributed_by},{start_contributedby_anchortag},{contributedby_user},{end_contributedby_anchortag},{lang_views},{story_hits}

 

variables should work.
Quote by IW:
3.) And just one more thing : i want to display first paragraph (like intro with link read more in topics) of article under the title of it.

once again edit those three story template files.
Quote by IW:
And know what? I need some concrete help, specialy for first problem, something like step by step, easy. Thank you, geeks, read ya, lya! Its a deal - shaking hands

Hopefully that helps.
- Gavin
Yes I am mental.
 Quote

All times are EST. The time is now 10:27 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content