Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cDynamic Meta Tags


clarocque

Recommended Posts

SAorry I cant off you to much help via forum as I dont use STS in fact I avoid it for different reasons. A quick fix would be to rename one of the functionss if they are not the same.

 

I'm not sure I understand what you mean....what "functions" would I rename? The error message (if believed) would indicate that the same functions in meta.php are being called more times than they're meant to, as the crashing point and the point that is considered the source of the problem are one and the same...in fact I gotta say, I'm no php expert by a long shot, but that's one funky error message...

 

 

Fullasoul

Link to comment
Share on other sites

  • Replies 384
  • Created
  • Last Reply

Top Posters In This Topic

I'm not sure I understand what you mean....what "functions" would I rename? The error message (if believed) would indicate that the same functions in meta.php are being called more times than they're meant to, as the crashing point and the point that is considered the source of the problem are one and the same...in fact I gotta say, I'm no php expert by a long shot, but that's one funky error message...

Fullasoul

 

 

Fatal error: Cannot redeclare meta_create_title() (previously declared in /home/xxxx/public_html/includes/functions/meta.php:30) in /home/xxxx/public_html/includes/functions/meta.php on line 30

 

It is not a funky message it is telling you the issue. The function is declared multiple times. If they are not the same function then you can rename one like

 

meta_create_title2()

 

and you will have to change it where ever it was called as well.

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

Hello,

 

I have installed cDynamic Meta Tags v1.4; It seems to work fine. Thank you for the contrib!

 

But I have a problem: The meta name list does not show properly. I have about 20 words showing, no more. I have entered twice that, at least in the meta_tags.php file.

 

Is there a limit on the mata nane keyword list?

 

Thanx.

Haru

Link to comment
Share on other sites

  • 3 weeks later...
It is not a funky message it is telling you the issue. The function is declared multiple times. If they are not the same function then you can rename one like

 

meta_create_title2()

 

and you will have to change it where ever it was called as well.

 

yes...but how would I go about renaming something to prevent it from conflicting with...ITSELF?

 

The error happens at the same spot as the error message points to as being the culprit.....see what I'm saying?

 

:(

 

 

Fullasoul

Link to comment
Share on other sites

yes...but how would I go about renaming something to prevent it from conflicting with...ITSELF?

 

The error happens at the same spot as the error message points to as being the culprit.....see what I'm saying?

 

:(

Fullasoul

 

 

It is not coflicting with itself....

osC Contributions I have published.

 

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

Link to comment
Share on other sites

New version uploaded.

Changed includes/meta_tags.php to read from database instead of the language file. Took out Definitions in the languages/meta_tags.php and placed them in the database. Removed the second instance of keywords, as it seems to generate more than enough keywords already.

I have checked the source code on many pages after installing the changes, and it looks like it is working.

Nothing major, just makes it easier and a bit more integrated.

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

hi there,

 

I've just uploded v1.5 of cDynamic Meta-tags and installed v1.1 of osC Advanced Cache Class by Chemo, hoping to use it to cache the meta-tag results in the db.

 

However, when i set $cache_type = 1, the site gives me teh following error:

Fatal error: Call to a member function on a non-object in /home/fatmcgav/public_html/imperialdomination-co-uk/includes/meta_tags.php on line 57

 

The area around line 57 is:

# Create paths and cache names
$meta_cache_file=$meta_cache_filename.'_'.$meta_cache_param.$cache_language.$cache_currency.".meta-cache";
$meta_cache_file_full = $meta_cache_files_path.$meta_cache_file;

################################################################################
#############
# Check to see what type of cache if any and run with it...
$cache_type == 1
  ? $meta_cache_code = $cache->get_cache($meta_cache_file)
  : NULL;

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();

# Page Parameters

 

I've double checked, uninstalled and reinstalled the db, and re-uploaded the neccessary files twice, and i still cant get it to work.

 

Any ideas on wat might be causing the problem?

 

Cheers

Fatmcgav

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

First let me say great job! I installed version 1.5, very simple install.

 

I have encountered only one issue. In the Admin when I go to categories/Products and click to disable or enable (red light/green light) a product it works fine on the first product. On any additional products that I click to disable or enable I get the following warning.

Warning: Invalid argument supplied for foreach() in /u/m/mydomain/www.mydomain.com/store/admin/includes/reset_meta_cache.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /u/m/mydomain/www.mydomain.com/store/admin/includes/reset_meta_cache.php:36) in /u/m/mydomain/www.mydomain.com/store/admin/includes/functions/general.php on line 18

If I go to another section and then return the change have actually been made, so it is actually working.

 

I went into my php.ini file and turned

display_errors = Off

this makes it so that the warning is not displayed. This is good for now but I would like to get the issue resolved.

 

Any advice or ideas will be greatly appreciated.

 

Kevin

Link to comment
Share on other sites

What version of PHP are you running?

 

If you have an old php versino < 4.3 I dont believe you can use glob.

 

But I am not sure what was changed for the latest version either...

 

 

Where are you storing your cache files?

 

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

New version uploaded.

Changed includes/meta_tags.php to read from database instead of the language file. Took out Definitions in the languages/meta_tags.php and placed them in the database. Removed the second instance of keywords, as it seems to generate more than enough keywords already.

I have checked the source code on many pages after installing the changes, and it looks like it is working.

Nothing major, just makes it easier and a bit more integrated.

 

Thank you! How about an updated instructions to go along with your 1.5 contribution. I only ask because I am having a helluva time getting this to work properly. The 1.4 instructions have errors and typos which can make it difficult to install. Your 1.5 version is different and I am thinking that I am just missing something by following the 1.4 instructions.. Is there supposed to be a controls section in the admin now? I cant see it. I have the contr. installed with the <titile>code only in the product_info.php file. click on tools/an item/ to see some goofy title...

If I put the code into index.php I am seeing broken titles. my site

 

thanks in advance

-Dave

Link to comment
Share on other sites

Thank you! How about an updated instructions to go along with your 1.5 contribution. I only ask because I am having a helluva time getting this to work properly. The 1.4 instructions have errors and typos which can make it difficult to install. Your 1.5 version is different and I am thinking that I am just missing something by following the 1.4 instructions.. Is there supposed to be a controls section in the admin now? I cant see it. I have the contr. installed with the <titile>code only in the product_info.php file. click on tools/an item/ to see some goofy title...

If I put the code into index.php I am seeing broken titles. my site

 

thanks in advance

The instuctions from 1.4 worked well for me on my initial install. The only thing you do different with 1.5 is run the datafiles into your SQL server, then you should see a section in admin/configure near the bottem of the page that controles your descriptions and keywords.

 

I will look back through the instructions and see if there maybe something I had to change along the way, but right off the top of my head I cant think of anything.

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

Hi,

 

Put it in catalog/includes/header.php, thats where mine is. It should work there.

 

I have had that prob. with this script.

 

 

Thank you,

Michael

Edited by mrgtec

Michael

Link to comment
Share on other sites

The instuctions from 1.4 worked well for me on my initial install. The only thing you do different with 1.5 is run the datafiles into your SQL server, then you should see a section in admin/configure near the bottem of the page that controles your descriptions and keywords.

 

I will look back through the instructions and see if there maybe something I had to change along the way, but right off the top of my head I cant think of anything.

 

I seem to have it working with product_info.php now. Had to make this fix to /admin/categories.php to work with Ultimate SEO: (contrary to earlier post)

 

  $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)) {

// BOF 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');
// EOF cDynaic Meta Tags

switch ($action) {
  case 'setflag':

 

I still do not see any control in admin/configuration, or anywhere in admin for that matter. :(

 

I am going to try adding the title code to other files, but would like to resolve the lack of admin interface first if possible. I am on icq if you wish.

 

Please confirm for me that all is well with the product_info pages :) site thanks!

 

 

server is Linux 2.4.21-37.EL

MySQL 3.23.58

HTTP Server: Apache/2.0.46 (Red Hat)

PHP Version: 4.3.2 (Zend: 1.3.0)

 

Fedexdirect shipping module w/saturday

Fedex lables 1.09

Google XML sitemap 1.3

Paypall-WPP 011

Quantity price break per product 1.2

Request for freight quote 1.2

SEO Assistant 1.3.3

Seperate price per customer 1.02

User Tracking with Admin 1.4.2

zz FAQ 1.0.2

Ultimate SEO 2.2.1.d

cDynamic Meta Tags 1.5

-Dave

Link to comment
Share on other sites

Take a look at the title in these two links... Can you tell what is wrong from the output?

 

http://www.pavepatch.com/products_new.php

<title>New Products - PTI Pavement Repair Products - STORE_DESCRIPT</title>

<META NAME="Description" Content="PTI Pavement Repair Products - New Products - STORE_METDEX">

 

http://www.pavepatch.com/specials.php

<META NAME="Description" Content="PTI Pavement Repair Products - STORE_METDEX">

 

 

****

product_info.php seems to be working correctly

http://www.pavepatch.com/flomix-pourable-a...-5gal-p-28.html

****

I am positive I ran the .sql file, but I still do not see admin controls. <-- Did I miss a something?

 

****

 

Put it in catalog/includes/header.php, thats where mine is. It should work there.

 

I have had that prob. with this script.

 

Please specify what you are referrring to... put what where? :D

-Dave

Link to comment
Share on other sites

Ok I have things smoothed out somewhat... and I know where my issue is now

 

The dynamic_tags.sql just won't stick....

 

This is the error I am getting: ERROR 1062 at line 5: Duplicate entry '190' for key 1

 

executing from webmin

 

The sql is as in the package:

 

INSERT INTO `configuration` VALUES (190, 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (191, 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (192, 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

 

 

can someone help me resolve this. I am very unfamiliar with database stuff. Thanks!!

-Dave

Link to comment
Share on other sites

I am reaching here and guessing mostly

 

If their are lines 190 191 192 already in the database (fedex things), and the highest configuration entry i see is 255

 

do I modify the sql file like this and then run ?

 

INSERT INTO `configuration` VALUES (256, 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (257, 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (258, 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

 

anybody?

-Dave

Link to comment
Share on other sites

You are correct...

 

I am not sure who updated 1.5 (I have not looked yet) but any time a contribution has set ID numbers like that there will be problems.

 

Those should be set dynaimcly so they avoid issues like this...

 

you can either mod the script to get the last and set them or change them to this:

 

INSERT INTO `configuration` VALUES ('',

 

If there is a group you will have to get that number and change them in the SQL

 

Maybe whoever changed this to use the database can fix his/her contributino so the sql will run dynamicly and that will set the id's and configuration group id based on each stores current settings.

 

Good luck

 

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

Re: groups.... like this?

 

INSERT INTO `configuration` VALUES (", 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (", 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (", 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

 

or this?

 

INSERT INTO `configuration` VALUES (", 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, ", NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (", 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, ", [/b][/b]NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');
INSERT INTO `configuration` VALUES (", 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, ", NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

 

or??

-Dave

Link to comment
Share on other sites

Sorry everyone,

I should have made the code dynamic before I released it. This code should work if the current code does not.

Open your Mysql manager and insert the following:

 

 

 

 

INSERT INTO `configuration` VALUES ('', 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

INSERT INTO `configuration` VALUES ('', 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

INSERT INTO `configuration` VALUES ('', 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

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

Gary,

 

That should work... in fact if I get the time (ha right - but hoping) or someone else gets the time...

 

The thing to do would be to take the entire language file and move it in to the databse (if that is how people want it).

 

The rest of the data is configuration which should really be in it's own group in the back end. But I am not sure what else has changed since the original versions.

 

Chris

osC Contributions I have published.

 

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

Link to comment
Share on other sites

  • 2 weeks later...

Theres actually another way Ive thought of to do this. Instead of editing the main dynamic.php file, I should just add the database names to the language file. Then it would not involve any editing to the dynamic.php file. But I wonder if it would be quicker if the language file was totally eleminated? It would not make much difference, maybe shave a millisecond of the load time.

I decided to add this to the database in the first place becuase Ive been working on some site for people that like to be able to control such things, but would have problems editing the launguage.php file.

And this is just a really nice contribution compared to the header tags controller, IMO, Ive used them both and this one is simple to install, not to bulky, and I think its faster.

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

Sorry everyone,

I should have made the code dynamic before I released it. This code should work if the current code does not.

Open your Mysql manager and insert the following:

INSERT INTO `configuration` VALUES ('', 'Store Description', 'STORE_DESCRIPT', 'The Next Level Of osCommerce', 'Place your sites meta description here, for use with dynamic meta-tags<br>', 1, 40, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

INSERT INTO `configuration` VALUES ('', 'Store Index Description', 'STORE_METDEX', 'Productivity Sold Here', 'Place a seperate \r\nindex page meta description here, for use with dynamic meta-tags<br>', 1, 41, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

INSERT INTO `configuration` VALUES ('', 'Store Key Words', 'STORE_KEYWORD', 'ecommerce, oscommerce, shopping cart', 'Place your sites meta key words here, for use with dynamic meta-tags<br>', 1, 42, NULL, '2003-12-05 05:01:41', NULL,'tep_cfg_textarea(');

 

May be no real issue but one question about the instructions.

Step 1 says to upload: -> includes/functions/meta_tags.php should be uploaded to your *catalog*/includes/ directory

In the included files there is only a: includes/functions/meta.php file. Will this cause any problems?

Link to comment
Share on other sites

May be no real issue but one question about the instructions.

Step 1 says to upload: -> includes/functions/meta_tags.php should be uploaded to your *catalog*/includes/ directory

In the included files there is only a: includes/functions/meta.php file. Will this cause any problems?

 

 

The directory structure is correct. It should be meta.php

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

  • 2 weeks later...

I installed this contribution and for some pages I am getting, "store_metdex - store_descript" or just "store_descript" on the title. Is that normal? How do I fix this issue? I installed cDynamic Meta v1.5 using the CRE install instructions. Thanks.

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