Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:26 pm EST
Geeklog Forums
search results - no users/views
Raven
Anonymous
When I do a search on my site, it returns the title of the story, date, the author and the amount of views the article has.
I don't want it to show the author or views, how would I change this?
(I've spent about an hour searching through code myself, then searching here, but no luck)
I don't want it to show the author or views, how would I change this?
(I've spent about an hour searching through code myself, then searching here, but no luck)
5
3
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you set $_CONF['contributedbyline'] = 0, it'll hide the author name from everything, including the search.
Not sure if $_CONF['hideviewscount'] = 1 does the same for the hits.
If those don't do what you want, you'll have to change the code in /system/classes/search.class.php. The result set for stories is prepared from line 287 onwards.
bye, Dirk
Not sure if $_CONF['hideviewscount'] = 1 does the same for the hits.
If those don't do what you want, you'll have to change the code in /system/classes/search.class.php. The result set for stories is prepared from line 287 onwards.
bye, Dirk
2
4
Quote
Raven
Anonymous
ERRORMatching CODE tag missing. Unable to format message.
3
5
Quote
Raven
Anonymous
Well changing both of those settings didn't work, both still showed in the search results, but pointing me to the exact line on seach.class.php really helped. Specifically, I commented out line 291&292:
// $story_results->addSearchHeading($LANG09[18]);
// $story_results->addSearchHeading($LANG09[23]);
Then from 311-323 did some changes and commenting:
// $author = $this->_displayName ($A['username'], $A['fullname']);
// if ($A['uid'] == 1) {
// $profile = $author;
// } else {
// $profile = '<a href="' . $_CONF['site_url']
// . '/users.php?mode=profile&uid=' . $A['uid']
// . '">' . $author . '</a>';
// }
$row = array ('<a href="' . $articleUrl . '">'
. stripslashes ($A['title']) . '</a>',
$thetime[0], $profile,
);
Probably not the best way to handle it, but it works Thanks a lot Dirk.
Text Formatted Code
// $story_results->addSearchHeading($LANG09[18]);
// $story_results->addSearchHeading($LANG09[23]);
Then from 311-323 did some changes and commenting:
Text Formatted Code
// $author = $this->_displayName ($A['username'], $A['fullname']);
// if ($A['uid'] == 1) {
// $profile = $author;
// } else {
// $profile = '<a href="' . $_CONF['site_url']
// . '/users.php?mode=profile&uid=' . $A['uid']
// . '">' . $author . '</a>';
// }
$row = array ('<a href="' . $articleUrl . '">'
. stripslashes ($A['title']) . '</a>',
$thetime[0], $profile,
);
Probably not the best way to handle it, but it works Thanks a lot Dirk.
4
4
Quote
All times are EST. The time is now 01:26 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