PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 04-29-2004, 10:43 AM   #1
guillemc
Green Mole
 
Join Date: Mar 2004
Posts: 2
Exclude meta tags from text snippet

Hi!

Is there an easy way to modify the script so that the content in the 'Description' meta tag does not appear in the text snippets?

I don't mean to exclude it from the indexing process, but only to not store its value in the text_context file...

I'm trying to use the search engine with a multilingual dynamic site, and I'm using the description meta tag to store the language of the pages being indexed, so that later I can search for documents with a given language in their descriptions...

however I would like this meta information not to be shown in the text snippet, because it's a little confusing and also because it appears 3 times (I guess this is because I've set the title weight to 3)

Thanks in advance,

Guillem
guillemc is offline   Reply With Quote
Old 05-01-2004, 09:10 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. Try this thread or a modification thereto.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 05-03-2004, 12:14 AM   #3
guillemc
Green Mole
 
Join Date: Mar 2004
Posts: 2
Hi Charter,

thanks, this is exactly what I was looking for


Quote:
Originally posted by Charter
Thanks. The chunk of code to modify is the following found in the robot_functions.php file. Comment out whatever you don't want at the end of the text files that are stored in the text_content directory. It's the $add_text variable that adds that text to the end of the files in the text_content directory.
PHP Code:
//weight of title and description is there
for ($itl 0;$itl TITLE_WEIGHT$itl++)
      {
      
$text_title .= $doc_title." ".$page_desc['content']." ";
      }
$add_text $text_title;
if (
is_array($textalts) && isset($textalts['content'])) {
    
$add_text .= $textalts['content'];
}
if (
is_array($page_keywords) && isset($page_keywords['content'])) {
    
$add_text .= " ".$page_keywords['content'];
}
array_push($text,$add_text); 
guillemc is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IE Issues with exclude and include tags starpogi Troubleshooting 0 03-24-2006 07:15 AM
Adding proprietary meta tags/values to be spidered danwanner How-to Forum 2 03-03-2005 12:16 PM
Meta-Tags: Description and Keywords herberth How-to Forum 1 06-13-2004 02:45 AM
How are the Revisit-After META tags processed? sid Troubleshooting 1 11-22-2003 12:50 PM
Indexing META-Tags Rolandks Bug Tracker 7 10-25-2003 07:46 AM


All times are GMT -8. The time now is 04:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.