[Typo3-dev] indexed_search and metatags
Thomas Esders
pechgehabt at gmail.com
Wed Apr 27 14:06:44 CEST 2005
Hi!
my enviroment:
T3 3.7
indexed_search 2.1.3
meta tag extend 1.0.3
I would like to exclude the meta tags from the indexed_search search
results. There was a hint on how to do this on the english mailinglist
in 2003 (;-)) (see:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/30189/?tx_maillisttofaq_pi1%5Bsword%5D=change%20the%20last%20lines%20of%20meta.php&tx_maillisttofaq_pi1%5Banswered_only%5D=0&tx_maillisttofaq_pi1%5Bmode%5D=1
)
Quote:
[...]
I use the metatags_extended and indexed_search extensions with global
META tags on every page (v3.5.0). When I run a fulltext search on one of
the META keywords I end up with a listing of every single page on my site.
So I patched the indexed_search to include TYPO3SEARCH_begin/end-tags to
in the site header and metatags_extended to recognize them.
I don't know if there is a cleaner way of doing this, I just post the
changes that work for me in case somebody has/had the same problem, any
comments on issues associated with this patch are welcome.
indexed_search patch:
---------------------
add the line
$this->typoSearchTags($headPart);
right before the comment
# get keywords and description metatags
inside the function splitHTMLContent of class.indexer.php
metatags_extended patch:
------------------------
change the last lines of meta.php from
$content ="";
$content.= implode($regular,chr(10)).chr(10);
$content.= implode($DC,chr(10)).chr(10);
to
if ($conf["flags."]["excludeInSearch"]) {
$content="<!--TYPO3SEARCH_end-->\n";
} else {
$content ="";
}
$content.= implode($regular,chr(10)).chr(10);
$content.= implode($DC,chr(10)).chr(10);
if ($conf["flags."]["excludeInSearch"]) {
$content.="<!--TYPO3SEARCH_begin-->\n";
}
add the line
// Boolean, exclude META tags from indexed search
excludeInSearch = {$plugin.meta.excludeInSearch}
to ext_typoscript_setup.txt, update the settings in the extension
manager and set the CONSTANT plugin.meta.excludeInSearch=1 where desired.
[...]
Question:
=========
- Is this funktionality in indexed_search in T3 version 3.8?
- Is there an chance that this funktionality is included in an official
version of indexed_search?
- Does anyone know a workaround?
Thomas
More information about the TYPO3-dev
mailing list