Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Footer Content Modules for V2.3


tgely

Recommended Posts

Thanks for reply,

 

I sorted issue by taking good file clean it and copy+paste contents of corrupted files and save as to replace broken one. Seems like these files are Ok with windows server but prob with unix. I played bit with file settings but no result. Anyway it sorted and i advice anybody with the prob do the same.

Link to comment
Share on other sites

I have question about Simple Menu.

Is it possible to install it without SCM contribution?

 

At this moment hfc_menu.php is asking for "admin installer module" what I beleive is parts of SCM.

 

I just trying to avoid features and mess in files what i don't need and can do much simple by working in phpmyAdmin.

Link to comment
Share on other sites

Is it possible to install it without SCM contribution?

 

yes, but you need to declare some filename and table define("","") and do links in column_left for admin. SCM does defines only for working.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 1 month later...

Please help to convert "Join Us in Twiter.." addon http://addons.oscommerce.com/info/8053 for HFC use

 

infobox code here

 

<?php
/*
 $Id$
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2010 osCommerce
 Released under the GNU General Public License
*/
 class bm_social_box {
   var $code = 'bm_social_box';
   var $group = 'boxes';
   var $title;
   var $description;
   var $sort_order;
   var $enabled = false;
   function bm_social_box() {
  $this->title = MODULE_BOXES_SOCIAL_TITLE;
  $this->description = MODULE_BOXES_SOCIAL_DESCRIPTION;
  if ( defined('MODULE_BOXES_SOCIAL_STATUS') ) {
    $this->sort_order = MODULE_BOXES_SOCIAL_SORT_ORDER;
    $this->enabled = (MODULE_BOXES_SOCIAL_STATUS == 'True');
    $this->group = ((MODULE_BOXES_SOCIAL_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');
  }
   }
   function execute() {
  global $oscTemplate;
  $data = '<div class="ui-widget infoBoxContainer">' .
		  '  <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_SOCIAL_BOX_TITLE . '</div>' .
		  '  <div class="ui-widget-content infoBoxContents" style="text-align:center;">' .
		  '  <a href="http://www.facebook.com/' . MODULE_BOXES_FACEBOOK_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'social_bookmarks/follow_facebook.png', 'Facebook') . '</a>
<a href="http://www.twitter.com/' . MODULE_BOXES_TWITTER_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'social_bookmarks/follow_twitter.png', 'Twitter') . '</a>
<a href="http://www.instagram.com/' . MODULE_BOXES_INSTAGRAM_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'social_bookmarks/follow_instagram.png', 'Instagram') . '</a>
<a href="http://www.pinterest.com/' . MODULE_BOXES_PINTEREST_ACCOUNT_NAME . '" target="_new">' . tep_image(DIR_WS_IMAGES . 'social_bookmarks/follow_pinterest.png', 'Pinterest') . '</a>
' .
		  '  </div>' .
		  '</div>';
  $oscTemplate->addBlock($data, $this->group);
   }
   function isEnabled() {
  return $this->enabled;
   }
   function check() {
  return defined('MODULE_BOXES_SOCIAL_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 Social Box Module', 'MODULE_BOXES_SOCIAL_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_BOXES_SOCIAL_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', 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_BOXES_SOCIAL_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, date_added) values ('Facebook Account Name', 'MODULE_BOXES_FACEBOOK_ACCOUNT_NAME', '', 'Add your facebook account name here', '6', '1', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Twitter id', 'MODULE_BOXES_TWITTER_ACCOUNT_NAME', '', 'Add your twitter id here', '6', '1', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Instagram id', 'MODULE_BOXES_INSTAGRAM_ACCOUNT_NAME', '', 'Add your instagram id here', '6', '1', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Pinterest id', 'MODULE_BOXES_PINTEREST_ACCOUNT_NAME', '', 'Add your pinterest id here', '6', '1', now())");
   }
   function remove() {
  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
   }
   function keys() {
  return array('MODULE_BOXES_SOCIAL_STATUS', 'MODULE_BOXES_SOCIAL_CONTENT_PLACEMENT', 'MODULE_BOXES_SOCIAL_SORT_ORDER', 'MODULE_BOXES_FACEBOOK_ACCOUNT_NAME', 'MODULE_BOXES_TWITTER_ACCOUNT_NAME',
'MODULE_BOXES_INSTAGRAM_ACCOUNT_NAME', 'MODULE_BOXES_PINTEREST_ACCOUNT_NAME');
   }
 }
?>

Link to comment
Share on other sites

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi Gergely, Thanks for upload.

Unfortunately test is not successful. Module is not doing install on pressing "+Install module" button.

So it is not moving to installed modules page ....modules.php?set=header_footer_contents

 

but in sql configuratin table it set own records.

Enable Social Box Module - True

Content Placement - Left Header

Sort Order - 0

Facebook Account Name ...

Twitter id ...

Instagram id ...

Pinterest id ..

Link to comment
Share on other sites

Sorry I dont have place to do test. I think you could see between installed boxes.

 

SELECT *
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_BOXES_INSTALLED'

 

Somehow try unistall from box modules.

 

Next step:

 

change:

   var $group = 'boxes';

 

to:

   var $group = 'header_footer_contents';

 

Install again.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

I'm happy to test )))

 

SELECT *
FROM `configuration`
WHERE `configuration_key` LIKE 'MODULE_BOXES_INSTALLED'

 

No it is not here, it still existing on ...modules.php?set=header_footer_contents&list=new

 

I also applied $group change but still te same, no install for some reason, very tricky...

Link to comment
Share on other sites

Hi,

 

Happened to me on a few occasions ( but different box) I had to delete manually the entries in the database under

 

Table: configuration .... will be one of the last entries

 

as they did not uninstall properly and messed up the install from admin the corrected box module.

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

SELECT *
FROM `configuration`
WHERE `configuration_key` LIKE '%MODULE_HEADER_FOOTER_CONTENTS_SOCIAL%'

 

delete the results from configuration table.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

  • 3 months later...

Hello,

 

May I ask after i did the instructions and modified my headers and footers,

 

when i install the modules in my admin page, it says

 

"Parse error: syntax error, unexpected T_CLASS in /home/content/17/8283017/html/shop/catalog/includes/modules/header_footer_contents/hfc_banner_cycle.php on line 1"

 

This file is a new file, and there is no way i modified it before.

 

Any ideas?

 

Thanks in advance!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Hi @@auster and @@Comesticage

 

Somewhere the zip file demaged in the contaner so you cant unzip well. I appreciated you that try download the good file. Could you post here the /home/raptest/public_html/chefs1/includes/modules/header_footer_contents/hfc_information.php file?

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

@@Gergely

 

Hello for my file, shop/catalog/includes/modules/header_footer_contents/hfc_banner_cycle.php

 

<?php/*  $Id$ Author: 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_banner_cycle {    var $code = 'hfc_banner_cycle';    var $group = 'header_footer_contents';    var $title;    var $description;    var $sort_order;    var $enabled = false;    function hfc_banner_cycle() {	  $this->title = MODULE_HFC_BANNER_CYCLE_TITLE;	  $this->description = MODULE_HFC_BANNER_CYCLE_DESCRIPTION;	  if ( defined('MODULE_HFC_BANNER_CYCLE_STATUS') ) {	    $this->sort_order = MODULE_HFC_BANNER_CYCLE_SORT_ORDER;	    $this->enabled = (MODULE_HFC_BANNER_CYCLE_STATUS == 'True');	    switch (MODULE_HFC_BANNER_CYCLE_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, $languages_id;	  //initialize main banner query	  $banner_query_raw = "	    select		   banners_id,		  banners_url,		   banners_image,		  banners_html_text,		  status	    from		   " . TABLE_BANNERS . "	    where		   banners_group = '" . MODULE_HFC_BANNER_CYCLE_GROUP . "'		   and language_id = '" . ( int )$languages_id . "'		   and status = 1	    order by		   " . MODULE_HFC_BANNER_CYCLE_ORDER . "		 limit		   " . MODULE_HFC_BANNER_CYCLE_MAX_DISPLAY_ROTATOR	  ;	  // print $banner_query_raw; exit();	  $banner_query = tep_db_query( $banner_query_raw );	  if( tep_db_num_rows( $banner_query ) > 0 ) {	    //initialize $data	    $data = '<script type="text/javascript">' . PHP_EOL;	    $data .= '$(document).ready(function() {' . PHP_EOL;	    $data .= "$('.pics').cycle({" . PHP_EOL;	    // choose your transition type, ex: fade, scrollUp, shuffle, etc...	    $data .= "    fx:    'fade', " . PHP_EOL;	    $data .= "    speed:  4500 " . PHP_EOL;	    $data .= '});' . PHP_EOL;	    $data .= '});' . PHP_EOL;	    $data .= '</script>' . PHP_EOL;	    $data .= '<!-- banner_cycle -->' . PHP_EOL;	    $data .= ' <div id="bannerCycle" class="pics">' . PHP_EOL;	    while( $banner = tep_db_fetch_array( $banner_query ) ) {		  if( $banner['banners_url'] != '' ) {		    $data .= '<a href="' . tep_href_link( FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_self">' . PHP_EOL;		  }		  if ($banner['banners_html_text']) {		    $image_source = $banner['banners_html_text'];		    $data .= $image_source . PHP_EOL;		  } else {		    $data .= tep_image( DIR_WS_IMAGES . $banner['banners_image']) . PHP_EOL;		  }		  if( $banner['banners_url'] != '' ) {		    $data .= '</a>' . PHP_EOL;		  }		  tep_update_banner_display_count( $banner['banners_id'] );	    }	    $data .= '  </div>' . PHP_EOL;	    $data .= '<!-- banner_cycle_EOF -->' . PHP_EOL;	    $oscTemplate->addBlock($data, $this->group);  //sending $data			    $header  = '<script type="text/javascript" src="ext/jquery/cycle/jquery.cycle.lite.js"></script>' . PHP_EOL;	    $header .= '<style>				   #bannerCycle {    margin-right: 0px;  /* php manage */    float: left;  /* php manage */}.pics {    height: 100px;  /* php manage */    width: ' . MODULE_HFC_BANNER_CYCLE_WIDTH . 'px;  /* php manage */    padding: 0;	  margin: 0;    margin-top: 10px;    margin-bottom: 14px;}  .pics img {	  padding: 4px;  /* php manage */    border: 1px solid #ccc;	  background-color: #eee;    width: ' . MODULE_HFC_BANNER_CYCLE_WIDTH . 'px; /* php manage */    height: 100px; /* php manage */    top: 0;	 left: 0;}.pics p {    width: ' . (MODULE_HFC_BANNER_CYCLE_WIDTH + 4) . 'px;    height: 100px;    text-align : center;    margin-top: 10px;    background: #fff;}</style>';	    $oscTemplate->addBlock($header, 'header_tags');  //sending $header	  }    }    function isEnabled() {	  return $this->enabled;    }    function check() {	  return defined('MODULE_HFC_BANNER_CYCLE_STATUS');    }    function install() {	 // Check whether the banners table has been altered and add the language field if it has not	  $check_structure_query_raw = "describe " . TABLE_BANNERS;	  $check_structure_query = tep_db_query( $check_structure_query_raw );	  $banners_language = false;	  while( $check_structure_data = tep_db_fetch_array( $check_structure_query ) ) {	    if( $check_structure_data['Field'] == 'language_id' ) {		  $banners_language = true;	    }	  }	  // Now insert the language field if we need to	  if( $banners_language == false ) {	    tep_db_query( "alter table " . TABLE_BANNERS . " add column `language_id` INT( 11 ) NOT NULL default '1' after `banners_id`" );	  }	  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_HFC_BANNER_CYCLE_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_HFC_BANNER_CYCLE_CONTENT_PLACEMENT', 'Header Line', 'Should the module be loaded in the left or right column?', '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_HFC_BANNER_CYCLE_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_HFC_BANNER_CYCLE_VERSION_NUMBER', 'v1.0', 'Version number of installed module', '6', '1', 'tep_sanitize_string(', now())");	  tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banners Cycle Group Name', 'MODULE_HFC_BANNER_CYCLE_GROUP', 'hfc_module', 'Add this group name for hfc banners.', '6', '13', 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 ('Banners Cycle Order', 'MODULE_HFC_BANNER_CYCLE_ORDER', 'banners_id', 'Select sort order method of displayed banners.', '6', '11', 'tep_cfg_select_option(array(\'banners_id\', \'rand()\'), ', now())");	  tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banners Cycle', 'MODULE_HFC_BANNER_CYCLE_MAX_DISPLAY_ROTATOR', 4, 'How many banners cycle in same time?', '6', '10', now())");	  tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banners width', 'MODULE_HFC_BANNER_CYCLE_WIDTH', 300, 'How many pixels width need for banners cycle?', '6', '10', now())");    }    function remove() {	  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");    }    function keys() {	  return array('MODULE_HFC_BANNER_CYCLE_VERSION_NUMBER','MODULE_HFC_BANNER_CYCLE_STATUS', 'MODULE_HFC_BANNER_CYCLE_CONTENT_PLACEMENT', 'MODULE_HFC_BANNER_CYCLE_SORT_ORDER', 'MODULE_HFC_BANNER_CYCLE_MAX_DISPLAY_ROTATOR', 'MODULE_HFC_BANNER_CYCLE_ORDER', 'MODULE_HFC_BANNER_CYCLE_GROUP', 'MODULE_HFC_BANNER_CYCLE_WIDTH');    }  }?>
Link to comment
Share on other sites

Hi @@auster and @@Comesticage

 

Somewhere the zip file demaged in the contaner so you cant unzip well. I appreciated you that try download the good file. Could you post here the /home/raptest/public_html/chefs1/includes/modules/header_footer_contents/hfc_information.php file?

 

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'); } }?>

Link to comment
Share on other sites

Hi @@auster @@Comesticage

 

could you use codecity in the post? Press <> in html editor and copy paste into the php code.

 

Thanks

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi @@auster @@Comesticage

 

could you use codecity in the post? Press <> in html editor and copy paste into the php code.

 

Thanks

<?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');    }  }?>

Link to comment
Share on other sites

hm. This file has no line breaks. Download again and visit line ends.

 

<?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');
   }
 }
?>

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Hello,

 

Even downloading fresh copies of "Header Footer Content Modules v1.2" and "Header Footer Content Modules v1.11",

and uploading them.

 

I still have the errors.

 

Do you have a new complete package with all the correct line breaks?

 

The codings is in a mess...

 

Am having problems with "hfc_banner_cycle.php" and having errors while installing the modules in the admin panel.

 

thanks

Edited by Comesticage
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I believe I have installed everything but i am getting below error message. Due to this I can't see the "menu maker" to show in my admin box. I have "Admin Extends Info" and "Box Row 2" and both are just text with no options. This is for the HFC Menu 1.2. What did I miss? Thanks!

Warning: constant(): Couldn't find constant BOX_EXTENDS_MENU_MAKER in C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php on line 95
Call Stack
# Time Memory Function Location
1 0.0038 381592 {main}( ) ..\modules.php:0
2 0.1184 1771176 require( 'C:\wamp\www\oscommerce1\admin\includes\template_top.php' ) ..\modules.php:69
3 0.1212 1790608 include( 'C:\wamp\www\oscommerce1\admin\includes\column_left.php' ) ..\template_top.php:51
4 0.1253 1817160 include( 'C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php' ) ..\column_left.php:36
5 0.1366 1833288 constant ( ) ..\box_extends.php:95

( ! ) Warning: constant(): Couldn't find constant BOX_EXTENDS_MENU_MAKER in C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php on line 109
Call Stack
# Time Memory Function Location
1 0.0038 381592 {main}( ) ..\modules.php:0
2 0.1184 1771176 require( 'C:\wamp\www\oscommerce1\admin\includes\template_top.php' ) ..\modules.php:69
3 0.1212 1790608 include( 'C:\wamp\www\oscommerce1\admin\includes\column_left.php' ) ..\template_top.php:51
4 0.1253 1817160 include( 'C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php' ) ..\column_left.php:36
5 0.1454 1834736 constant ( ) ..\box_extends.php:109

 

 

it is working with below extends_menu_maker.php.

http://myshopadmin/extends_menu_maker.php.

 

Thanks

Edited by friendpu
Link to comment
Share on other sites

Hi,

 

I believe I have installed everything but i am getting below error message. Due to this I can't see the "menu maker" to show in my admin box. I have "Admin Extends Info" and "Box Row 2" and both are just text with no options. This is for the HFC Menu 1.2. What did I miss? Thanks!

Warning: constant(): Couldn't find constant BOX_EXTENDS_MENU_MAKER in C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php on line 95
Call Stack
# Time Memory Function Location
1 0.0038 381592 {main}( ) ..\modules.php:0
2 0.1184 1771176 require( 'C:\wamp\www\oscommerce1\admin\includes\template_top.php' ) ..\modules.php:69
3 0.1212 1790608 include( 'C:\wamp\www\oscommerce1\admin\includes\column_left.php' ) ..\template_top.php:51
4 0.1253 1817160 include( 'C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php' ) ..\column_left.php:36
5 0.1366 1833288 constant ( ) ..\box_extends.php:95

( ! ) Warning: constant(): Couldn't find constant BOX_EXTENDS_MENU_MAKER in C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php on line 109
Call Stack
# Time Memory Function Location
1 0.0038 381592 {main}( ) ..\modules.php:0
2 0.1184 1771176 require( 'C:\wamp\www\oscommerce1\admin\includes\template_top.php' ) ..\modules.php:69
3 0.1212 1790608 include( 'C:\wamp\www\oscommerce1\admin\includes\column_left.php' ) ..\template_top.php:51
4 0.1253 1817160 include( 'C:\wamp\www\oscommerce1\admin\includes\boxes\box_extends.php' ) ..\column_left.php:36
5 0.1454 1834736 constant ( ) ..\box_extends.php:109

 

 

it is working ok when directly use the below URL.

http://myshopadmin/extends_menu_maker.php.

 

Thanks

please help me to fix the above error.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...