Zen Cart Logo
Forums / All Other Contributions/Addons / Testimonial Manager Support Thread

Testimonial Manager Support Thread

Views: 277,975

Results 1,341 to 1,360 of 1,502
15 Mar 2012, 7:18 PM
#1341
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Testimonial Manager Support Thread

OK, I finally got it sorted out. I've attached my updated version (that worked for me on MySQL 5.5.16):

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_TESTIMONIAL_STATUS';

INSERT INTO configuration_group VALUES (NULL, 'Testimonials Manager', 'Testimonials Manager Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display in Testimonials Sidebox', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES', '5', 'Set the number of testimonials to display in the Latest Testimonials box.', @t4, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Title Minimum Length', 'ENTRY_TESTIMONIALS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', @t4, 2, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Minimum Length', 'ENTRY_TESTIMONIALS_TEXT_MIN_LENGTH', '10', 'Minimum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Maximum Length', 'ENTRY_TESTIMONIALS_TEXT_MAX_LENGTH', '1000', 'Maximum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Contact Name Minimum Length', 'ENTRY_TESTIMONIALS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', @t4, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Truncated Testimonials in Sidebox', 'DISPLAY_TESTIMONIALS_MANAGER_TRUNCATED_TEXT', 'true', 'Display truncated text in sidebox', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Length of truncated testimonials to display', 'TESTIMONIALS_MANAGER_DESCRIPTION_LENGTH', '150', 'If Display Truncated Testimonials in Sidebox is true - set the amount of characters to display from the Testimonials in the Testimonials Manager sidebox.', @t4, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display on all testimonials page', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS', '5', 'Set the number of testimonials to display on the all testimonials page.', @t4, 7, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Date Published on Testimonials page', 'DISPLAY_TESTIMONIALS_DATE_PUBLISHED', 'true', 'Display date published on testimonials page', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display View All Testimonials Link In Sidebox', 'DISPLAY_ALL_TESTIMONIALS_TESTIMONIALS_MANAGER_LINK', 'true', 'Display View All Testimonials Link In Sidebox', @t4, 9, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Add New Testimonial Link In Sidebox', 'DISPLAY_ADD_TESTIMONIAL_LINK', 'true', 'Display Add New Testimonial Link In Sidebox', @t4, 10, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Width', 'TESTIMONIAL_IMAGE_WIDTH', '80', 'Set the Width of the Testimonial Image', @t4, 11, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Height', 'TESTIMONIAL_IMAGE_HEIGHT', '80', 'Set the Height of the Testimonial Image', @t4, 12, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Directory', 'TESTIMONIAL_IMAGE_DIRECTORY', 'testimonials/', 'Set the Directory for the Testimonial Image', @t4, 13, NULL, '2007-08-21 12:04:10', NULL, NULL);
 INSERT INTO configuration VALUES (NULL, 'Display Company Name field', 'TESTIMONIALS_COMPANY', 'true', 'Display Company Name field', @t4, 14, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display City field', 'TESTIMONIALS_CITY', 'true', 'Display City field', @t4, 15, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Country field', 'TESTIMONIALS_COUNTRY', 'true', 'Display Country field', @t4, 16, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Only registered customers may submit a testimonial', 'REGISTERED_TESTIMONIAL', 'true', 'Only registered customers may submit a testimonial', @t4, 17, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display All Languages', 'TESTIMONIALS_DISPLAY_ALL_LANGUAGES', 'true', 'Display All Languages', @t4, 18, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial - Show Store Name and Address', 'TESTIMONIAL_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 19, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Define Testimonial Status', 'DEFINE_TESTIMONIAL_STATUS', '1', 'Enable the Defined Testimonial Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 20, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Manager Version', 'TM_VERSION', '1.5.2', 'Testimonial Manager version', @t4, 21, NULL, now(), NULL, NULL);

DROP TABLE IF EXISTS testimonials_manager;
CREATE TABLE testimonials_manager (
  testimonials_id int(11) NOT NULL auto_increment,
  language_id int(11) NOT NULL default '1',
  testimonials_title varchar(64) NOT NULL default '',
  testimonials_url  VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_name text NOT NULL,
  testimonials_image varchar(254) NOT NULL default '',
  testimonials_html_text text,
  testimonials_mail text NOT NULL,
  testimonials_company VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_city VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_country VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_show_email char(1) default '0',
  status int(1) NOT NULL default '0',
  date_added datetime NOT NULL default '0000-00-00 00:00:00',
  last_update datetime NULL default NULL,
  PRIMARY KEY  (testimonials_id)
) ENGINE=MyISAM ;

INSERT INTO testimonials_manager VALUES (1, 1, 'Great', '', 'Clyde Designs', '', 'This is just a test submission to show you how it looks, great, eh?', '[email protected]', NULL, NULL, NULL, '0', 1, now(), NULL);

/*
zencart 1.5 mods
*/
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('TestimonialsManager', 'BOX_TOOLS_TESTIMONIALS_MANAGER', 'FILENAME_TESTIMONIALS_MANAGER', '', 'tools', 'Y', 35); 

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configTestimonialsManager','BOX_CONFIGURATION_TESTIMONIALS_MANAGER','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4); 

Essentially, it was (1) removing the quotes around the column names and (2) changing the TYPE= to ENGINE= on the table creation statement (TYPE= is deprecated).

15 Mar 2012, 8:45 PM
#1342
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

lat9:

OK, I finally got it sorted out. I've attached my updated version (that worked for me on MySQL 5.5.16):

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_TESTIMONIAL_STATUS';

INSERT INTO configuration_group VALUES (NULL, 'Testimonials Manager', 'Testimonials Manager Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display in Testimonials Sidebox', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES', '5', 'Set the number of testimonials to display in the Latest Testimonials box.', @t4, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Title Minimum Length', 'ENTRY_TESTIMONIALS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', @t4, 2, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Minimum Length', 'ENTRY_TESTIMONIALS_TEXT_MIN_LENGTH', '10', 'Minimum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Maximum Length', 'ENTRY_TESTIMONIALS_TEXT_MAX_LENGTH', '1000', 'Maximum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Contact Name Minimum Length', 'ENTRY_TESTIMONIALS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', @t4, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Truncated Testimonials in Sidebox', 'DISPLAY_TESTIMONIALS_MANAGER_TRUNCATED_TEXT', 'true', 'Display truncated text in sidebox', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Length of truncated testimonials to display', 'TESTIMONIALS_MANAGER_DESCRIPTION_LENGTH', '150', 'If Display Truncated Testimonials in Sidebox is true - set the amount of characters to display from the Testimonials in the Testimonials Manager sidebox.', @t4, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display on all testimonials page', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS', '5', 'Set the number of testimonials to display on the all testimonials page.', @t4, 7, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Date Published on Testimonials page', 'DISPLAY_TESTIMONIALS_DATE_PUBLISHED', 'true', 'Display date published on testimonials page', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display View All Testimonials Link In Sidebox', 'DISPLAY_ALL_TESTIMONIALS_TESTIMONIALS_MANAGER_LINK', 'true', 'Display View All Testimonials Link In Sidebox', @t4, 9, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Add New Testimonial Link In Sidebox', 'DISPLAY_ADD_TESTIMONIAL_LINK', 'true', 'Display Add New Testimonial Link In Sidebox', @t4, 10, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Width', 'TESTIMONIAL_IMAGE_WIDTH', '80', 'Set the Width of the Testimonial Image', @t4, 11, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Height', 'TESTIMONIAL_IMAGE_HEIGHT', '80', 'Set the Height of the Testimonial Image', @t4, 12, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Directory', 'TESTIMONIAL_IMAGE_DIRECTORY', 'testimonials/', 'Set the Directory for the Testimonial Image', @t4, 13, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Company Name field', 'TESTIMONIALS_COMPANY', 'true', 'Display Company Name field', @t4, 14, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display City field', 'TESTIMONIALS_CITY', 'true', 'Display City field', @t4, 15, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Country field', 'TESTIMONIALS_COUNTRY', 'true', 'Display Country field', @t4, 16, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Only registered customers may submit a testimonial', 'REGISTERED_TESTIMONIAL', 'true', 'Only registered customers may submit a testimonial', @t4, 17, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display All Languages', 'TESTIMONIALS_DISPLAY_ALL_LANGUAGES', 'true', 'Display All Languages', @t4, 18, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial - Show Store Name and Address', 'TESTIMONIAL_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 19, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Define Testimonial Status', 'DEFINE_TESTIMONIAL_STATUS', '1', 'Enable the Defined Testimonial Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 20, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Manager Version', 'TM_VERSION', '1.5.2', 'Testimonial Manager version', @t4, 21, NULL, now(), NULL, NULL);

DROP TABLE IF EXISTS testimonials_manager;
CREATE TABLE testimonials_manager (
testimonials_id int(11) NOT NULL auto_increment,
language_id int(11) NOT NULL default '1',
testimonials_title varchar(64) NOT NULL default '',
testimonials_url VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_name text NOT NULL,
testimonials_image varchar(254) NOT NULL default '',
testimonials_html_text text,
testimonials_mail text NOT NULL,
testimonials_company VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_city VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_country VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_show_email char(1) default '0',
status int(1) NOT NULL default '0',
date_added datetime NOT NULL default '0000-00-00 00:00:00',
last_update datetime NULL default NULL,
PRIMARY KEY (testimonials_id)
) ENGINE=MyISAM ;

INSERT INTO testimonials_manager VALUES (1, 1, 'Great', '', 'Clyde Designs', '', 'This is just a test submission to show you how it looks, great, eh?', '[email protected]', NULL, NULL, NULL, '0', 1, now(), NULL);

/*
zencart 1.5 mods
*/
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('TestimonialsManager', 'BOX_TOOLS_TESTIMONIALS_MANAGER', 'FILENAME_TESTIMONIALS_MANAGER', '', 'tools', 'Y', 35);

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configTestimonialsManager','BOX_CONFIGURATION_TESTIMONIALS_MANAGER','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);


When I updated Clydes Testimonials Manager to run on zen cart version 1.5.0 I didn't change anything with the install.sql statement. I added a couple lines to run on v.1.5.0. I don't have any problem with the sql statement. This is why I think it has something to do with running on a PHP 5.3. I may be wrong but no one else is having this except you and  LadyArlette. I'm going to to test this out tonight on php 5.3 and see whats going on. Thank you for your version of the sql statement that worked for you.
15 Mar 2012, 10:43 PM
#1343
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

countrycharm:

When I updated Clydes Testimonials Manager to run on zen cart version 1.5.0 I didn't change anything with the install.sql statement. I added a couple lines to run on v.1.5.0. I don't have any problem with the sql statement.But the SQL statement does have some issues that could cause issues with newer versions of mySQL (as lat9 pointed out TYPE= is indeed deprecated) and the SQL script also contains code that could inadvertently delete items from the configuration table.

More importantly here is the reason why when lat9 removed the back quotes (not to be confused with single quotes) around the column names in the create table section of the script the problem was resolved. The syntax issue is the back quotes:

The error 1064 occurs due to Mysql version mismatch,because differnt versions have differnt
reserved words,which if used by a previous version causes the error to occur.Removing the back quotes solves the issue.

countrycharm:

This is why I think it has something to do with running on a PHP 5.3. I may be wrong but no one else is having this except you and LadyArlette. I'm going to to test this out tonight on php 5.3 and see whats going on. Thank you for your version of the sql statement that worked for you.Not a PHP compatibility issue or you would have seen an error relating to that instead of a SQL error which is indicative of invalid syntax being used in the SQL script.. Besides that Clyde himself certified that this add-on was PHP v5.3 ready with his last release of Testimonials Manager..

The fact that you are not having an issue when you run the same script would only seem to indicate that your server is running an older version of mySQL which still supports some of this old (and now invalid) syntax..

15 Mar 2012, 10:50 PM
#1344
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

and here is the full corrected script...

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_TESTIMONIAL_STATUS';

INSERT INTO configuration_group VALUES (NULL, 'Testimonials Manager', 'Testimonials Manager Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display in Testimonials Sidebox', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES', '5', 'Set the number of testimonials to display in the Latest Testimonials box.', @t4, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Title Minimum Length', 'ENTRY_TESTIMONIALS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', @t4, 2, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Minimum Length', 'ENTRY_TESTIMONIALS_TEXT_MIN_LENGTH', '10', 'Minimum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Maximum Length', 'ENTRY_TESTIMONIALS_TEXT_MAX_LENGTH', '1000', 'Maximum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Contact Name Minimum Length', 'ENTRY_TESTIMONIALS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', @t4, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Truncated Testimonials in Sidebox', 'DISPLAY_TESTIMONIALS_MANAGER_TRUNCATED_TEXT', 'true', 'Display truncated text in sidebox', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Length of truncated testimonials to display', 'TESTIMONIALS_MANAGER_DESCRIPTION_LENGTH', '150', 'If Display Truncated Testimonials in Sidebox is true - set the amount of characters to display from the Testimonials in the Testimonials Manager sidebox.', @t4, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display on all testimonials page', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS', '5', 'Set the number of testimonials to display on the all testimonials page.', @t4, 7, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Date Published on Testimonials page', 'DISPLAY_TESTIMONIALS_DATE_PUBLISHED', 'true', 'Display date published on testimonials page', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display View All Testimonials Link In Sidebox', 'DISPLAY_ALL_TESTIMONIALS_TESTIMONIALS_MANAGER_LINK', 'true', 'Display View All Testimonials Link In Sidebox', @t4, 9, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Add New Testimonial Link In Sidebox', 'DISPLAY_ADD_TESTIMONIAL_LINK', 'true', 'Display Add New Testimonial Link In Sidebox', @t4, 10, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Width', 'TESTIMONIAL_IMAGE_WIDTH', '80', 'Set the Width of the Testimonial Image', @t4, 11, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Height', 'TESTIMONIAL_IMAGE_HEIGHT', '80', 'Set the Height of the Testimonial Image', @t4, 12, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Directory', 'TESTIMONIAL_IMAGE_DIRECTORY', 'testimonials/', 'Set the Directory for the Testimonial Image', @t4, 13, NULL, '2007-08-21 12:04:10', NULL, NULL);
 INSERT INTO configuration VALUES (NULL, 'Display Company Name field', 'TESTIMONIALS_COMPANY', 'true', 'Display Company Name field', @t4, 14, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display City field', 'TESTIMONIALS_CITY', 'true', 'Display City field', @t4, 15, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Country field', 'TESTIMONIALS_COUNTRY', 'true', 'Display Country field', @t4, 16, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Only registered customers may submit a testimonial', 'REGISTERED_TESTIMONIAL', 'true', 'Only registered customers may submit a testimonial', @t4, 17, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display All Languages', 'TESTIMONIALS_DISPLAY_ALL_LANGUAGES', 'true', 'Display All Languages', @t4, 18, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial - Show Store Name and Address', 'TESTIMONIAL_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 19, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Define Testimonial Status', 'DEFINE_TESTIMONIAL_STATUS', '1', 'Enable the Defined Testimonial Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 20, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Manager Version', 'TM_VERSION', '1.5.2', 'Testimonial Manager version', @t4, 21, NULL, now(), NULL, NULL);

DROP TABLE IF EXISTS testimonials_manager;
CREATE TABLE testimonials_manager (
  testimonials_id int(11) NOT NULL auto_increment,
  language_id int(11) NOT NULL default '1',
  testimonials_title varchar(64) NOT NULL default '',
  testimonials_url  VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_name text NOT NULL,
  testimonials_image varchar(254) NOT NULL default '',
  testimonials_html_text text,
  testimonials_mail text NOT NULL,
  testimonials_company VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_city VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_country VARCHAR( 255 ) NULL DEFAULT NULL,
  testimonials_show_email char(1) default '0',
  status int(1) NOT NULL default '0',
  date_added datetime NOT NULL default '0000-00-00 00:00:00',
  last_update datetime NULL default NULL,
  PRIMARY KEY  (testimonials_id)
);

INSERT INTO testimonials_manager VALUES (1, 1, 'Great', '', 'Clyde Designs', '', 'This is just a test submission to show you how it looks, great, eh?', '[email protected]', NULL, NULL, NULL, 0, 1, now(), NULL);

/*
zencart 1.5 mods
*/
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('TestimonialsManager', 'BOX_TOOLS_TESTIMONIALS_MANAGER', 'FILENAME_TESTIMONIALS_MANAGER', '', 'tools', 'Y', 35); 

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configTestimonialsManager','BOX_CONFIGURATION_TESTIMONIALS_MANAGER','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);  

Oh and if anything I've posted is wrong, I am happy to have someone MUCH wiser than I correct me.. :laugh:

DivaVocals:

But the SQL statement does have some issues that could cause issues with newer versions of mySQL (as lat9 pointed out TYPE= is indeed deprecated) and the SQL script also contains code that could inadvertently delete items from the configuration table.

More importantly here is the reason why when lat9 removed the back quotes (not to be confused with single quotes) around the column names in the create table section of the script the problem was resolved. The syntax issue is the back quotes:
Removing the back quotes solves the issue.

Not a PHP compatibility issue or you would have seen an error relating to that instead of a SQL error which is indicative of invalid syntax being used in the SQL script.. Besides that Clyde himself certified that this add-on was PHP v5.3 ready with his last release of Testimonials Manager..

The fact that you are not having an issue when you run the same script would only seem to indicate that your server is running an older version of mySQL which still supports some of this old (and now invalid) syntax..

15 Mar 2012, 10:53 PM
#1345
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

** deleted **

15 Mar 2012, 11:11 PM
#1346
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

DivaVocals:

and here is the full corrected script...

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_TESTIMONIAL_STATUS';

INSERT INTO configuration_group VALUES (NULL, 'Testimonials Manager', 'Testimonials Manager Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

SELECT @t4:=configuration_group_id
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display in Testimonials Sidebox', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES', '5', 'Set the number of testimonials to display in the Latest Testimonials box.', @t4, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Title Minimum Length', 'ENTRY_TESTIMONIALS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', @t4, 2, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Minimum Length', 'ENTRY_TESTIMONIALS_TEXT_MIN_LENGTH', '10', 'Minimum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Maximum Length', 'ENTRY_TESTIMONIALS_TEXT_MAX_LENGTH', '1000', 'Maximum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Contact Name Minimum Length', 'ENTRY_TESTIMONIALS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', @t4, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Truncated Testimonials in Sidebox', 'DISPLAY_TESTIMONIALS_MANAGER_TRUNCATED_TEXT', 'true', 'Display truncated text in sidebox', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Length of truncated testimonials to display', 'TESTIMONIALS_MANAGER_DESCRIPTION_LENGTH', '150', 'If Display Truncated Testimonials in Sidebox is true - set the amount of characters to display from the Testimonials in the Testimonials Manager sidebox.', @t4, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display on all testimonials page', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS', '5', 'Set the number of testimonials to display on the all testimonials page.', @t4, 7, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Date Published on Testimonials page', 'DISPLAY_TESTIMONIALS_DATE_PUBLISHED', 'true', 'Display date published on testimonials page', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display View All Testimonials Link In Sidebox', 'DISPLAY_ALL_TESTIMONIALS_TESTIMONIALS_MANAGER_LINK', 'true', 'Display View All Testimonials Link In Sidebox', @t4, 9, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Add New Testimonial Link In Sidebox', 'DISPLAY_ADD_TESTIMONIAL_LINK', 'true', 'Display Add New Testimonial Link In Sidebox', @t4, 10, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Width', 'TESTIMONIAL_IMAGE_WIDTH', '80', 'Set the Width of the Testimonial Image', @t4, 11, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Height', 'TESTIMONIAL_IMAGE_HEIGHT', '80', 'Set the Height of the Testimonial Image', @t4, 12, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Directory', 'TESTIMONIAL_IMAGE_DIRECTORY', 'testimonials/', 'Set the Directory for the Testimonial Image', @t4, 13, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Company Name field', 'TESTIMONIALS_COMPANY', 'true', 'Display Company Name field', @t4, 14, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display City field', 'TESTIMONIALS_CITY', 'true', 'Display City field', @t4, 15, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Country field', 'TESTIMONIALS_COUNTRY', 'true', 'Display Country field', @t4, 16, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Only registered customers may submit a testimonial', 'REGISTERED_TESTIMONIAL', 'true', 'Only registered customers may submit a testimonial', @t4, 17, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display All Languages', 'TESTIMONIALS_DISPLAY_ALL_LANGUAGES', 'true', 'Display All Languages', @t4, 18, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial - Show Store Name and Address', 'TESTIMONIAL_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 19, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Define Testimonial Status', 'DEFINE_TESTIMONIAL_STATUS', '1', 'Enable the Defined Testimonial Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 20, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Manager Version', 'TM_VERSION', '1.5.2', 'Testimonial Manager version', @t4, 21, NULL, now(), NULL, NULL);

DROP TABLE IF EXISTS testimonials_manager;
CREATE TABLE testimonials_manager (
testimonials_id int(11) NOT NULL auto_increment,
language_id int(11) NOT NULL default '1',
testimonials_title varchar(64) NOT NULL default '',
testimonials_url VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_name text NOT NULL,
testimonials_image varchar(254) NOT NULL default '',
testimonials_html_text text,
testimonials_mail text NOT NULL,
testimonials_company VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_city VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_country VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_show_email char(1) default '0',
status int(1) NOT NULL default '0',
date_added datetime NOT NULL default '0000-00-00 00:00:00',
last_update datetime NULL default NULL,
PRIMARY KEY (testimonials_id)
);

INSERT INTO testimonials_manager VALUES (1, 1, 'Great', '', 'Clyde Designs', '', 'This is just a test submission to show you how it looks, great, eh?', '[email protected]', NULL, NULL, NULL, 0, 1, now(), NULL);

/*
zencart 1.5 mods
*/
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('TestimonialsManager', 'BOX_TOOLS_TESTIMONIALS_MANAGER', 'FILENAME_TESTIMONIALS_MANAGER', '', 'tools', 'Y', 35);

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configTestimonialsManager','BOX_CONFIGURATION_TESTIMONIALS_MANAGER','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);


> **DivaVocals:**
>
> But the SQL statement does have some issues that could cause issues with newer versions of mySQL  (as lat9 pointed out **TYPE=** is indeed deprecated)      and the SQL script also contains code that could inadvertently delete items from the configuration table. 
> 
> More importantly here is the reason why when lat9 removed the back quotes (not to be confused with single quotes) around the column names in the create table section of the script the problem was resolved. The syntax issue is the back quotes:
> Removing the back quotes solves the issue.
> 
> 
> Not a PHP compatibility issue or you would have seen an error relating to that instead of a SQL error which is indicative of invalid syntax being used in the SQL script.. Besides that Clyde himself certified that this add-on was PHP v5.3 ready with his last release of Testimonials Manager..
> 
> The fact that you are not having an issue when you run the same script would only seem to indicate that your server is running an older version of mySQL which still supports some of this old (and now invalid) syntax..

I understood what he was saying. I was going to see and checkout for myself. And yes I was planing on updating the sql statement.. Just give me a little time Diva "please":D
16 Mar 2012, 12:43 AM
#1347
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

lat9:

OK, I finally got it sorted out. I've attached my updated version (that worked for me on MySQL 5.5.16):

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_TESTIMONIAL_STATUS';

INSERT INTO configuration_group VALUES (NULL, 'Testimonials Manager', 'Testimonials Manager Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';

INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display in Testimonials Sidebox', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES', '5', 'Set the number of testimonials to display in the Latest Testimonials box.', @t4, 1, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Title Minimum Length', 'ENTRY_TESTIMONIALS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', @t4, 2, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Minimum Length', 'ENTRY_TESTIMONIALS_TEXT_MIN_LENGTH', '10', 'Minimum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Text Maximum Length', 'ENTRY_TESTIMONIALS_TEXT_MAX_LENGTH', '1000', 'Maximum length of Testimonial description.', @t4, 3, NULL, now(), NULL, NULL), (NULL, 'Testimonial Contact Name Minimum Length', 'ENTRY_TESTIMONIALS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', @t4, 4, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Truncated Testimonials in Sidebox', 'DISPLAY_TESTIMONIALS_MANAGER_TRUNCATED_TEXT', 'true', 'Display truncated text in sidebox', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Length of truncated testimonials to display', 'TESTIMONIALS_MANAGER_DESCRIPTION_LENGTH', '150', 'If Display Truncated Testimonials in Sidebox is true - set the amount of characters to display from the Testimonials in the Testimonials Manager sidebox.', @t4, 6, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Number Of Testimonials to display on all testimonials page', 'MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS', '5', 'Set the number of testimonials to display on the all testimonials page.', @t4, 7, NULL, now(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Date Published on Testimonials page', 'DISPLAY_TESTIMONIALS_DATE_PUBLISHED', 'true', 'Display date published on testimonials page', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display View All Testimonials Link In Sidebox', 'DISPLAY_ALL_TESTIMONIALS_TESTIMONIALS_MANAGER_LINK', 'true', 'Display View All Testimonials Link In Sidebox', @t4, 9, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Add New Testimonial Link In Sidebox', 'DISPLAY_ADD_TESTIMONIAL_LINK', 'true', 'Display Add New Testimonial Link In Sidebox', @t4, 10, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Width', 'TESTIMONIAL_IMAGE_WIDTH', '80', 'Set the Width of the Testimonial Image', @t4, 11, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Height', 'TESTIMONIAL_IMAGE_HEIGHT', '80', 'Set the Height of the Testimonial Image', @t4, 12, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Testimonial Image Directory', 'TESTIMONIAL_IMAGE_DIRECTORY', 'testimonials/', 'Set the Directory for the Testimonial Image', @t4, 13, NULL, '2007-08-21 12:04:10', NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Display Company Name field', 'TESTIMONIALS_COMPANY', 'true', 'Display Company Name field', @t4, 14, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display City field', 'TESTIMONIALS_CITY', 'true', 'Display City field', @t4, 15, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display Country field', 'TESTIMONIALS_COUNTRY', 'true', 'Display Country field', @t4, 16, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Only registered customers may submit a testimonial', 'REGISTERED_TESTIMONIAL', 'true', 'Only registered customers may submit a testimonial', @t4, 17, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Display All Languages', 'TESTIMONIALS_DISPLAY_ALL_LANGUAGES', 'true', 'Display All Languages', @t4, 18, NULL, NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial - Show Store Name and Address', 'TESTIMONIAL_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 19, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO configuration VALUES (NULL, 'Define Testimonial Status', 'DEFINE_TESTIMONIAL_STATUS', '1', 'Enable the Defined Testimonial Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 20, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO configuration VALUES (NULL, 'Testimonial Manager Version', 'TM_VERSION', '1.5.2', 'Testimonial Manager version', @t4, 21, NULL, now(), NULL, NULL);

DROP TABLE IF EXISTS testimonials_manager;
CREATE TABLE testimonials_manager (
testimonials_id int(11) NOT NULL auto_increment,
language_id int(11) NOT NULL default '1',
testimonials_title varchar(64) NOT NULL default '',
testimonials_url VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_name text NOT NULL,
testimonials_image varchar(254) NOT NULL default '',
testimonials_html_text text,
testimonials_mail text NOT NULL,
testimonials_company VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_city VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_country VARCHAR( 255 ) NULL DEFAULT NULL,
testimonials_show_email char(1) default '0',
status int(1) NOT NULL default '0',
date_added datetime NOT NULL default '0000-00-00 00:00:00',
last_update datetime NULL default NULL,
PRIMARY KEY (testimonials_id)
) ENGINE=MyISAM ;

INSERT INTO testimonials_manager VALUES (1, 1, 'Great', '', 'Clyde Designs', '', 'This is just a test submission to show you how it looks, great, eh?', '[email protected]', NULL, NULL, NULL, '0', 1, now(), NULL);

/*
zencart 1.5 mods
*/
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('TestimonialsManager', 'BOX_TOOLS_TESTIMONIALS_MANAGER', 'FILENAME_TESTIMONIALS_MANAGER', '', 'tools', 'Y', 35);

INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configTestimonialsManager','BOX_CONFIGURATION_TESTIMONIALS_MANAGER','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);

I installed the PHP 5.3.8, mySQL 5.5.16 version of xampps. Yes this mySQL 5.5.16 version does has issues with the install.sql statement for Testimonials Manager. Thanks again lat9 for your updated version of the new_install.sql  statement. I have updated Testimonials Managers sql.statement. It has been uploaded waiting for approval from the zen team.

Thanks Diva for waiting on me.......:clap:
16 Mar 2012, 12:57 AM
#1348
ladyarlette avatar

ladyarlette

New Zenner

Join Date:
May 2009
Location:
South-west Ohio
Posts:
9
Plugin Contributions:
0

Re: Testimonial Manager Support Thread

Sorry for the delay - work keeps getting in the way of progress. :blink:

I may have tried to install the patch for testimonial manager 1.5 initially, but I uninstalled completely more than once in trying to make it work. I had no problems with the uninstall sql, and did a Windows explorer "search and destroy" for any files containing the word "testimonial" too.

When I was uninstalling I did look at the tables to see if there were any testimonial tables, and I did not see any.

I am using:
Apache/2.2.21 (Win32)
PHP/5.3.8
MySQL/5.5.16
PHPmyAdmin/3.4.5

I entered the new updated sql patch into the SQL Query Executor on my computer and ran it, and received the following error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 7
in:
[CREATE TABLE PVPVupgrade_exceptions ( upgrade_exception_id smallint(5) NOT NULL auto_increment, sql_file varchar(50) default NULL, reason varchar(200) default NULL, errordate datetime default '0001-01-01 00:00:00', sqlstatement text, PRIMARY KEY (upgrade_exception_id) ) TYPE=MyISAM ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

(incidentally, PV is the table prefix for my database tables)

I brought up my website on my computer, and the testimonial manager appears to be working now! Yippee! :clap:

Since testimonial manager appears to be working, I am going to go forward now, and assume this error message is not something about which to be concerned.

Thank you very much for your help and the updated sql patch!

Wendy

16 Mar 2012, 2:47 AM
#1349
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

countrycharm:

I installed the PHP 5.3.8, mySQL 5.5.16 version of xampps. Yes this mySQL 5.5.16 version does has issues with the install.sql statement for Testimonials Manager. Thanks again lat9 for your updated version of the new_install.sql statement. I have updated Testimonials Managers sql.statement. It has been uploaded waiting for approval from the zen team.

Thanks Diva for waiting on me.......:clap:No worries..:smile:

FYI for future reference, the error message number is the hint that will tell you if it's a SQL error versus a PHP error.. 1064 is a mySQL syntax error message. And despite the long winded nature of error messages, the first part of most error messages really do tell you a good deal about an error and it's source: 1064:You have an error in your SQL syntax;

Additional reading on this (in case you're interested):smile::
https://www.google.com/search?q=mySQL+1064&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html)

In the meantime, and MOST importantly you need to use the updated SQL script I posted for your update submission.. The one lat9 posted still contains code that could inadvertently delete records from the configuration table.. You can simply resubmit it you do not have to wait for the submission you posted today to be approved. Simply reply to the e-mail you got acknowledging your submission and let the admins know you will be submitting a replacement update.. Then re-submit it with the SQL I posted..

Specifically this part is problematic:

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';
```(The Zen Cart v1.5 threads on updating mods cover this and WHY it should NOT be included in SQL scripts for add-ons. If you recall I took this same kind of code out of the SQL for the Rewards points SQL)
16 Mar 2012, 12:46 PM
#1350
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Testimonial Manager Support Thread

DivaVocals:

No worries..:smile:
...
Specifically this part is problematic:

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';


If you'll notice, I had turned the problematic SET statements into comments ... thus also removing the problem.
16 Mar 2012, 2:07 PM
#1351
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

DivaVocals:

No worries..:smile:

FYI for future reference, the error message number is the hint that will tell you if it's a SQL error versus a PHP error.. 1064 is a mySQL syntax error message. And despite the long winded nature of error messages, the first part of most error messages really do tell you a good deal about an error and it's source: 1064:You have an error in your SQL syntax;

Additional reading on this (in case you're interested):smile::
https://www.google.com/search?q=mySQL+1064&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html)

In the meantime, and MOST importantly you need to use the updated SQL script I posted for your update submission.. The one lat9 posted still contains code that could inadvertently delete records from the configuration table.. You can simply resubmit it you do not have to wait for the submission you posted today to be approved. Simply reply to the e-mail you got acknowledging your submission and let the admins know you will be submitting a replacement update.. Then re-submit it with the SQL I posted..

Specifically this part is problematic:

#SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Testimonials Manager';


Hi Diva I basically redid sql statement like you said in the first place. The only thing I didn't do was take out the engine part. Thank You for pointing that out. :bigups: I did some reserch on MyISAM vs InnoDB and found out With the release of MySQL 5.5, InnoDB has become the default storage engine so thank you again. This will maybe cause others not to have the error when installing this module.
And thanks for the other 2 links for the sql errors.

> **lat9:**
>
> If you'll notice, I had turned the problematic SET  statements into comments ... thus also removing the problem.

Yes you did, but I we decided to remove them just in case others might not have understood what that was for.
16 Mar 2012, 2:28 PM
#1352
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

countrycharm:

Hi Diva I basically redid sql statement like you said in the first place. The only thing I didn't do was take out the engine part. Thank You for pointing that out. :bigups: I did some reserch on MyISAM vs InnoDB and found out With the release of MySQL 5.5, InnoDB has become the default storage engine so thank you again. This will maybe cause others not to have the error when installing this module.
And thanks for the other 2 links for the sql errors.

Yes you did, but I we decided to remove them just in case others might not have understood what that was for.

Has been updated and submitted to the downloads. Thanks again Diva, lat9 for the help you provided.

16 Mar 2012, 3:57 PM
#1353
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

countrycharm:

I did some reserch on MyISAM vs InnoDB and found out With the release of MySQL 5.5, InnoDB has become the default storage engine so thank you again. This will maybe cause others not to have the error when installing this module.You didn't specify InnoDB in your SQL did you?? It would be better to take out the engine altogether than to include one that may not be supported by the shopowner's host.. Not including an engine won't harm anything as the default will be used. Unless there is a reason why a specific DB engine is needed, not including it in the create table statement won't affect the add-on.. (You can take a look at other add-ons and see that it's not always included in create table statements)

countrycharm:

Has been updated and submitted to the downloads. Thanks again Diva, lat9 for the help you provided.You're welcome..:smile:

16 Mar 2012, 4:57 PM
#1354
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread

DivaVocals:

You didn't specify InnoDB in your SQL did you?? It would be better to take out the engine altogether than to include one that may not be supported by the shopowner's host.. Not including an engine won't harm anything as the default will be used. Unless there is a reason why a specific DB engine is needed, not including it in the create table statement won't affect the add-on.. (You can take a look at other add-ons and see that it's not always included in create table statements)

You're welcome..:smile:
Na I didn't include and engine at all.
I was just letting you know what I read and learned.....:clap:

16 Mar 2012, 5:02 PM
#1355
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

countrycharm:

Na I didn't include and engine at all.
I was just letting you know what I read and learned.....:clap:Cool!! :smile:

17 Mar 2012, 7:26 PM
#1356
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Testimonial Manager Support Thread

I've got a multilingual site and enabled the "Display All Languages" in the Testimonial Manager admin section (TESTIMONIALS_DISPLAY_ALL_LANGUAGES is the database key). I had a couple of test testimonials in English and switched to a Spanish display ... and none were displayed. Turns out that the database key (above) isn't used at all.

Here's an updated version of /includes/modules/pages/display_all_testimonials/header_php.php that corrects the problem:

<?php
/**
 * Testimonials Manager
 *
 * @package Template System
 * @copyright 2007 Clyde Jones
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Testimonials_Manager.php v1.5.2 4-16-2010 Clyde Jones $
 */
 
  require(DIR_WS_MODULES . 'require_languages.php');
  $breadcrumb->add(NAVBAR_TITLE);
  
  $which_languages = (TESTIMONIALS_DISPLAY_ALL_LANGUAGES == 'true') ? '' : (" and language_id = '" . (int)$_SESSION['languages_id'] . "'");
  
  $testimonials_query_raw = "select * from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1" . $which_languages . " order by date_added DESC, testimonials_title";

  $testimonials_split = new splitPageResults($testimonials_query_raw, MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS);
//EOF
18 Mar 2012, 2:15 PM
#1357
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Testimonial Manager Support Thread

100asa:

testimonial don't send email to customer when them add testimonial. Why?

The reason that the customer email is not being sent is this line in /includes/languages/english/YOUR_TEMPLATE/testimonials_add.php:

define('EMAIL_SUBJECT', 'Your Testimonial Submission At ' . STORE_NAME . '.' . "\n\n");

The trailing "\n\n" causes the zen_mail function to abort the send because there are new-line characters in the email subject. Simply removing those characters as below enables the customer emails to be sent.

define('EMAIL_SUBJECT', 'Your Testimonial Submission At ' . STORE_NAME . '.');
30 Mar 2012, 12:58 PM
#1358
stoneroses6300 avatar

stoneroses6300

New Zenner

Join Date:
Nov 2010
Posts:
37
Plugin Contributions:
0

Re: Testimonial Manager Support Thread

I would like to manually put all the testimonials in myself.
I would like to get rid of the "Author's name", "Author's email", and "Testimonial's Title" requirements.

I basically want it setup where I format the whole testimonial in the Testimonial box. I would want to put the name, and company of the testimonial here without their email address.

Also, how would I get rid of "view all testimonials" and "add a testimonial"?

I'm basically looking to use this sidebox to input my own text through the testimonials manager.

Thank you!

-Brian

31 Mar 2012, 9:09 AM
#1359
billyboyle avatar

billyboyle

Zen Follower

Join Date:
Jul 2011
Location:
Glasgow, Scotland
Posts:
115
Plugin Contributions:
1

Re: Testimonial Manager Support Thread

@ Brian
you could use a blank sidebox available through the download section and set up a static page for your detailed testimonials. Putting a link in the sidebox to your page.

31 Mar 2012, 2:26 PM
#1360
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread

BillyBoyle:

@ Brian
you could use a blank sidebox available through the download section and set up a static page for your detailed testimonials. Putting a link in the sidebox to your page.The admin editable sidebox would probably be better.. BUT if we continue this line of discussion (alternatives to this add-on) we should move it off of this support thread..