Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 2 votes

cDynamic Meta Tags


384 replies to this topic

#201 Fullasoul

  • Community Member
  • 33 posts
  • Real Name:Dave

Posted 19 December 2005, 05:55

View Postclarocque, on Dec 16 2005, 05:50 PM, said:

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

#202 clarocque

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

Posted 20 December 2005, 05:42

View PostFullasoul, on Dec 19 2005, 12:55 AM, said:

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


Quote

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, 20 December 2005, 05:44.

osC Contributions I have published.

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

#203 haru

  • Community Member
  • 110 posts
  • Real Name:harumi

Posted 27 December 2005, 06:37

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

#204 Fullasoul

  • Community Member
  • 33 posts
  • Real Name:Dave

Posted 17 January 2006, 14:34

View Postclarocque, on Dec 20 2005, 12:42 AM, said:

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

#205 clarocque

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

Posted 18 January 2006, 09:50

View PostFullasoul, on Jan 17 2006, 09:34 AM, said:

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!

#206 Glcustoms

  • Community Member
  • 437 posts
  • Real Name:G.L.
  • Gender:Male
  • Location:Texas

Posted 22 January 2006, 15:17

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.

#207 fatmcgav

  • Community Member
  • 173 posts
  • Real Name:G Williams

Posted 23 January 2006, 11:19

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:

Quote

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

#208 Kelvin1964

  • Community Member
  • 15 posts
  • Real Name:Kevin M. Smith

Posted 01 February 2006, 02:19

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

#209 clarocque

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

Posted 01 February 2006, 04:49

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, 01 February 2006, 04:52.

osC Contributions I have published.

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

#210 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 06 February 2006, 22:40

View PostGlcustoms, on Jan 22 2006, 09:17 AM, said:

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

#211 Glcustoms

  • Community Member
  • 437 posts
  • Real Name:G.L.
  • Gender:Male
  • Location:Texas

Posted 07 February 2006, 05:23

View PostRoaddoctor, on Feb 6 2006, 04:40 PM, said:

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.

#212 mrgtec

  • Community Member
  • 183 posts
  • Real Name:Michael R. G.
  • Gender:Male
  • Location:Port St. Lucie, FL.

Posted 07 February 2006, 05:39

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, 07 February 2006, 05:40.

Michael

#213 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 07 February 2006, 06:27

View PostGlcustoms, on Feb 6 2006, 11:23 PM, said:

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

#214 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 07 February 2006, 14:52

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?

****

Quote

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

#215 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 08 February 2006, 05:42

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

#216 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 08 February 2006, 08:41

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

#217 clarocque

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

Posted 08 February 2006, 10:35

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, 08 February 2006, 10:36.

osC Contributions I have published.

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

#218 Roaddoctor

  • Community Member
  • 595 posts
  • Real Name:David Jennings

Posted 08 February 2006, 15:47

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

#219 Glcustoms

  • Community Member
  • 437 posts
  • Real Name:G.L.
  • Gender:Male
  • Location:Texas

Posted 09 February 2006, 00:48

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

#220 clarocque

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

Posted 10 February 2006, 00:21

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!