PDA

View Full Version : PHPDIG_EXCLUDE_COMMENT doesn’t work


herberth
04-01-2004, 12:52 AM
I wanted to exclude some text out of the search engine of phpdig:

<!-- phpdigExclude --><table width="100%" border="0" cellpadding="0" cellspacing="0" id="subnav">
<tr>
<td valign="top"><div align="right"> <a href="e_artauth_intro.html" class="artistssub1" onfocus="this.blur()">About our<br />
Artists &amp; Authors</a><br />
<br />
<a href="e_artists_zwerger.html" class="artistssub2" onfocus="this.blur()">Lisbeth Zwerger</a><br />
<br />
<a href="e_authors_bardill.html" class="artistssub1" onfocus="this.blur()">Authors</a><br />
</div></td>
</tr>
</table><!-- phpdigInclude -->

This is the code of the subnavigation and I don’t want that phpdig index the names in this table.

Why doesn’t it work?

Thank you for help.

Herbert

Charter
04-01-2004, 01:16 AM
Hi. It's not working because the exclude/include comments need to each be on their own line. If generating HTML from a script, use \n to place newlines and check the HTML source to make sure the comments are on their own lines prior to index. The comments work as follows:

<html>
<body>
This text is indexed.
<!-- phpdigExclude -->
<a href="http://www.this_link.com/is_followed.html">This text is ignored.</a>
This text is ignored.
<!-- phpdigInclude -->
This text is indexed.
</body>
</html>

To change this behavior, the phpdigExplore and/or phpdigIndexFile functions in robot_functions.php could be modified.

herberth
04-01-2004, 02:58 AM
Dear Charter,

thank you for your help.

I have made the corrections but it doesn’t still work.

Link for Search:
http://www.minedition.com/english/

Result Nr. 4 (I have searched for "Gantschev"):
http://www.minedition.com/english/6artauth/e_artists_chen.html
There still comes a link where "Gantschev" is only in the Navigation Bar.

Thank you for helping.

Herbert

Charter
04-01-2004, 03:14 AM
Hi. Did you do a reindex?

herberth
04-01-2004, 03:29 AM
Yes, I have deleted the whole website with all Keywords, etc.
Then I have indexed the site new.

Charter
04-01-2004, 03:31 AM
Hi. Do you use the delete button from the admin panel when you deleted the site?

herberth
04-01-2004, 03:35 AM
Yes,
I clicked on the domain and clicked "Delete site".
Then I clicked on "Clean dictionary" to delete all Keywords. All parameters on DataBase status were on "0".

Charter
04-01-2004, 03:42 AM
Hi. That all sounds good. Are the following set in the config file?

define('PHPDIG_EXCLUDE_COMMENT','<!-- phpdigExclude -->');
//comment to exclude a page part
define('PHPDIG_INCLUDE_COMMENT','<!-- phpdigInclude -->');
//comment to include a page part

herberth
04-01-2004, 03:52 AM
Yes, but there were linebreaks (see below).
Now I try it again.


define('PHPDIG_EXCLUDE_COMMENT','
<!-- phpdigExclude -->
');
//comment to exclude a page part
define('PHPDIG_INCLUDE_COMMENT','
<!-- phpdigInclude -->
');
//comment to include a page part

herberth
04-01-2004, 04:54 AM
Dear Charter.

Now it works.

Thank you very much.