Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cDynamic Meta Tags


clarocque

Recommended Posts

This is elementary for me but maybe not everyone knows this : you have to look at the HTML source in your browser. You will see the contents of all your meta tags.

 

If you have Firefox, there is a good extension called "Meta Tags Panel". It shows you all meta tags in a panel of Firefox. Cool to see what happens.

 

Link : http://ex-code.com/metatags/mozilla.html

 

Didier.

 

Got that little addition for Firfox, and that really helps.:)

 

It does not look like too may words from the description are being used as keywords, especialy some of the ones I would like. i configured the meta_tags.php in english to contain some words I would like in all items. Any way to get more keywords generated?

Link to comment
Share on other sites

  • Replies 384
  • Created
  • Last Reply

Top Posters In This Topic

The description comes from the breadcrumb so rather simple. The keywords comes from either your subcategories or your product listing.

 

Why not use the 3 variables in /includes/<language>/meta_tags.php

 

# For all pages using meta_tags:

define('HEAD_TITLE_TAG_ALL',''); # Title

define('HEAD_DESC_TAG_ALL',''); # Description

define('HEAD_KEY_TAG_ALL',''); # Keywords

 

You can put here some keywords that always must be displayed. I do not use it but it works as I remember well.

 

Didier.

Link to comment
Share on other sites

I'm trying to make a modification to this contribution and I guess I've become more rusty than I thought. I'm posting in case someone else has either done this and would be kind enough to share or could point me to a beginning of how to do it myself.

 

The client would like to have appear in the Title the entire category string, i.e. if we are on a subcategory page the title would show "Category Subcategory - Store Name". As it is, only the immediate category is displayed. In addition, on the product info page they would like the title to include the main category for that product, but no subcategories, i.e. "Category Product Name by: Manu Name - Store Name". As it is the categories are not shown on the product info page.

 

The information is there as it is being displayed under the description meta and of course it is used in the breadcrumb, but my attempts to do the above have failed. I want to make sure I don't screw up the cache function as well. I will be adding Chemo's Ultimate SEO after this. Thank you!

 

David

Link to comment
Share on other sites

To get STS to work with this great contribution i did this:

 

open: /catalog/includes/sts_display_output.php

 

find    echo "<title>" . TITLE . "</title>"; 

** should be around line 159 or so.

 

replace it with this:

require(DIR_WS_INCLUDES . 'meta_tags.php');

Then on your index.php and product_info.php pages just complete remove your standard osc <title><?php echo TITLE; ?></title>  or the one that was added in this contribution.  What you are doing is removing all instances of <title> and </title> from index.php and product_info.php

The only issue i have is that my product_info.php page is showing a - -  at the end of the title.

 

My other pages like the contact page ect are just displaying the normal site title.

 

Eric

 

 

i am trying to install this with STS. product pages worked fine, as well as the index page. however, none of the category pages would load. i get this error:

 

(previously declared in /home/birddogb/public_html/includes/functions/meta.php:30) in /home/birddogb/public_html/includes/functions/meta.php on line 30

 

i am by no means a php guru, so any help would be appreciated. my site is live, so until i figure out how to fix this error, i removed the contrib for now.

 

thanks

Link to comment
Share on other sites

i am trying to install this with STS.  product pages worked fine, as well as the index page.  however, none of the category pages would load.  i get this error:

 

(previously declared in /home/birddogb/public_html/includes/functions/meta.php:30) in /home/birddogb/public_html/includes/functions/meta.php on line 30

 

i am by no means a php guru, so any help would be appreciated.  my site is live, so until i figure out how to fix this error, i removed the contrib for now. 

 

thanks

 

nevermind, i figured it out :lol: i had a previous header tag contrib installed that was conflicting with the new one. i removed it and all seems to be working now :D

Link to comment
Share on other sites

$meta_cache_files_path = DIR_FS_CATALOG.'cache/'; //this should work for most

 

# DO NOT ALTER OR EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING #

foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) {

unlink($filename_page);

}

 

$exists = mysql_query("SELECT 1 FROM cache LIMIT 0");

if ($exists) tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%meta-cache'");

?>

 

Just installed the contrib on a fresh install of osc. Get this nasty error when trying to add a category

 

Fatal error: Call to undefined function: glob() in /var/www/html/catalog/admin/includes/reset_meta_cache.php on line 36

 

im sure it has something to do with the path. I am unsure how to do thi correctly, my apache has the defualt path to /catalog/ so should i just use /cache instead of that whole $meta_cahce_files_path? im new and dont quite know the syntax, help is appriciated thanks

 

Eitan

Link to comment
Share on other sites

Hi,

I have installed the cDynamic meta tags contribution and thinks its a great contribution. There are a couple of issues that I'm not sure as to what is going on. I want to deal with foremost of an indexing problem with google.

 

I will try to make this as understandable as possible. Ever since I have installed this program google has come to index my pages and I lost all of my pages Descritions, Titles and Keywords.

 

Example of google index:

www.njtoys-n-things.com/catalog/index.php?cPath=38

Similar pages

 

Example of Yahoo index:

Indoor Play Systems - Toys & Things - Wood toys, educational toys,

Indoor Play Systems from Toys Things - Wood toys, educational toys, chidren's furniture

www.njtoys-n-things.com/catalog/index.php?cPath=38 - More from this site

 

Am I to assume google has seen a change and erased all that I had and I need to wait for them to fully index my site again? I'm hoping this to be the case. Just hope I do not need to wait too long. My index.php page has been indexed properly. Thanks if anyone knows what happened here. Also note I had all catagories and subcatagories laid out and decided to remove alot of dead catagories and just build the catagories as I added products. But the above example has not changed just the Meta Tag Data has because of the installation of cDynamic Meta Tags. Thanks if anyone knows.

Link to comment
Share on other sites

Hi,

I have installed the cDynamic meta tags contribution and thinks its a great contribution. There are a couple of issues that I'm not sure as to what is going on. I want to deal with foremost of an indexing problem with google.

 

I will try to make this as understandable as possible. Ever since I have installed this program google has come to index my pages and I lost all of my pages Descritions, Titles and Keywords.

 

Example of google index:

www.njtoys-n-things.com/catalog/index.php?cPath=38

Similar pages

 

Example of Yahoo index:

Indoor Play Systems - Toys & Things - Wood toys, educational toys,

Indoor Play Systems from Toys Things - Wood toys, educational toys, chidren's furniture

www.njtoys-n-things.com/catalog/index.php?cPath=38 - More from this site

 

Am I to assume google has seen a change and erased all that I had and I need to wait for them to fully index my site again? I'm hoping this to be the case. Just hope I do not need to wait too long. My index.php page has been indexed properly. Thanks if anyone knows what happened here. Also note I had all catagories and subcatagories laid out and decided to remove alot of dead catagories and just build the catagories as I added products. But the above example has not changed just the Meta Tag Data has because of the installation of cDynamic Meta Tags. Thanks if anyone knows.

Link to comment
Share on other sites

First of all. Thank you for this contribution

 

I need to adapt the /includes/functions/meta.php because I need german words to exclude.

 

For unknown reason the exclude does not work. What is the difference between the words in 'singe quote' and "double Quotes". In my shop it is still showing the word 'aus' in the meta tags

 

starting line 85

function meta_create_meta_keywords($str, $length = 200) {
$str=xstripper($str);
$exclude = array('save','month','year','hundreds','euro','per','aus',"ii","about","above","according",...)

 

here is the corresponding article with the short word inside.

 

<title>Sonnenreiter new Mexiko - Sch?ner Reiten</title>
<meta name="description" content="Modische Jodhpurreithose in topaktueller Streifenoptik aus bielastischer Baumwolle, mit Bes?tzen aus Lederimitat. Zwei...">
<meta name="keywords" content="sch?ner, reiten, modische, jodhpurreithose, topaktueller, streifenoptik, aus, bielastischer, baumwolle, mit, bes?tzen, lederimitat, zwei, rei?verschlu?taschen, und, dekorativen, g?rtelschlaufen">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="http://schoener-reiten.de/">

 

Any suggestion?

 

Thank you

Link to comment
Share on other sites

  • 4 weeks later...

Greetings,

 

I just installed Ultimate SEO before installing this contribution and I have a question. Both contributions modify the admin/categories.php file. Each modification looks like it is doing something very similar. The following code is how it should be installed following the install directions for both.

 

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// ========== begin Ultimate SEO URLs ==========
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
// ========== end Ultimate SEO URLs ==========

 if (tep_not_null($action)) {
// ========== begin cDynamic Meta Tags ==========
# cDynamic Meta Tags 
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');
// ========== end cDynamic Meta Tags ==========
   switch ($action) {
     case 'setflag':

 

Since they seem to be both doing the same thing, I thought they might need to both be together, as in the following example:

 

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// ========== begin Ultimate SEO URLs ==========
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
// ========== end Ultimate SEO URLs ==========
// ========== begin cDynamic Meta Tags ==========
# cDynamic Meta Tags 
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');
// ========== end cDynamic Meta Tags ==========

 if (tep_not_null($action)) {
   switch ($action) {
     case 'setflag':

 

Should they both be separate as in the first example or together as in the second example? Or maybe together with the Ultimate SEO code with the Meta Tags below the "if (tep_not_null($action)) {"?

 

Thanks for any insights into this.

 

Peace,

Jeff

Link to comment
Share on other sites

Greetings,

 

I just installed Ultimate SEO before installing this contribution and I have a question.  Both contributions modify the admin/categories.php file.  Each modification looks like it is doing something very similar.  The following code is how it should be installed following the install directions for both.

 

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// ========== begin Ultimate SEO URLs ==========
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
// ========== end Ultimate SEO URLs ==========

 if (tep_not_null($action)) {
// ========== begin cDynamic Meta Tags ==========
# cDynamic Meta Tags 
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');
// ========== end cDynamic Meta Tags ==========
   switch ($action) {
     case 'setflag':

 

Since they seem to be both doing the same thing, I thought they might need to both be together, as in the following example:

 

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

// ========== begin Ultimate SEO URLs ==========
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
// ========== end Ultimate SEO URLs ==========
// ========== begin cDynamic Meta Tags ==========
# cDynamic Meta Tags 
// If the action will affect the cache entries
   if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');
// ========== end cDynamic Meta Tags ==========

 if (tep_not_null($action)) {
   switch ($action) {
     case 'setflag':

 

Should they both be separate as in the first example or together as in the second example?  Or maybe together with the Ultimate SEO code with the Meta Tags below the "if (tep_not_null($action)) {"?

 

Thanks for any insights into this.

 

Peace,

Jeff

 

Jeff....

 

They both do not do the same but the do do it at the same time...

 

so yes you could combine like:

 

 if (tep_not_null($action)) {
   // ========== begin Ultimate SEO URLs ==========
// Ultimate SEO URLs v2.1
// If the action will affect the cache entries
  if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');
// ========== end Ultimate SEO URLs ==========
// ========== begin cDynamic Meta Tags ==========
# cDynamic Meta Tags
// If the action will affect the cache entries
  if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_meta_cache.php');
// ========== end cDynamic Meta Tags ==========
  switch ($action) {
    case 'setflag':

 

or like this:

 

if (tep_not_null($action)) {
   // ========== begin Ultimate SEO URLs & cDynamic Meta Tags==========
// Ultimate SEO URLs v2.1 / cDynamic Meta Tags
// If the action will affect the cache entries
  if (eregi("(insert|update|setflag)", $action)) {
  include_once('includes/reset_seo_cache.php');
  include_once('includes/reset_meta_cache.php');
  }
// ========== end of mod ==========

  switch ($action) {
    case 'setflag':

 

 

Chris

Edited by clarocque

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

Thanks, Chris! :)

 

I wasn't sure if they both should go before or after the

 

if (tep_not_null($action)) {

 

I'll put them both after it now. Thanks again for the quick response.

 

Peace,

Jeff

Link to comment
Share on other sites

Thanks, Chris!  :)

 

I wasn't sure if they both should go before or after the

 

if (tep_not_null($action)) {

 

I'll put them both after it now.  Thanks again for the quick response.

 

Peace,

Jeff

 

 

Really wont matter but after is good...

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

First of all. Thank you for this contribution

 

I need to adapt the /includes/functions/meta.php because I need german words to exclude.

 

For unknown reason the exclude does not work. What is the difference between the words in 'singe quote' and "double Quotes". In my shop it is still showing the word 'aus' in the meta tags

 

starting line 85

function meta_create_meta_keywords($str, $length = 200) {
$str=xstripper($str);
$exclude = array('save','month','year','hundreds','euro','per','aus',"ii","about","above","according",...)

 

here is the corresponding article with the short word inside.

 

<title>Sonnenreiter new Mexiko - Sch?ner Reiten</title>
<meta name="description" content="Modische Jodhpurreithose in topaktueller Streifenoptik aus bielastischer Baumwolle, mit Bes?tzen aus Lederimitat. Zwei...">
<meta name="keywords" content="sch?ner, reiten, modische, jodhpurreithose, topaktueller, streifenoptik, aus, bielastischer, baumwolle, mit, bes?tzen, lederimitat, zwei, rei?verschlu?taschen, und, dekorativen, g?rtelschlaufen">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="http://schoener-reiten.de/">

 

Any suggestion?

 

Thank you

 

Hello,

 

some more information (hopefully someone can answer me).

 

1 I only use German language in my shop

2 yes it is working and putting each and any word from the description into the meta tag

3. it does not exclude the german words for "and, for, the ..." despite I placed them into the functions/meta.php file.

 

any hint is welcome.

 

Thanks Kai

Link to comment
Share on other sites

How can I remove the item title from the description tag. The description tag shows the items title then product code then the items description from the page.

I would like to remove the items title from the description tag only but whatever I have tried changing in meta_tags.php seems to remove the titel from the title tag also.

Link to comment
Share on other sites

I would like to thank the person whom recommended this contribution over the "other" header tag contribution I was fighting with..... LOL This was so much easier and deffinietly works alot better... the install time was amazingly fast...

 

much kudos on this contribution....

 

just one quick question.... is there anything that can be added that would allow me to set title information on an individual basis??? The products work fine... but on other pages i would like the title to be a bit more customizable....

 

anyway of acheiving this? if not its cool I love the contrib anyways...

 

 

oh and i gotta say one thing.... ITS FAST!!!!!!!!!!

 

 

 

thanks alot

 

indi

Link to comment
Share on other sites

How can I remove the item title from the description tag. The description tag shows the items title then product code then the items description from the page.

I would like to remove the items title from the description tag only but whatever I have tried changing in meta_tags.php seems to remove the titel from the title tag also.

 

 

Look around line 87 for $desc.=$product_meta_info['products_name'];

 

and comment it out.

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

I would like to thank the person whom recommended this contribution over the "other" header tag contribution I was fighting with..... LOL This was so much easier and deffinietly works alot better... the install time was amazingly fast...

 

much kudos on this contribution....

 

just one quick question.... is there anything that can be added that would allow me to set title information on an individual basis??? The products work fine... but on other pages i would like the title to be a bit more customizable....

 

anyway of acheiving this? if not its cool I love the contrib anyways...

oh and i gotta say one thing.... ITS FAST!!!!!!!!!!

thanks alot

 

indi

 

Yes, you can simply add code for any page... but will take a little PHP knowledge...

 

The correct way would be to set up the page like existing pages are (ie specials or product_info)

 

If you want to do pages that fall under other and looking for quick hack you could do something like:

 

Around line 346 look for $metatitle=meta_create_title($metatitle);

 

under it add something like:

 

if (eregi($_SERVER['PHP_SELF'], 'page_you_want_to_set.php') )
$metatitle='What you want for title';

if (eregi($_SERVER['PHP_SELF'], 'page_you_want_to_set2.php') )
$metatitle='What you want for title2';

 

Hope it helps a little

 

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

  • 4 weeks later...

Installed contribution and all seems fine with Title and Description but the keyword meta tag shows as

<META NAME="Keywords" Content="array">

for every product. The title and description tags show correct for all products but keyword tag is always as above for every item.

Any help would be appreciated.

Link to comment
Share on other sites

  • 3 weeks later...
To get STS to work with this great contribution i did this:

 

open: /catalog/includes/sts_display_output.php

 

find    echo "<title>" . TITLE . "</title>"; 

** should be around line 159 or so.

 

replace it with this:

require(DIR_WS_INCLUDES . 'meta_tags.php');

Then on your index.php and product_info.php pages just complete remove your standard osc <title><?php echo TITLE; ?></title>  or the one that was added in this contribution.  What you are doing is removing all instances of <title> and </title> from index.php and product_info.php

The only issue i have is that my product_info.php page is showing a - -  at the end of the title.

 

My other pages like the contact page ect are just displaying the normal site title.

 

Eric

 

I having problems with title full stop right now!

 

www.whitelilies.co.uk/catalog

 

showing no titles whatsoever for any standard page, just showing url?

 

The source code for products and index page show the title tags anothing else..

Link to comment
Share on other sites

I having problems with title full stop right now!

 

www.whitelilies.co.uk/catalog

 

showing no titles whatsoever for any standard page, just showing url?

 

The source code for products and index page show the title tags anothing else..

 

 

Ah it seems this is a generic problemnot related to contrib. For some reason Im not getting this even without contrib, anyone give me advice as to what is wrong??

 

Using STS, I get the admin Titles but not on catalog..

Link to comment
Share on other sites

Ah it seems this is a generic problemnot related to contrib. For some reason Im not getting this even without contrib, anyone give me advice as to what is wrong??

 

Using STS, I get the admin Titles but not on catalog..

 

 

Sorted using sts seems i forgot to put <--$headcontent--> back in my file.

Link to comment
Share on other sites

  • 3 weeks later...

Hi, I noticed this in the install instruction which you might want to update if it needs it

 

STEP 1 - Upload the included files

 

    The files should be located in the upload directory of this contribution.

 

* admin/includes/reset_meta_cache.php should be uploaded to your *catalog*/admin/includes/ directory

 

* includes/meta_tags.php should be uploaded to your *catalog*/includes/ directory

 

* includes/languages/english/meta_tags.php should be uploaded to your *catalog*/includes/languages/english/ directory

 

* includes/functions/meta_tags.php should be uploaded to your *catalog*/includes/ directory

 

* cache/ should be uploaded to your *catalog*/ directory

 

 

but shouldn't the last line look more like

* includes/functions/meta_tags.php should be uploaded to your *catalog*/includes/functions/ directory

 

That's what I've done anyway, because otherwise I get errors

 

Greeat contrib BTW ! :thumbsup:

Link to comment
Share on other sites

Hi,

 

I have installed cDynamic_Meta_Tags v1.4.

 

When testing it I get the title back but no keywoards are generated.

 

How do I include keywords?

 

And, do I have to modify the default;

 

#---------------------------------------------------------------------------#

# Define specific meta tags by entering the value between the '':

 

# For all pages using meta_tags:

define('HEAD_TITLE_TAG_ALL',''); # Title

define('HEAD_DESC_TAG_ALL',''); # Description

define('HEAD_KEY_TAG_ALL',''); # Keywords

 

# For default index page (no products or categories)

define('HEAD_TITLE_TAG_INDEX',''); # Title

define('HEAD_DESC_TAG_INDEX',''); # Description

define('HEAD_KEY_TAG_INDEX',''); # Keywords

 

Regards Peter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...