Designating Non-Searchable Content
Posted: Thu 15. Jul 2004, 02:30
I remember reading somewhere in the forum regarding the issue of site structure elements, set to hidden, still showing up in search results. Basically I have an implementation of Pappnase's 'content right', placing editable (172px wide) 'modules' in the right panel. These modules are included in the final page using the new {URL..} tag. They are designated as 'hidden from frontend'.
What I found however is that during standard site wide search...these modules come up in search results. The user clicks the link, and instead of coming to a full page..they are directed to the 172 pixel wide module itself...not very cool.
From what I remember...there is at present no way to designate these elements (modules) not to come up in search results. I wanted to ask pointer/ideas on workarounds or if there is any plan to support a checkbox in the backend ('Make this (hidden) category non-searchable')
Cheers,
jsw(john)
UPDATE: What I have been able to do is add an additional field to the 'phpwcms_article' table, naming it article_nosearch. It is similar to the other flag fields 'article_public', 'article_aktiv'...etc and is set to 0 by default. Then in the query in: include/inc_front/content/cnt13.article.inc.php,
I added the additional parameter (article_nosearch=0) to the string:
Obviously this is a simplified hack of sorts...but it might enhance wcms It should not be too difficult to add a checkbox in the article dialogue, perhaps at the bottom of the page next to status: [ ] visible [ ] public [ ] non-searchable
I also found the original thread that raised the topic of this thread:
http://www.phpwcms.de/forum/viewtopic.php?t=1082
cheers....
What I found however is that during standard site wide search...these modules come up in search results. The user clicks the link, and instead of coming to a full page..they are directed to the 172 pixel wide module itself...not very cool.
From what I remember...there is at present no way to designate these elements (modules) not to come up in search results. I wanted to ask pointer/ideas on workarounds or if there is any plan to support a checkbox in the backend ('Make this (hidden) category non-searchable')
Cheers,
jsw(john)
UPDATE: What I have been able to do is add an additional field to the 'phpwcms_article' table, naming it article_nosearch. It is similar to the other flag fields 'article_public', 'article_aktiv'...etc and is set to 0 by default. Then in the query in: include/inc_front/content/cnt13.article.inc.php,
I added the additional parameter (article_nosearch=0) to the string:
Code: Select all
$sql = "SELECT *, UNIX_TIMESTAMP(article_tstamp) AS article_date FROM ".DB_PREPEND."phpwcms_article ";
$sql .= "WHERE article_public=1 AND article_aktiv=1 AND article_nosearch=0 AND article_deleted=0 ";
$sql .= "AND article_begin<NOW() AND article_end>NOW() ";
$sql .= "ORDER BY article_cid, article_sort, article_tstamp DESC;";
I also found the original thread that raised the topic of this thread:
http://www.phpwcms.de/forum/viewtopic.php?t=1082
cheers....