Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 2 votes

cDynamic Meta Tags


384 replies to this topic

#161 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 02 July 2005, 20:25

hubcat, on Jul 2 2005, 03:56 PM, said:

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

<{POST_SNAPBACK}>


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, 02 July 2005, 20:27.

osC Contributions I have published.

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

#162 hubcat

  • Community Member
  • 382 posts
  • Real Name:Adrienne Catone
  • Gender:Female
  • Location:Los Angeles, California

Posted 02 July 2005, 21:19

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

#163 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 02 July 2005, 22:19

hubcat, on Jul 2 2005, 05:19 PM, said:

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

<{POST_SNAPBACK}>



Really wont matter but after is good...
osC Contributions I have published.

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

#164 falcon

  • Community Member
  • 11 posts
  • Real Name:Falcon

Posted 03 July 2005, 10:15

falcon, on Jun 9 2005, 10:07 PM, said:

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

<{POST_SNAPBACK}>


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

#165 dprophit

  • Community Member
  • 40 posts
  • Real Name:Denver Prophit Jr.
  • Location:Destin, FL

Posted 04 July 2005, 23:58

Rewrite option. I get file not found when it goes to an html file. Where should I start looking for errors?
--- Denver Prophit Jr.

#166 GoldSale

  • Community Member
  • 4 posts
  • Real Name:guy

Posted 06 July 2005, 12:32

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.

#167 indicaz

  • Community Member
  • 80 posts
  • Real Name:erick
  • Location:New York

Posted 06 July 2005, 16:28

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

#168 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 06 July 2005, 22:29

GoldSale, on Jul 6 2005, 08:32 AM, said:

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.

<{POST_SNAPBACK}>



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!

#169 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 06 July 2005, 22:36

indicaz, on Jul 6 2005, 12:28 PM, said:

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

<{POST_SNAPBACK}>


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!

#170 GoldSale

  • Community Member
  • 4 posts
  • Real Name:guy

Posted 03 August 2005, 14:52

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.

#171 cymonguk

  • Community Member
  • 549 posts
  • Real Name:Simon

Posted 24 August 2005, 15:30

underzen, on May 10 2005, 04:04 AM, said:

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

<{POST_SNAPBACK}>


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..
Hey its free!

#172 cymonguk

  • Community Member
  • 549 posts
  • Real Name:Simon

Posted 24 August 2005, 23:06

cymonguk, on Aug 24 2005, 04:30 PM, said:

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..

<{POST_SNAPBACK}>



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..
Hey its free!

#173 cymonguk

  • Community Member
  • 549 posts
  • Real Name:Simon

Posted 25 August 2005, 06:59

cymonguk, on Aug 25 2005, 12:06 AM, said:

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..

<{POST_SNAPBACK}>



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

#174 Cowzor

  • Community Member
  • 79 posts
  • Real Name:Mr Karl

Posted 10 September 2005, 01:44

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

Quote

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

Quote

* 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:

#175 palno1

  • Community Member
  • 18 posts
  • Real Name:Peter

Posted 13 September 2005, 04:52

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

#176 cymonguk

  • Community Member
  • 549 posts
  • Real Name:Simon

Posted 13 September 2005, 07:17

are you using sts? what other contribs are installed?
Hey its free!

#177 palno1

  • Community Member
  • 18 posts
  • Real Name:Peter

Posted 13 September 2005, 08:15

I have

Easy Populate
country-state-selector
FroogleDataFeeder

Thats it.

#178 jasper98

  • Community Member
  • 139 posts
  • Real Name:Steve

Posted 22 September 2005, 15:41

I've got the cDynamic Meta Tags working on the pages included in includes/meta_tags.php. (such as specials.php, products_new.php, product_info.php, etc.)

However, I've added a couple other pages to my site that I'd like cDynamic to work with such as all_products.php (which lists categories/product titles). How do I go about getting it to work with these new pages. Do I need to add it somehow to includes/meta_tags.php? I'm just not sure how to go about doing this. Thanks for any help.

p.s. I'm using STS.

#179 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 22 September 2005, 17:05

jasper98, on Sep 22 2005, 11:41 AM, said:

I've got the cDynamic Meta Tags working on the pages included in includes/meta_tags.php. (such as specials.php, products_new.php, product_info.php, etc.)

However, I've added a couple other pages to my site that I'd like cDynamic to work with such as all_products.php (which lists categories/product titles).  How do I go about getting it to work with these new pages.  Do I need to add it somehow to includes/meta_tags.php?  I'm just not sure how to go about doing this.  Thanks for any help.

p.s. I'm using STS.

<{POST_SNAPBACK}>



To add additional pages add them to this line :

$heading_pages = array('contact_us.php', 'product_reviews.php');

around line 60 in includes/;anguages/english.php
osC Contributions I have published.

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

#180 clarocque

  • Community Member
  • 559 posts
  • Real Name:Chris
  • Location:VT/USA

Posted 22 September 2005, 17:07

palno1, on Sep 13 2005, 12:52 AM, said:

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

<{POST_SNAPBACK}>


If you ar not seeing keywords or description on products and/pr actegories something is wrong...


If you are talking about say the index.php page (home page) you will have to set the defaults in the fields you listed above....
osC Contributions I have published.

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