sunshynecraftsbeads Posted June 19, 2011 Share Posted June 19, 2011 Hi, RE: ADD ON - Posted on June 19th, 2011 Join Us On Facebook & Twitter Infobox I was able to install it in my admin store and added my information for facebook and twitter but then when I enable the module my store gets following error message. Fatal error: Call to undefined function tep_image_original() in /home/XXXXXX/public_html/includes/modules/boxes/bm_social_box.php on line 39 Here is the coding for the bm_social_box.php <?php/* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 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.new.facebook.com/profile.php?id=' . MODULE_BOXES_FACEBOOK_ACCOUNT_NAME . '" target="_new">' . tep_image_original(DIR_WS_IMAGES . 'follow-us-on-facebook.png', 'Follow us on Facebook') . '</a><br><a href="http://twitter.com/' . MODULE_BOXES_TWITTER_ACCOUNT_NAME . '" target="_new">' . tep_image_original(DIR_WS_IMAGES . 'follow_us_twitter.png', 'Tweet Us!') . '</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', '', 'MY INFORMATION', '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', '', 'MY INFORMATION', '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'); } } ?> I have double checked everything and the install was done correctly. It is a very easy install. My hat is off for Mark who provided us with this great add on. Any help would be greatly appreciated. Thank you in advance, Tracie Link to comment Share on other sites More sharing options...
FIMBLE Posted June 20, 2011 Share Posted June 20, 2011 Hi The error is telling you that for whatever reason function tep_image_original() cannot be found, are you using this with a 2.2 store? you could try changing it to target="_new">' . tep_image(DIR_WS_IMAGES . 'follow-us-on-facebook.png', 'Follow us on Facebook') . '</a><br><a Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
sunshynecraftsbeads Posted June 20, 2011 Author Share Posted June 20, 2011 Hi Nic, I am sorry. I wrote you back but for some reason it did not show up. No luck with computer's tonight I guess. lol I have version 2.3.1 I did try the code you gave me and it just told me I had the same error on line 40 instead of 39 so I'm kinda lost here. Thank you for responding. Tracie Link to comment Share on other sites More sharing options...
sandwick Posted July 15, 2011 Share Posted July 15, 2011 How do I install step 2. Install the infobox in your stores admin ? Any help would be appreciated ! Server Information osCommerce Online Merchant v2.2 RC2a Database: MySQL 5.0.91-log HTTP Server: Apache PHP Version: 4.4.9 (Zend: 1.3.0) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.