Guest Posted June 3, 2015 Share Posted June 3, 2015 Hi all, I'm trying to add the Latest News add on - http://addons.oscommerce.com/info/8231- to oscommerce 2.3.3. I've got all that working and now i'm trying to display the latest news box on the side bar. I've made the new module and installed it, but the Latest News add on requires you to call <?php include(DIR_WS_MODULES . FILENAME_LATEST_NEWS); ?> To make the latest news appear. Would anyone know how you call php in an infobox. Atm I've got; function execute() { global $oscTemplate; $data = '<?php include(DIR_WS_MODULES . FILENAME_LATEST_NEWS); ?>' ; $oscTemplate->addBlock($data, $this->group); } But it doesn't work Link to comment Share on other sites More sharing options...
ArtcoInc Posted June 3, 2015 Share Posted June 3, 2015 @@adamboustead The installation instructions say: ####[ ADD THIS LINE THERE WHERE YOU LIKE TO SHOW NEWS - usually index.php ]####################### <?php include(DIR_WS_MODULES . FILENAME_LATEST_NEWS); ?> If you want this to be a loadable box module, you'll have to rewrite the code. I have recently converted another 'Latest News' module to be a loadable module box, and it has the 'news' scrolls vertically. Maybe you can get some ideas from this code: http://addons.oscommerce.com/info/9318 Malcolm Link to comment Share on other sites More sharing options...
Guest Posted June 3, 2015 Share Posted June 3, 2015 Hiya Malcolm, The code snippet I shared is from a bm_ module that I've created specifically to show the latest news module. I used this tutorial to create the infobox http://www.host1plus.com/tutorials/cms-tutorials/oscommerce/oscommerce-administration/how-to-create-a-new-infobox-in-oscommerce-2-3-1/ Link to comment Share on other sites More sharing options...
Hotclutch Posted June 3, 2015 Share Posted June 3, 2015 The tutorial won't help you with the specifics needed. The way you are trying to define $data for eg. is way off the mark. Link to comment Share on other sites More sharing options...
Guest Posted June 4, 2015 Share Posted June 4, 2015 Normally the code below is in the information box. All I'm trying to do is remove the <ul> which shows a menu and replace it with the latest news box? function execute() { global $oscTemplate; $data = '<div class="infoBoxWrapper list">' . tep_draw_box_wrapper_top() . ' <div class="infoBoxHeading">' . tep_draw_box_title_top(). '<i class="icon-info-sign"></i>' . MODULE_BOXES_LATEST_NEWS_BOX_TITLE . tep_draw_box_title_bottom() . '</div>' . ' <div class="infoBoxContents">' . tep_draw_box_content_top() . ' <ul class="information">' . ' <li>'. tep_draw_box_list_top() . ' <a href="' . tep_href_link(FILENAME_SHIPPING) . '"><i class="icon-ok"></i>' . MODULE_BOXES_LATEST_NEWS_BOX_SHIPPING . '</a>' . tep_draw_box_list_bottom() . '</li>' . ' <li>' . tep_draw_box_list_top() . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '"><i class="icon-ok"></i>' . MODULE_BOXES_LATEST_NEWS_BOX_PRIVACY . '</a>' . tep_draw_box_list_bottom() . '</li>' . ' <li>' . tep_draw_box_list_top() . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '"><i class="icon-ok"></i>' . MODULE_BOXES_LATEST_NEWS_BOX_CONDITIONS . '</a>' . tep_draw_box_list_bottom() . '</li>' . ' <li>' . tep_draw_box_list_top() . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '"><i class="icon-ok"></i>' . MODULE_BOXES_LATEST_NEWS_BOX_CONTACT . '</a>' . tep_draw_box_list_bottom() . '</li>'. ' </ul>' . '' . tep_draw_box_content_bottom() . '</div>' . '' . tep_draw_box_wrapper_bottom() . '</div>'; $oscTemplate->addBlock($data, $this->group); } Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2015 Share Posted June 5, 2015 Anyone?? Link to comment Share on other sites More sharing options...
Hotclutch Posted June 5, 2015 Share Posted June 5, 2015 There's also a commercial support section. Recoding add-ons does not fall under the scope of general support. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.