-
Posts
15 -
Joined
-
Last visited
auster's Achievements
-
Great Addon, setup without any problems. Q. Is it possible to increase the number of featured items from 10 to 20 or more? Thanks Keiron
-
Hi Gergely, Cracked it! I started again with a clean 2.3.3.4 install and went through the HFC install meticulously......same result. So I 'viewed' hfc_information.php in my FTP program and it showed this error message 'Lines ending in solitary carriage returns detected. (Possibly a Macintosh text file.) Converting to UNIX format.' So I clicked OK, copied and pasted the converted contents over the installed file and the error disappeared in Admin. I was then able to install as per the instructions. I had to do the same for five of the files out of ten. Great Module; thanks very much for your help and I hope the above helps others :-) Keiron
-
<?php/* $Id$ Author: Tóth Gergely http://oscom.hu v1.0 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License*/ class hfc_information { var $code = 'hfc_information'; var $group = 'header_footer_contents'; var $title; var $description; var $sort_order; var $enabled = false; function hfc_information() { $this->title = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_TITLE; $this->description = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_DESCRIPTION; if ( defined('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS') ) { $this->sort_order = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER; $this->enabled = (MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS == 'True'); switch (MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT) { case 'Left Header' : $this->group = 'header_contents_left'; break; case 'Center Header' : $this->group = 'header_contents_center'; break; case 'Right Header' : $this->group = 'header_contents_right'; break; case 'Header Line' : $this->group = 'header_line'; break; case 'Left Footer' : $this->group = 'footer_contents_left'; break; case 'Center Footer' : $this->group = 'footer_contents_center'; break; case 'Right Footer' : $this->group = 'footer_contents_right'; break; case 'Footer Line' : $this->group = 'footer_line'; break; } } } function execute() { global $oscTemplate; $data = '<div class="clear"></div>'; $data .= '<hr />' . ' <div id="infoHeader">' . ' <a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SPECIALS . '</a> ' . ' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SHIPPING . '</a> ' . ' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_PRIVACY . '</a> ' . ' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONDITIONS . '</a> ' . ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTACT . '</a>' . '</div>' . '<hr />'; $data .= '<div class="clear"></div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Currencies Module', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT', 'Right Header', 'Should the module be loaded in the header or the footer position?', '6', '1', 'tep_cfg_select_option(array(\'Left Header\', \'Center Header\', \'Right Header\', \'Header Line\', \'Left Footer\', \'Center Footer\', \'Right Footer\', \'Footer Line\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Module Version Number', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_VERSION_NUMBER', 'v1.0', 'Version number of installed module', '6', '1', 'tep_sanitize_string(', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_VERSION_NUMBER','MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER'); } }?>
-
Here it is, TIA, Keiron <?php/* $Id$ Author: Tóth Gergely http://oscom.hu v1.0 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License*/ class hfc_information { var $code = 'hfc_information'; var $group = 'header_footer_contents'; var $title; var $description; var $sort_order; var $enabled = false; function hfc_information() { $this->title = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_TITLE; $this->description = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_DESCRIPTION; if ( defined('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS') ) { $this->sort_order = MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER; $this->enabled = (MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS == 'True'); switch (MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT) { case 'Left Header' : $this->group = 'header_contents_left'; break; case 'Center Header' : $this->group = 'header_contents_center'; break; case 'Right Header' : $this->group = 'header_contents_right'; break; case 'Header Line' : $this->group = 'header_line'; break; case 'Left Footer' : $this->group = 'footer_contents_left'; break; case 'Center Footer' : $this->group = 'footer_contents_center'; break; case 'Right Footer' : $this->group = 'footer_contents_right'; break; case 'Footer Line' : $this->group = 'footer_line'; break; } } } function execute() { global $oscTemplate; $data = '<div class="clear"></div>'; $data .= '<hr />' . ' <div id="infoHeader">' . ' <a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SPECIALS . '</a> ' . ' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SHIPPING . '</a> ' . ' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_PRIVACY . '</a> ' . ' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONDITIONS . '</a> ' . ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTACT . '</a>' . '</div>' . '<hr />'; $data .= '<div class="clear"></div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS'); } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Currencies Module', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT', 'Right Header', 'Should the module be loaded in the header or the footer position?', '6', '1', 'tep_cfg_select_option(array(\'Left Header\', \'Center Header\', \'Right Header\', \'Header Line\', \'Left Footer\', \'Center Footer\', \'Right Footer\', \'Footer Line\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Module Version Number', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_VERSION_NUMBER', 'v1.0', 'Version number of installed module', '6', '1', 'tep_sanitize_string(', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_VERSION_NUMBER','MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_STATUS', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_CONTENT_PLACEMENT', 'MODULE_HEADER_FOOTER_CONTENTS_INFORMATION_SORT_ORDER'); } }?>
-
Hi, I've got this when trying to install in a new/clean 2.3.3.4 setup:- Parse error: syntax error, unexpected T_CLASS in /home/raptest/public_html/chefs1/includes/modules/header_footer_contents/hfc_information.php on line 1 Help appreciated. Keiron