Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cDynamic Meta Tags


clarocque

Recommended Posts

  • 2 weeks later...
  • Replies 384
  • Created
  • Last Reply

Top Posters In This Topic

I have a very strange one here.

 

When I go to some of the products I get "STORE_DESCRIPT" in the top blue bar of IE (Dont know the technical name of that) while other pages are OK

 

Also I am unable to view the source of any of the pages apart from the homepage.

 

Any ideas?

 

If you need the URL of my site then let me know and I will PM it to you.

 

 

I used the version 1.5 with database additions.

 

 

 

Is it worth going back to my old files and trying to install version 1.3a instead?

 

 

Cheers

Link to comment
Share on other sites

  • 4 weeks later...
hi,

 

now both contribs together running.

 

STS v4.1

+

cDynamic Meta Tags v1.4

-------------------------------------------------------------------------------------

 

1. remove <title> tags from all pages in the catalog directory,

in index.php, product_info.php

delete

<?php

# cDynamic Meta Tags

/*<title><?php echo TITLE; ?>*/

require(DIR_WS_INCLUDES . 'meta_tags.php');

#

?>

 

2. copy your meta_tags.php into catalog/includes/modules/sts_inc/

rename it to "headertags.php"

 

3.

- Go to your admin panel, modules, STS.

- For each module installed, add 'headertags.php' to the list of files to include. Example:

for the default module, you have a parameter named 'Files for normal template'. By default it contains only

'sts_user_code.php'.

If you modify this parameter to 'sts_user_code.php;headertags.php' you will have Header Tags

Controller working for all pages

using the default template (which name is defined in this same module).

For the index module, the parameter is called 'Files for index.php template'.

For product_info module, there are 2 parameters: 'Files for normal template' and 'Files for content template'.

- That's it. Now STS will automatically add meta tags to the pages header, no need to modify your templates.

 

-------------------------------------------------------------------------------------

only the allprods.php

shows no title, keywords and descryption

 

anyone use this contrib

http://www.oscommerce.com/community/contri...search,allprods

 

and how to fix this.

thanks in advance

Michael

 

Hello,

Thank you for the trick. It is working like a charm, but I have a small problem.

When I visit my page in IE and check the source, I see all the tags BEFORE the beginning <HTML> tag.

 

My pages tags look like this:

<title>Accessories - Bargain Collection</title>
<META NAME="Description" Content="- Home - Accessories from Bargain Collection">
<META NAME="Keywords" Content="accessories, mini ducky telephone, jvc sirius satellite radio portable boombox, 2,4ghz wireless headphone, luscious lips telephone, all weather sport am/fm digital radio with arm band, minicassette">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Bargain Collection - Wholesale price on all merchandise for all customers.</title>
<base href="http://bargaincollection.com/shop/">

 

Also, if you notice there is another title tag in the head section that comes from the STS.

I wonder how can I fix this problems.

Any help is much appreciated.

 

Regards,

Regards,

Link to comment
Share on other sites

In regards to changing the output of the title tag for the product page on the meta_tags.php; How can I make the manufacturer name to appear first, like this:

 

<title>[manufacturer] - [product name] - [model number]</title>

 

I have played around with this and cant quite figure it out.

 

I would also like the same format on the "All Products" page.

 

Can you assist?

I would appreciate it much.

 

 

Best Regards, :-"

JonCloud

Edited by JonCloud
Link to comment
Share on other sites

Hi all,

 

Before i installed STS 4.2 cDynamic Meta tags 1.5a worked like a charm.

After installing STS cDynamic Meta Tags doesn't work anymore...

 

Is the clue of Omid 100% working okay?

Really want to get cDynamic getting to work with STS!

 

Thanks,

Eric

Link to comment
Share on other sites

Hi all,

 

Before i installed STS 4.2 cDynamic Meta tags 1.5a worked like a charm.

After installing STS cDynamic Meta Tags doesn't work anymore...

 

Is the clue of Omid 100% working okay?

Really want to get cDynamic getting to work with STS!

 

Thanks,

Eric

 

 

I've got the same problem. It should be a simple thing to make it work with STS 4.2. I have read threw all posts in this thread and there is one suggestion (http://www.oscommerce.com/forums/index.php?act=ST&f=7&t=134546&hl=&view=findpost&p=925675) on how to get it to work but it doesn't get the job done. You end up with a header that lookes like this:

 

<title>My title</title>
 <META NAME="Description" Content="my description.">
 <META NAME="Keywords" Content="my, keywords">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="sv">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="http://www.mystore.int/">

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

 

The title and metadata gets outputed before the !doc and <html><head> tags. I have tried to fiddle with the this file: includes\modules\sts_inc\general.php

 

The following line controlls the title-tag:

 

//$sts->template['headertags']= "<title>" . TITLE ."</title>";

 

And I have tried to change it to this:

$sts->template['headertags'] = require(DIR_WS_INCLUDES . 'meta_tags.php');

 

But I end upp with the same result (<title> before <html>) so my conclusion is that the problem lies in the meta_tags.php file. And there I?m lost. I can't figure out what makes the title-tag come before the html-tag.

Link to comment
Share on other sites

Wohooo!

 

I found a solution to the STS 4.x problem.

 

Here it is....

 

1. Install the contributions like it says in the redme files.

 

2. copy meta_tags.php to the following path:

includes/modules/sts_inc

 

3. Rename it to header_tags.php

 

4. edit this file acording to this:

 

I. find:

if ($meta_cache_code){ echo $meta_cache_code;
}else if ($cache_type == 2 && file_exists($meta_cache_file_full)) {
echo base64_decode(gzinflate(file_get_contents($meta_cache_file_full)));
}else{
ob_start();

 

and replace it with:

if ($meta_cache_code){ 
$sts_template['headertags'] = $meta_cache_code;
}
else if ($cache_type == 2 && file_exists($meta_cache_file_full)) {
$sts_template['headertags'] =  base64_decode(gzinflate(file_get_contents($meta_cache_file_full)));
}
else{
//ob_start(); you dont need to cache output here

 

II find this:

#####################################   OUTPUT THE DATA	########################################## 
echo '  <title>'.$metatitle.'</title>' . "\n";
echo '  <META NAME="Description" Content="' .$metadescription. '">' . "\n";
echo '  <META NAME="Keywords" Content="' . $metakeywords . '">' . "\n";
################################################################################
#####################

###################################   BELOW IS CACHE INFO   #########################################
$meta_cache_output = ob_get_contents();
ob_end_flush();

 

and replace it with

#####################################   OUTPUT THE DATA	########################################## 
//echo '  <title>'.$metatitle.'</title>' . "\n";
//echo '  <META NAME="Description" Content="' .$metadescription. '">' . "\n";
//echo '  <META NAME="Keywords" Content="' . $metakeywords . '">' . "\n";

$sts->template['headertags'] = '<title>'.$metatitle.'</title>' . "\n";
$sts->template['headertags'] .= '<META NAME="Description" Content="' .$metadescription. '">' . "\n";
$sts->template['headertags'] .= '<META NAME="Keywords" Content="' . $metakeywords . '">' . "\n";
################################################################################
#####################

###################################   BELOW IS CACHE INFO   #########################################
//$meta_cache_output = ob_get_contents();
$meta_cache_output = $sts_template['headertags'];
//ob_end_flush(); //you dont need this anymore

 

 

5. don't forget to upload the modified file to:

includes/modules/sts_inc

again!

 

6. Go to your admin panel -> modules -> STS.

For each module installed, add 'headertags.php' to the list of files to include. Example:

for the default module, you have a parameter named 'Files for normal template'. By default it contains only

'sts_user_code.php'. Put ';header_tags.php' after it and do so in all STS modules.

 

 

This makes use of the STS headertags feature and puts the title and metadata AFTER the <!DOC>, <HTML><HEAD> tags.Hopes this help you guys that want to run this great contribution with STS 4.x

 

/Fredrik

Edited by fredriksk
Link to comment
Share on other sites

It's working great now! Thanks!!!

Named the file just headertags.php.

 

Cheers,

Eric

 

 

Hi Fredrik,

 

Many thanks for your help! ;-) I am going to test this out this evening!

One question though: should the file be renamed to headertags.php or header_tags.php?

 

Cheers,

Eric

Link to comment
Share on other sites

How do I make a longer title with cDynamic Meta Tags?

 

My title input is "Online shopping for video games, electronics, computers, modchips, memory cards, cell phones, books, magazines, music, DVDs, videos, software, apparel & accessories, shoes, jewelry, tools & hardware, & just about anything else."

 

The title shows up in my index page is only "<title>Sky2k - Online shopping for video games, electronics, computers,</title>"

 

How do I make every/more words show up in my page title? My store is located here.

Link to comment
Share on other sites

  • 5 weeks later...
Ok I got rid of the "array" thing by changing the code in the meta.php file to:

 

foreach ($splitstr as $key => $spstr)

 

instead of:

 

foreach ($splitstr as $spstr)

 

looks like possibly a bug in php 4.4.2 ?

 

Also I changed this:

 

function meta_create_title($metatitle, $length = 70)

 

to this:

 

function meta_create_title($metatitle, $length = 150)

 

To get the page titles to show up correctly in length in the page code. I set it at 150, but it could be set at what ever you want. Does any one know if there is any SEO problem caused by increasing the length? Or why it was set at 70? Thx!

 

All I have left now is the same duplicating text thing as the guy above where everything shows up twice in the meta tags. =)

 

I cant get that work ,once I changed the $length = 70,my site show up

"Parse error: syntax error, unexpected ';', expecting ')' in includes/functions/meta.php on line"

 

Even I change back,the error message still show up.

pretty weird!!!!

Help please!

Edited by wyuguy
Link to comment
Share on other sites

  • 1 month later...

I know it's been posted before but I didn't find a clear answer.

 

On my index.php I am getting my meta description showing twice like:

 

computers, parts, hardware, software computers, parts, hardware, software

 

I have installed v1.5a

 

Please help.

Link to comment
Share on other sites

I feel terrible.

We had an issue which caused us to restore our database, when i did so the cdynamic metas fields disappeared from my admin panel.

I ran the meta tag SQL again and it was not accepted. Now my front page has SITE_DESC or whatever.

 

Please help!

Edited by cprntr
Link to comment
Share on other sites

I feel terrible.

We had an issue which caused us to restore our database, when i did so the cdynamic metas fields disappeared from my admin panel.

I ran the meta tag SQL again and it was not accepted. Now my front page has SITE_DESC or whatever.

 

Please help!

 

Did you run the revised sql?

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Link to comment
Share on other sites

I am getting this errror when i try to access the admin panel on a new cdynamic meta install;

 

 

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Fatal error: main() [function.require]: Failed opening required 'includes/meta_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shlomon/public_html/admin/index.php on line 76

 

does anyone know whats up?

Link to comment
Share on other sites

silly me....

 

i changed the title tag on the admin by accident

:-"

 

 

I am getting this errror when i try to access the admin panel on a new cdynamic meta install;

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Warning: main(includes/meta_tags.php) [function.main]: failed to open stream: No such file or directory in /home/shlomon/public_html/admin/index.php on line 76

 

Fatal error: main() [function.require]: Failed opening required 'includes/meta_tags.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shlomon/public_html/admin/index.php on line 76

 

does anyone know whats up?

Link to comment
Share on other sites

I want to use this contrib, but there is a change I have done to my store that may be in conflict with this contrib or not allow me to use the full features of this contrib.

 

I have changed the language name of 'manufacturer' to 'topics'. My recollection is that I have only changed the language file so that manufacturer is replaced with topics. I know I have not changed the database table names or the name of the manufacturer.php file.

 

So, with the above info, will this contrib still pull info from manufacturer (topics)?

If not, what file(s) would I need to edit in this contrib?

Link to comment
Share on other sites

I want to use this contrib, but there is a change I have done to my store that may be in conflict with this contrib or not allow me to use the full features of this contrib.

 

I have changed the language name of 'manufacturer' to 'topics'. My recollection is that I have only changed the language file so that manufacturer is replaced with topics. I know I have not changed the database table names or the name of the manufacturer.php file.

 

So, with the above info, will this contrib still pull info from manufacturer (topics)?

If not, what file(s) would I need to edit in this contrib?

 

If you have only changed the languages file, then it should work fine without any problems.

 

Cheers,

Chris

Link to comment
Share on other sites

Thanks for this great mod!

 

Maybe i've missed it but in the browser and in when showing the source of product_inf it say's: Crystal by: Australian Gold.

As I'm having a shop in The Netherlands I would like to change the word: by, into: van (thats Dutch ;) ) I've looked everywhere but could not find the place where it pickes up this word.

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Link to comment
Share on other sites

Has anyone used this contrib with the latest version of Ultimate SEO URLs conrib?

 

If so any problems?

 

Im using both cDynamic Meta Tags and Ultimate SEO URL's 2.1d without any problem. Im not using the 2.1d with the option for your own product names though.

 

Regards,

Chris

Link to comment
Share on other sites

There is something weird going on with the meta tags contrib.

It is inserting text in serveral places. For example:

bytmc

 

<title>The Molding of a Champion by: Children-Youth - A Place of Hope Store -</title>

 

<META NAME="Description" Content="The Molding of a Champion (bytmc) by Children-Youth - The Molding of a Champion Helping Your Child Shape a Winning Destiny Winning Strategies for nurturing future life champions Practical parenting advice from a leading...">

 

<META NAME="Keywords" Content="the molding of a champion, bytmc books, children-youth, books, videos, dvd, supplements for eating disorders, depression, abuse, store">

 

I also find the term in a few places on the page:

 

href="http://www.aplaceofhopestore.com/molding-champion-p-69.html" class="headerNavigation">bytmc</a></td>

<td class="pageHeading" valign="top">The Molding of a Champion<br><span class="smallText">[bytmc]</span></td>

 

This is happening to every product page, but with different phrases. Anotehr page is doing the same thing with the phrase bahsea.

 

Where in the world are these terms coming from? They are not in my original product pages.

 

Is this something from the SEO contrib?

Link to comment
Share on other sites

  • 1 month later...

i added a new version and hope people give feedback and correct if needed any errors,

 

- Moved some configuration for language files to admin in a new dynamic meta tag group

-moved store general meta previsously in admin define to langages files

- changed $meta_cache_files_path = DIR_FS_CATALOG.'cache/' to $meta_cache_files_path = DIR_FS_CATALOG . DIR_FS_CACHE as it is set in admin

 

for upgrading compare the language files and also , should remove the

STORE_DESCRIPT

STORE_METDEX

STORE_KEYWORD

 

from the database

 

any one having mysql knoledge to do an upgrade .sql is welcome

MS2

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