Seite 1 von 1

Dynamic Meta tags verbinden mit search_ignore_words.php

Verfasst: 21.04.2008 21:36
von mucha0815
Hallo,
bin in php noch nicht so wirklich zuhause und bräuchte deswegen hilfe.

Habe den MOD "Dynamic Meta tags" und habe dort leider sehr viele Wörter in den Keywords die dort nicht rein sollen.
Lösung wäre: Verbinden mit search_ignore_words.php.

Hab da schon eine Idee gehabt wo man es einfügen könnte:

Code: Alles auswählen

	function make_keywords($text) {
		$keywords = '';
		$num = 0;
		$text = preg_replace(array('`&(amp;)?[a-z0-9]+;`i', '`[[:punct:]]+`', '`[\s]+`'), ' ', strip_tags($text) );
		$text = explode(' ', $text);
		// We take the most used words first
		$text = array_count_values($text);
		arsort($text);
		foreach ($text as $word => $count) {
			if ( utf8_strlen($word) > $this->mconfig['wordminlen'] ) {
				$keywords .= empty($keywords) ? $word : ', ' . $word;
				$num++;
				if ( $num >= $this->mconfig['keywordlimit'] ) {
					unset($text);
					break;
				}
			}	
		}
		return $keywords;
	}
in verbindung mit:

Code: Alles auswählen

global $user, $phpEx;
if (file_exists("{$user->lang_path}/search_ignore_words.$phpEx")) {
			// include the file containing ignore words
			include("{$user->lang_path}/search_ignore_words.$phpEx");
		}
Nur wie mache ich die Abfrage das jedes Wort aus dieser Liste rausfligt?

Vielen dank