mediamacher Posted January 30, 2011 Share Posted January 30, 2011 (edited) Hello, I have installed the Add-On "Information pages unlimted" in oscommerce 2.3. everything works fine in the admin area. I can´t get integrated the old code in the new box modules... http://www.oscommerce.com/community/contributions,1026 <!-- information //--> <tr> <td> <?php // Add-on - Information Pages Unlimited require_once(DIR_WS_FUNCTIONS . 'information.php'); $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION); new infoBoxHeading($info_box_contents, true, false); $info_box_contents = array(); $info_box_contents[] = array('text' => tep_information_show_category(1) . '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' . '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>' ); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> Many thanks for your help :-) Edited January 30, 2011 by mediamacher Quote Link to comment Share on other sites More sharing options...
PupStar Posted January 30, 2011 Share Posted January 30, 2011 It should be like this ' ' . tep_information_show_category(1) . '' . Regards Mark Quote Link to comment Share on other sites More sharing options...
♥kymation Posted January 31, 2011 Share Posted January 31, 2011 Replace the execute() method in includes/modules/boxes/bm_information.php with this: function execute() { global $oscTemplate; $data = '<div class="ui-widget infoBoxContainer">' . "\n"; $data .= ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' . "\n"; $data .= ' <div class="ui-widget-content infoBoxContents">' . "\n"; $data .= ' <a href="' . tep_href_link( FILENAME_CONTACT_US ) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a><br />' . "\n"; $data .= tep_information_show_category( 1 ); $data .= ' </div>' . "\n"; $data .= '</div>' . "\n"; $oscTemplate->addBlock( $data, $this->group ); } Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
kleon Posted November 1, 2013 Share Posted November 1, 2013 Hi I dont find for download this addon from http://addons.oscommerce.com where did he go? Quote Link to comment Share on other sites More sharing options...
♥kymation Posted November 1, 2013 Share Posted November 1, 2013 It's still at the link in the first post. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
nafri Posted December 19, 2013 Share Posted December 19, 2013 hi i am using Information Pages Unlimited .. i have made a css text box where i want to display content of a page.. doing <?php echo tep_href_link(FILENAME_INFORMATION, 'info_id=31'); ?> display link to the page. i want to display the content not the link .I have been searching on-line but been going circles. regards nafri Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted February 10, 2014 Share Posted February 10, 2014 (edited) i installed this add-on (ver. SLiCK 303, 27 May) and everything works fine so far except that the titles/links won't show at the front end page. my bm_information.php box is not standart osC i did some tutorial where you can separate the data from execution to implement the box contents anywhere in the page. now how can i implement the following piece of code inside my bm_information.php file so that it will show. (i tried several possibilities but failed.) // BOF: Information Pages Unlimited require_once(DIR_WS_FUNCTIONS . 'information.php'); // EOF: Information Pages Unlimited here is the place where it should go inside: function boxData() { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . // ' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' . // ' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' . // ' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' . ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' . ' </div>' . '</div>'; return $data; } Edited February 10, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted February 10, 2014 Share Posted February 10, 2014 Hi lambros Try this function execute() { global $oscTemplate; // BOF: Information Pages Unlimited require_once(DIR_WS_FUNCTIONS . 'information.php'); // EOF: Information Pages Unlimited $oscTemplate->addBlock($this->boxData(), $this->group); } function boxData() { $data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_INFORMATION_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents">' . tep_information_show_category(1) . // ' <a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . MODULE_BOXES_INFORMATION_BOX_SHIPPING . '</a><br />' . // ' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_INFORMATION_BOX_PRIVACY . '</a><br />' . // ' <a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . MODULE_BOXES_INFORMATION_BOX_CONDITIONS . '</a><br />' . ' <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . MODULE_BOXES_INFORMATION_BOX_CONTACT . '</a>' . ' </div>' . '</div>'; return $data; } function isEnabled() { return $this->enabled; } Tsimi 1 Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted February 10, 2014 Share Posted February 10, 2014 (edited) @@joli1811 thank you john. your code worked. tep_information_show_category(1) . where did you get that code? is that part of this add-on? i know it is mentioned view postings above but i didn't see that inside the code itself. Edited February 10, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted February 10, 2014 Share Posted February 10, 2014 @@joli1811 thank you john. your code worked. tep_information_show_category(1) . where did you get that code? is that part of this add-on? i know it is mentioned view postings above but i didn't see that inside the code itself. Yes in my version from Slick it is there guess he is asking for top level pages remember this addon will also allow for sub-pages John Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 12, 2014 Share Posted April 12, 2014 (edited) i installed the following MATC add-on http://addons.oscommerce.com/info/8664 and modified it a bit so that a jquery modal window popups up and shows the "terms & conditions". i also installed, a while ago, information pages unlimited for 2.3 and i have trouble to read out the terms & conditions that i wrote inside it. i can show up the original osc conditions.php contents inside the popup window but how can i show the text from the information unlimited add-on? here is the piece of code that shows the MATC text and popup window link <span> <?php echo TEXT_COND_ACCEPT1; echo '<a href="' . tep_href_link(FILENAME_POPUP_CONDITIONS) . '" target="_blank" onclick="$(\'#cond\').dialog(\'open\'); return false;">' . TEXT_COND_ACCEPT2 . '</a>'; echo TEXT_COND_ACCEPT3; ?> </span> <!-- BOF CONDITIONS POPUP //--> <div id="cond" title="<?php echo HEADING_TITLE_COND; ?>"><?php include(FILENAME_POPUP_CONDITIONS); ?></div> <!-- EOF CONDITIONS POPUP //--> <?php if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } //BOF MATC mattjt83 echo '<div style="margin:5px 0 15px;">' . tep_draw_checkbox_field('matc', '', false, 'id="matc"') . MATC_TEXT . '</div><br />'; //EOF MATC mattjt83 echo '<div class="buttonActionCOconfirm">' . tep_draw_button(IMAGE_BUTTON_CONFIRM_ORDER, 'check', null, 'primary') . '</div>'; ?> as you can see it includes the FILENAME_POPUP_CONDITIONS which looks like this <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); ?> <div class="contentContainer"> <div class="contentText"> <?php echo TEXT_INFORMATION; ?> </div> </div> so this reads out the conditions.php of the respective language you are browsing. now how to do the same thing for this INFORMATION UNLIMITED add-on? how can i read out the created text? Edited April 12, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 12, 2014 Share Posted April 12, 2014 The solution was always there but i couldn't see it. In my shop the terms & conditions have the ID 2 so i took the following piece of code from the catalog/information.php $information_query = tep_db_query("SELECT information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='" . $info_id . "' AND language_id='" . (int)$languages_id ."'"); $information = tep_db_fetch_array($information_query); $title = stripslashes($information['information_title']); $page_description = stripslashes($information['information_description']); and just added a 2 instead of " . $info_id . " now the code inside my FILENAME_POPUP_CONDITIONS looks like this <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2014 osCommerce Released under the GNU General Public License */ $information_query = tep_db_query("SELECT information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='2' AND language_id='" . (int)$languages_id ."'"); $information = tep_db_fetch_array($information_query); $title = stripslashes($information['information_title']); $page_description = stripslashes($information['information_description']); ?> <div class="contentContainer"> <div class="contentText"> <?php echo $page_description; ?> </div> </div> and thats it! (thanks john ;) ) Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted April 17, 2014 Share Posted April 17, 2014 @@Tsimi Interesting conversation with Lambros using his code above it is possible to update an normal extra.php page dynamically from the admin info manager That combined with if an info page is made a subcategory of itself the link does not appear in the info box which is nice when making an extra link for example header link to an info page or an extra.php page thus the link is not repeated in the info box which looks a bit silly. To be confirmed but works that way for me.... Hope I made my self clear :- Regards Joli Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 18, 2014 Share Posted April 18, 2014 (edited) @@joli1811 Added a new "sub-"page (information_id="4") parent page is Terms & Conditions (information_id="2"). As you mentioned, now the new sub-page is active but doesn't show up anywhere inside the terms & conditions. Is this normal behavior for this add-on? If so what would be the meaning of adding this sub-page function to this add-on if it doesn't show up? Anyway by using now the code i posted above i can insert this new sub-page (id=4) anywhere i like and there is no new link inside the information box. Thanks John! Edited April 18, 2014 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted April 18, 2014 Share Posted April 18, 2014 well the function in my version is when I make a page called test top level it appears in the info box if I then make a sub cat of top level called test sub cat it will only appear when the test top level is clicked in the info box on the pages themselves there are no links just the heading title Of course I can make a row of links as navigation help manually on the top level page itself to the sub level pages which makes a bit easier for the customer to click through Now when I go back to edit my new test sub cat and make test sub cat a sub cat of itself (test sub cat) the sub cat page no longer appears at all as a link in the info box but it is stored in the database so if I want to link this page in the header or footer using tep_href <a href="<?php echo tep_href_link(FILENAME_INFORMATION, 'info_id=4'); ?>">Terms & Conditions</a> (the page id I can see in the url at the top in admin example...) Saves me having the link needlessly also appearing in the infobox which is kind of cool :) just never noticed before today Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 18, 2014 Share Posted April 18, 2014 ...test sub cat it will only appear when the test top level is clicked in the info box Aah! Now i got it, thanks for clearing that up. I didn't realize it since my Info stuff is inside the footer and when i click on any top link it cuts of the footer in my monitor view. That is why i didn't see it. Now when I go back to edit my new test sub cat and make test sub cat a sub cat of itself (test sub cat) the sub cat page no longer appears at all as a link in the info box but it is stored in the database so if I want to link this page in the header or footer using tep_href I lost you there a bit.... :wacko: But i think after some trial & error i got it. (The IDs are just sample numbers!) Top-Level Page (id="2") ---- Sub-Level Page (id="4") (need to be deactivated! to remove the link inside the info box) ------- Sub-Sub-Level Page (id="6") (no link is showing so this SUB-SUB-PAGE needs to be activated) Top-Level Page (id="2") (activated!) ---- Sub-Level Page (id="4") (deactivated!) ------ Sub-Sub-Level Page (id="6") (activated!) <a href="<?php echo tep_href_link(FILENAME_INFORMATION, 'info_id=6'); ?>">SUB-SUB-LEVEL_LINK_TEXT</a> Did i get it correctly? Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted April 18, 2014 Share Posted April 18, 2014 (edited) Top-Level Page (id="2") ---- Sub-Level Page (id="4") (need to be deactivated! to remove the link inside the info box) NO NOT DEACTIVATED it needs to be edited and this time you make it a sub category of itself this means the ID="2" is still there in the info box but the ID="4" is no longer visible in the info box but you could still link from the footer with <a href="<?php echo tep_href_link(FILENAME_INFORMATION, 'info_id=4'); ?>">SUB-LEVEL_LINK_TEXT</a> Now I never went deeper to sub sub because simply this will hide the link in info box but the page is still in the database Top-Level Page (id="2") (activated!) ---- Sub-Level Page (id="4") (sub of itself!) made as a sub of id="2" then edited to make sub of itself ------ Sub-Sub-Level Page (id="6") (not sure never tested!) <a href="<?php echo tep_href_link(FILENAME_INFORMATION, 'info_id=6'); ?>">SUB-SUB-LEVEL_LINK_TEXT</a> I sent you a PM to test yourself cause my brain hurts :D (w00t) PS :Now I will fry your brain a bit hahah would be nice to get the meta info into your code when creating a new php page or your terms & conditions pop up think it must be possible Edited April 18, 2014 by joli1811 Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 18, 2014 Share Posted April 18, 2014 I sent you a PM to test yourself cause my brain hurts :D (w00t) :lol: same here my friend, same here :lol: PS :Now I will fry your brain a bit hahah would be nice to get the meta info into your code when creating a new php page or your terms & conditions pop up think it must be possible now don't over do it, don't start with meta info stuff. just reading that name gives me headache. my brain capacity is full for now. :P :D ....it needs to be edited and this time you .... please explain, what do you mean with edited? which part needs editing? Quote Link to comment Share on other sites More sharing options...
♥joli1811 Posted April 18, 2014 Share Posted April 18, 2014 Just joking was wondering if adding part of the header tags reloaded code to your code would pull in the meta tag for a static php page going to test on one of my pages. Quote To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
♥Tsimi Posted May 13, 2014 Share Posted May 13, 2014 new issue encountered! i was about to create the structure in which my future Terms & Conditions should be displayed. I was thinking about a small list of each section/paragraph at the top so that the customer can click and jump directly to the area of interest. For that i was think about using anchors. eg. at the top <p> <a href="information.php?info_id=2#1">Pricing</a> </p> target would be <p align="justify"><b><a id="1">§ 1 Pricing</a></b><br> this works great BUT (there always is a "but" :wacko: ) i have a popup window inside the checkout_confirmation page where the customer "should" read the T&C and agree to them (MATC). Now if someone clicks on one of these anchor links he gets redirected to the information.php page which makes sense since i added a information.php?info_id=2#1 Link inside it. How could i make this work for both places? Is there some kinda PHPSELF code instead? so that i could prevent from jumping to the information.php page? Quote Link to comment Share on other sites More sharing options...
ce7 Posted August 17, 2015 Share Posted August 17, 2015 (edited) Hi, I had installed Information Page Unlimited on the osC-2.3.3.4 BS version. There are errors occur if deleted all pages, the error/warning message as below: Warning: Variable passed to each() is not an array or object in /information_manager.php on line 223line 223 code: while (list($key, $val)=each($data)) { Warning: reset() expects parameter 1 to be array, boolean given in /information_form.php on line 56line 223 code: while (list($key, $val)=each($data)) { Warning: Variable passed to each() is not an array or object in /information_form.php on line 57line 57 code: $selected = ($val['information_id'] == $edit['parent_id']) ? 'selected="selected"' : ''; and also once the error occured, even if you add new page, the pages will not show up on the admin/information_list.php, however you still can see the updated link in the front page. further question: so far the link only can link to layer 2 (main link, layer 1 under main link, layer 2 under layer 1), how can I make linkable layer to further more layer, like layer 3, layer 4... And is there a way that we can make the link to the front end show up on admin/information_list.php? I know that on the information_list.php it will show up the link, but this link is to link to the information_form.php so that you can edit it in the admin back end, but I like to have the link that created link directlly to the front end, so that i can click on it and go directly to the front end that page, right now have to go the the catalog site, and go find the info box, and click on layer 1 link, and then click on layer 2 link. Can anyone please help with these errors and the link concept, thanks! Edited August 17, 2015 by ce7 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted August 18, 2015 Share Posted August 18, 2015 Once again just out of curiosity, to see if it is possible to install this into a BS shop, I installed this add-on (ver. SLiCK 303, 27 May) and everything works just fine. Just take the same version as I did. All the others are buggy, not complete packages or just language additions. There is only one step that you can skip and another step requires you to edit a file that is in a different folder structure. Other then that you can just follow the normal install manual. Step 6 -> D. skip this step, not needed. Step 7 -> C. you have to add <?php require_once(DIR_WS_FUNCTIONS . 'information.php'); echo tep_information_show_category(1); ?> inside the catalog/includes/modules/boxes/templates/information.php and uncomment or remove the following links <li><a href="<?php echo tep_href_link('shipping.php'); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_SHIPPING; ?></a></li> <li><a href="<?php echo tep_href_link('privacy.php'); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_PRIVACY; ?></a></li> <li><a href="<?php echo tep_href_link('conditions.php'); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_CONDITIONS; ?></a></li> <li><a href="<?php echo tep_href_link('contact_us.php'); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_CONTACT; ?></a></li> Quote Link to comment Share on other sites More sharing options...
RAC Posted September 7, 2017 Share Posted September 7, 2017 Hi I know this is an old discussion, but has anyone installed this on 2.3.4 bs edge? Does it work? Thanks Shaun Quote Link to comment Share on other sites More sharing options...
♥kymation Posted September 7, 2017 Share Posted September 7, 2017 I've installed it on an early version of Edge, pretty much as in the post before yours. This was over a year ago, so there are probably more changes now. You'll need the compatibility addon at the very least. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
RAC Posted September 7, 2017 Share Posted September 7, 2017 Hi Jim thanks for your prompt reply! Yes I have the compatibility module already installed. I have been having problems with looking for an information pages addon that works on bs, this seems to be just what I have been looking for. I will give it a go. Shaun Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.