begich Posted September 16, 2011 Share Posted September 16, 2011 hi=) my qustion may seem to be stupid but i realy need your help i want to use standart scripts from my social network http://vkontakte.ru/developers.php?oid=-1&p=Groups#mode=0&width=200&height=290&oid=-28441028&link=http://vkontakte.ru/club28441028 and i just don't know how to make it work on my site maybe there's some addon to broadcast script to infobox or something thank you Link to comment Share on other sites More sharing options...
begich Posted September 16, 2011 Share Posted September 16, 2011 thank U i found generic box=)) Link to comment Share on other sites More sharing options...
DennisMAX Posted August 13, 2012 Share Posted August 13, 2012 HI :) I have createt a new box on my side and it works, but I have a strange problem :'( My footer are now located at the lift side on my site !!! Why is it so ??? :( Dennis Link to comment Share on other sites More sharing options...
devoidofodors Posted August 13, 2012 Share Posted August 13, 2012 HI :) I have createt a new box on my side and it works, but I have a strange problem :'( My footer are now located at the lift side on my site !!! Why is it so ??? :( Dennis go to Admin > Modules > Boxes and click on the box you are having trouble with. Then press the Edit button once the box's title shows up on the right-hand box. Select which side you want the box to appear on. Link to comment Share on other sites More sharing options...
DennisMAX Posted August 13, 2012 Share Posted August 13, 2012 If I move the new box to the left all boxes goes to the left :angry:, but the footer banner and footer text are located in the right place ..... I think the error is in here : <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ class bm_katalog { var $code = 'bm_katalog'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_katalog() { $this->title = MODULE_BOXES_KATALOG_TITLE; $this->description = MODULE_BOXES_KATALOG_DESCRIPTION; if ( defined('MODULE_BOXES_KATALOG_STATUS') ) { $this->sort_order = MODULE_BOXES_KATALOG_SORT_ORDER; $this->enabled = (MODULE_BOXES_KATALOG_STATUS == 'True'); $this->group = ((MODULE_BOXES_KATALOG_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_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" align="center" border="0"></a>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_KATALOG_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 katalog Module', 'MODULE_BOXES_KATALOG_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_KATALOG_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_KATALOG_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_KATALOG_STATUS', 'MODULE_BOXES_KATALOG_CONTENT_PLACEMENT', 'MODULE_BOXES_KATALOG_SORT_ORDER'); } } ?> Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2012 Share Posted August 13, 2012 Looks you're missing a " </div> " in the $data of function_execute(). After the last " </div> " add another one. Link to comment Share on other sites More sharing options...
DennisMAX Posted August 13, 2012 Share Posted August 13, 2012 like this ? : function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . '</div>'; '</div>'; did not help :'( Link to comment Share on other sites More sharing options...
ErikMM Posted August 13, 2012 Share Posted August 13, 2012 This is great for me, I got it to work to a fashion, but i just want to add simple text to the info box, where shall i place it in the php page and how shall i start it, i dont know how to write code it, id like the box to include the words Claim your discount with many thanks the heading of the infobox? its changed here: /includes/languages/english/modules/boxes/bm_newboxname @ this line define('MODULE_BOXES_INFORMATION_BOX_TITLE', 'Claim your discount with'); a-how-to-road-map 2.3.x road-map-for-the-newbies design basics how to make a horrible osC site ssl-how to updated-security-thread Web Developer, Firebug, and Notepad++ are powerful free tools for web design. Link to comment Share on other sites More sharing options...
ErikMM Posted August 13, 2012 Share Posted August 13, 2012 like this ? : function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . '</div>'; '</div>'; did not help :'( try "file compare" plugin with notepad++ (free) to compare previous/original file with new one a-how-to-road-map 2.3.x road-map-for-the-newbies design basics how to make a horrible osC site ssl-how to updated-security-thread Web Developer, Firebug, and Notepad++ are powerful free tools for web design. Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2012 Share Posted August 13, 2012 like this ? : function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . '</div>'; '</div>'; did not help :'( Like this function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . '</div>' . '</div>'; Link to comment Share on other sites More sharing options...
DennisMAX Posted August 13, 2012 Share Posted August 13, 2012 BKtrain This is have it looks now : $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . ' </div>' . ' </div>'; and it still dos not help :'( :'( Link to comment Share on other sites More sharing options...
DennisMAX Posted August 13, 2012 Share Posted August 13, 2012 try "file compare" plugin with notepad++ (free) to compare previous/original file with new one Smart tool :thumbsup: but I can't see any errors :'( I have copy the file from bm_information, is that a mistake ?? Link to comment Share on other sites More sharing options...
Guest Posted August 13, 2012 Share Posted August 13, 2012 @@DennisMAX Can you post a link to your site so we can see what is going on? Link to comment Share on other sites More sharing options...
ErikMM Posted August 14, 2012 Share Posted August 14, 2012 BKtrain This is have it looks now : $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_KATALOG_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' <div class="img"><center>' . ' <a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a>' . ' </div>' . ' </div>'; and it still dos not help :'( :'( get rid of ' <div class="img"><center>' . keep everything else just like you have it if you want it centered try this ' <center><a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a></center>' . a-how-to-road-map 2.3.x road-map-for-the-newbies design basics how to make a horrible osC site ssl-how to updated-security-thread Web Developer, Firebug, and Notepad++ are powerful free tools for web design. Link to comment Share on other sites More sharing options...
DennisMAX Posted August 14, 2012 Share Posted August 14, 2012 get rid of ' <div class="img"><center>' . keep everything else just like you have it if you want it centered try this ' <center><a href="images/tattini-catalogue-2010-en.pdf" title="klik-her-for-katalog"><img src="images/tattinicatsmall.jpg" border="0" ></a></center>' . Thank you Erik :thumbsup: That seemed to work. But why dos it effect the footer ??? Link to comment Share on other sites More sharing options...
ErikMM Posted August 15, 2012 Share Posted August 15, 2012 Thank you Erik :thumbsup: That seemed to work. But why dos it effect the footer ??? effect the footer how? I'm guessing the box "grew" with the image and pushed the footer down....not sure... a-how-to-road-map 2.3.x road-map-for-the-newbies design basics how to make a horrible osC site ssl-how to updated-security-thread Web Developer, Firebug, and Notepad++ are powerful free tools for web design. Link to comment Share on other sites More sharing options...
DennisMAX Posted August 15, 2012 Share Posted August 15, 2012 effect the footer how? I'm guessing the box "grew" with the image and pushed the footer down....not sure... If I located the new box to the left, all boxes went to the left but the footer banner/text was okay... If I located the new box to the right the footer banner/text were in the site to the right in the middle (site became double wide) . Link to comment Share on other sites More sharing options...
ErikMM Posted August 15, 2012 Share Posted August 15, 2012 If I located the new box to the left, all boxes went to the left but the footer banner/text was okay... If I located the new box to the right the footer banner/text were in the site to the right in the middle (site became double wide) . Chances are you have another extra or unclosed div somewhere...where I don't know a-how-to-road-map 2.3.x road-map-for-the-newbies design basics how to make a horrible osC site ssl-how to updated-security-thread Web Developer, Firebug, and Notepad++ are powerful free tools for web design. Link to comment Share on other sites More sharing options...
DennisMAX Posted August 19, 2012 Share Posted August 19, 2012 ok thanks for the help Link to comment Share on other sites More sharing options...
videod Posted September 24, 2012 Share Posted September 24, 2012 Thank you Jim!!!!! Link to comment Share on other sites More sharing options...
acedave Posted November 13, 2012 Share Posted November 13, 2012 Hello, Maybe this has been answered before in this form thread (I did go through the thread and I did not see - or more likely understand), but how do I change the links in renamed version of the bm_infomation.php module? Basically I want to have a box that has links to various websites. I have done all but step 4 - the one that says "Change the content to what you want in your new box" in the instructions by Jim Keebaugh on page 1 of this thread. I understand that the links are in the execute() { .... } section, but I am not 100% sure what to do next..... any help most welcome... Thanks Link to comment Share on other sites More sharing options...
cramli Posted December 7, 2012 Share Posted December 7, 2012 Hello I followed the instruction here, but when I go to the admin page/module there is no file to add. What I am doing wrong? Thank you in advance for any help Cramli Link to comment Share on other sites More sharing options...
singhajay Posted December 8, 2012 Share Posted December 8, 2012 The column boxes are modules in 2.3.x. Here's a quick outline of how to create a new box: Copy catalog/includes/modules/boxes/bm_information.php and give it a new name. Edit that file and change bm_information to your new box name throughout that file. Change all of the constants that include _INFORMATION_ to include your new name instead. Keep them in all caps. Change the content to what you want in your new box. If you are using links to new files, keep the same format as the links in that box. The part that generates the box is in the execute() method. Copy catalog/includes/languages/english/modules/boxes/bm_information.php and give it a the same name as you did the file in step 1. Make the same changes to the constants in this file that you made in step 3. Upload your two new files. Go to your store Admin > Modules > Boxes and install your new module. Give it a sort order that will place it where you want it. Regards Jim Hi Jim, I followed these instructions. I am able to see this in admin module. Installation and removal of the module in admin works fine. I am also able to edit (configure sort order, enable/disable, position) in the admin module. While everything works perfectly in the admin side, the box does not appear on the store page. I am doing some silly mistake. Please help. I am pasting the code here: <?php class bm_articles { var $code = 'bm_articles'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_articles() { $this->title = MODULE_BOXES_ARTICLES_TITLE; $this->description = MODULE_BOXES_ARTICLES_DESCRIPTION; if ( defined('MODULE_BOXES_ARTICLES_STATUS') ) { $this->sort_order = MODULE_BOXES_ARTICLES_SORT_ORDER; $this->enabled = (MODULE_BOXES_ARTICLE_STATUS == 'True'); $this->group = ((MODULE_BOXES_ARTICLES_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_ARTICLES_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' Try Me ' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_ARTICLES_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 Articles Module', 'MODULE_BOXES_ARTICLES_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_ARTICLES_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_ARTICLES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_ARTICLES_STATUS', 'MODULE_BOXES_ARTICLES_CONTENT_PLACEMENT', 'MODULE_BOXES_ARTICLES_SORT_ORDER'); } } ?> Corresponding code on the language side is : <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ define('MODULE_BOXES_ARTICLES_TITLE', 'Articles'); define('MODULE_BOXES_ARTICLES_DESCRIPTION', 'Show article links'); define('MODULE_BOXES_ARTICLES_BOX_TITLE', 'Articles'); ?> Link to comment Share on other sites More sharing options...
singhajay Posted December 8, 2012 Share Posted December 8, 2012 Hi Jim, I followed these instructions. I am able to see this in admin module. Installation and removal of the module in admin works fine. I am also able to edit (configure sort order, enable/disable, position) in the admin module. While everything works perfectly in the admin side, the box does not appear on the store page. I am doing some silly mistake. Please help. I am pasting the code here: <?php class bm_articles { var $code = 'bm_articles'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_articles() { $this->title = MODULE_BOXES_ARTICLES_TITLE; $this->description = MODULE_BOXES_ARTICLES_DESCRIPTION; if ( defined('MODULE_BOXES_ARTICLES_STATUS') ) { $this->sort_order = MODULE_BOXES_ARTICLES_SORT_ORDER; $this->enabled = (MODULE_BOXES_ARTICLE_STATUS == 'True'); $this->group = ((MODULE_BOXES_ARTICLES_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_ARTICLES_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . ' Try Me ' . ' </div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_ARTICLES_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 Articles Module', 'MODULE_BOXES_ARTICLES_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_ARTICLES_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_ARTICLES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_ARTICLES_STATUS', 'MODULE_BOXES_ARTICLES_CONTENT_PLACEMENT', 'MODULE_BOXES_ARTICLES_SORT_ORDER'); } } ?> Corresponding code on the language side is : <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ define('MODULE_BOXES_ARTICLES_TITLE', 'Articles'); define('MODULE_BOXES_ARTICLES_DESCRIPTION', 'Show article links'); define('MODULE_BOXES_ARTICLES_BOX_TITLE', 'Articles'); ?> Thanks Ajay Link to comment Share on other sites More sharing options...
singhajay Posted December 8, 2012 Share Posted December 8, 2012 Thanks Ajay Sorry, to bother you, I found the mistake. I had misspelled "ARTICLES" at one place. Thanks, Ajay Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.