Legacy Hook in class_core.php for extra keyword processing

Status
Not open for further replies.

neounix

Customer
Hi.

We hard coded this before:

Code:
$_keyWords = strtolower($_keyWords);  //neo extra

just before:

Code:
$content = preg_replace('#(<meta name="keywords".*?content=)"#is', '$1"' . $_keyWords . ',', $content);

Do you mind to add two hooks in this file? One hook before this the preg_replace() for meta keywords and another one before preg_replace() for the meta description?

in

Code:
class_core.php

Thanks so much!

That way, we can add some custom code as we need for meta description and meta keywords.

We turned off my home brewed dynamic meta data code and are experimenting with DBSEO in this area. We always set our keywords as lower case (for consistency) and also I have a special "intersection" created in a special way that works better that only using stop works (in my view).

Also, I noticed there is some additional chars in meta description that we would like to strip out; so a hook for meta desc would be great as well.

Thanks again for the great support!
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
For the next version, I'll add dbtech_dbseo_process_content_meta above
PHP:
		if ($_keyWords)
		{
			// Get rid of any HTML in the keywords
			$_keyWords = strip_tags($_keyWords);

That way, you can simultaneously override $_keyWords and $_description. The original hook locations would not work if the system did not find any keywords nor a description on its own - the hook would never get executed.

Additionally, if the entire block inside the if tags is rendered useless from your custom code, you can simply blank out $_keyWords and $_description after your own replacements have ran.
 
Status
Not open for further replies.

Similar threads

Top