sfoust Posted August 12, 2003 Share Posted August 12, 2003 I just contruted a tab menu system that I created using Information Pages Unlimited v1.1e as a starting pace. I simply reworked the display interface so that it would operate from tabs instead. http://www.oscommerce.com/community/contributions,1448 It handles both plain text tabs as well as image based tabs. A version that takes advantage of MS2 HTML WYSIWYG Editor, Product Desc, Email + http://www.oscommerce.com/community/contributions,1347 will be coming out in a few days. Quote Link to comment Share on other sites More sharing options...
paulm2003 Posted August 13, 2003 Share Posted August 13, 2003 Sounds interesting, do you have a "demo" of this somewhere? Quote Link to comment Share on other sites More sharing options...
sfoust Posted August 13, 2003 Author Share Posted August 13, 2003 You can see it here for the moment. http://www.sfoust.net/catalog/ This is my development site, so it could be up or down depending on what I'm doing. :wink: Quote Link to comment Share on other sites More sharing options...
horsedog Posted August 27, 2003 Share Posted August 27, 2003 I want a tab that is hooked to a gallery program- Copermine... What is the code to call /gallery/index.php and have it show up in the center panel like the catalog? Quote Link to comment Share on other sites More sharing options...
sfoust Posted August 27, 2003 Author Share Posted August 27, 2003 I dont use (or know about) the Copermine code you are refering to. However, I just put togeather a little hack that may (or may not) work for you. In the tab.php file, find: <?php echo $TAB_DESCRIPTION; ?> and replace it with: <?php if ( strlen($TAB_DESCRIPTION) - strpos($TAB_DESCRIPTION, '.php') == 4 ) require( $TAB_DESCRIPTION ); else echo $TAB_DESCRIPTION; ?> With this code in place, the tab system check to see if the last four characters of the discription is '.php'. If it is then the tab system will assume that it is a php file name and perform a require on it (try to load and execute that php file). Things to note: 1) if the file is found in the catalog folder, you wont need to enter a path. 2) if you do need a path, and the path is within the catalog path, dont use a leading slash (use gallery/index.php not /gallery/index.php). 3) no trailing white space or carage returns. 4) if you are using the WYSIWYG version, check the HTML and make sure it didn't automatily turn it in to a link. Hope this works for you. Quote Link to comment Share on other sites More sharing options...
horsedog Posted August 27, 2003 Share Posted August 27, 2003 It works!! Now, to rework the gallery code to exist within OSC. The php works, there are alot of references, includes, etc.. that are conflicting with OSC I should really rework the Copermine to OSC standards and formats. Quote Link to comment Share on other sites More sharing options...
sfoust Posted August 28, 2003 Author Share Posted August 28, 2003 I just posted a version of Tab Pages Unlimited http://www.oscommerce.com/community/contributions,1448 that includes support for WYSIWYG. http://www.oscommerce.com/community/contributions,1347 The support files are not mine. They were created by MaxiDVD for use with the Information Pages Unlimted contribution. Quote Link to comment Share on other sites More sharing options...
azer Posted August 28, 2003 Share Posted August 28, 2003 thanks for your work ... for the colours , do u use css ? Quote MS2 Link to comment Share on other sites More sharing options...
Salvo Posted August 28, 2003 Share Posted August 28, 2003 Hi all I am sorry enter in your discussion, but I like to install the tab pages unlimited and would like to know if the MULTI LANGUAGES is supported. I have intalled the information unlimited that said multi languages and it doesn't support it... (I don't know why) Thanks Salvo Quote Link to comment Share on other sites More sharing options...
sfoust Posted August 28, 2003 Author Share Posted August 28, 2003 azer: If you use the standard version, no, not specifically. Changing the defaults would effect the text color I'm sure, but I haven't investigated it. If you use the WYSIWYG version, yes. There is a pull down in the editor that allows you to choose setting from the CSS (boxText, errorBox, stockWarnings, infoBox, infoBoxContents, etc.). I don't know if adding a new type to CSS is automatically added to the list or if it is something you need to add by hand. I haven't gotten that far in the development of my site. Quote Link to comment Share on other sites More sharing options...
sfoust Posted August 28, 2003 Author Share Posted August 28, 2003 Salvo: The internal workings are still 'Information Pages Unlimited 1.1e'. I have seen that there is allot of infrastructure in the code for multi languages. When testing with the default site I notice that the tab system disappears when ever I change to one of the other languages (presumably because I haven't created a set of pages for that language). But, I really don't know how to switch languages on the admin side. You could try asking on this thread: http://www.oscommerce.com/forums/viewtopic.php?t=46434 Any info you get from that thread should work for Tab Pages. Quote Link to comment Share on other sites More sharing options...
sfoust Posted September 5, 2003 Author Share Posted September 5, 2003 Salvo: (and anyone else interested in multi languages) I think I figured out now multi languages are supported to work for Information Pages Unlimited (and there for Tab Pages Unlimited). From the very first admin page (the blue box screen) you will see a language pull-down in the upper right corner. Choose the language there first, before you continue on to Tab Manager. Let me know if this actually works for you (I didn't install the other language support files so I get an error). Scott. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2003 Share Posted September 12, 2003 Fatal error: Cannot redeclare tep_tab_image_button() (previously declared in /home/httpd/vhosts/rainbowstop.com/httpdocs/catalog/admin/includes/functions/tab_html_output.php:15) in /home/httpd/vhosts/rainbowstop.com/httpdocs/catalog/admin/includes/functions/tab_html_output.php on line 15 I get the following error and can you help me. it was working just fine.. and now it is not. Thank you Naomi Quote Link to comment Share on other sites More sharing options...
sfoust Posted September 12, 2003 Author Share Posted September 12, 2003 noppie, Humm, it WAS working but now it's not. That forces me to ask "What did you change ?!" :? This error means that the tab_html_output.php file is being 'required' twice some how. You could solve the problem by replacing the contents of that file with this code: <?php /* Module: Tab Pages Unlimited File date: 2003/03/02 Based on the FAQ script of adgrafics Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Released under the GNU General Public License */ // Output a function button in the selected language if (!function_exists(tep_tab_image_button)){ function tep_tab_image_button($image, $alt = '', $params = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/' . $image, $alt, '', '', $params); } } ?> But that is really fixing the symptom and not the cause. So if you changed something (and I know you did ;) ) then it would be best to find out where tab_html_output.php is being 'required' a second time. Maybe you pasted two of those lines into application_top.php. Scott. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2003 Share Posted September 12, 2003 Thank you Scott for the reply Your reply helped me to find the problem. I am just learning php-- which i love and so I don't have a great understanding and just didn't know where to look. In the 0scommerce 2.2 they have in the admin/includes/ a file called filenames.php and I had added the //BEGIN Tab pages unlimited define('TABLE_TAB', 'tab'); define('FILENAME_TAB_MANAGER', 'tab_manager.php'); require(DIR_WS_FUNCTIONS . 'tab_html_output.php'); //END Tab pages unlimited there and my application.top.php so when you said it may have been added twice to the :oops: application.top.php I knew where to look.. I fixed it and it works. so thank you so much. Naomi :D Quote Link to comment Share on other sites More sharing options...
Guest Posted September 27, 2003 Share Posted September 27, 2003 In the tab.php file, find: <?php echo $TAB_DESCRIPTION; ?> and replace it with: <?php if ( strlen($TAB_DESCRIPTION) - strpos($TAB_DESCRIPTION, '.php') == 4 ) require( $TAB_DESCRIPTION ); else echo $TAB_DESCRIPTION; ?> With this code in place, the tab system check to see if the last four characters of the discription is '.php'. If it is then the tab system will assume that it is a php file name and perform a require on it (try to load and execute that php file). Scott kewl mod dude,, thanks for all the hard work. If I may pick ya brain for a second.. I wanted to have a tab call a php file,, say conditons.php which is listed in the information box. the thought,, is to move it from information box to a tab,, I added the code u had given to check for last 4 being .php with that code in there,,, if its not php it works fine,, if i type in,, say,, conditions.php i get the following error. Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/pencilb/public_html/includes/functions/database.php:13) in /home/pencilb/public_html/includes/functions/database.php on line 13 actually,, it dont seem to matter what i type in,, if its a .php in the last 4 i get this same error.. any ideals on why it worked b4 and not for me,, i am running ms2 by the way anyway,, Thanks in advance for any thoughts or info. Regards Tom Quote Link to comment Share on other sites More sharing options...
msheno01 Posted October 13, 2003 Share Posted October 13, 2003 I am also getting the same error whenever I try to link the tab to a .php file. Any help? Thanks Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/pencilb/public_html/includes/functions/database.php:13) in /home/pencilb/public_html/includes/functions/database.php on line 13 Quote Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2003 Share Posted October 13, 2003 msheno01 I never got a reply either. I ended up hard coding the tabs in, but this has caused another problem,, the tab image always shows the selected tab, thus all my tabs look the same color regardless of selected or not, but untill Someone can advise otherwise, this is my only option. Would love to have this work as discribed,, Regards Tom Quote Link to comment Share on other sites More sharing options...
sfoust Posted December 31, 2003 Author Share Posted December 31, 2003 msheno01I never got a reply either. I ended up hard coding the tabs in, but this has caused another problem,, the tab image always shows the selected tab, thus all my tabs look the same color regardless of selected or not, but untill Someone can advise otherwise, this is my only option. Would love to have this work as discribed,, Regards Tom Qwiz, sorry for not getting back to you. I am not getting email alerts when messages are posted in this topic any more. Any how, to respond to your problem, you can't simply point the Tab system at most OSC php files and expect it to work. Most have many references to other parts of OSC that have already been called when the Tab page started up. To use your example of conditions.php, all the header and footer stuff needs to be removed. All you want is the code that strickly deals with the conditions.php tasks. I created a new file that I called conditions2.php with all necessary edits. Here it is: <?php /* $Id: conditions.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $ 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); ?> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_INFORMATION; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> Basicly remove everthing above <!-- body_text //--> and below <!-- body_text_eof //-->. And in the case of this example, you need to keep, require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONDITIONS); so that it can load it's language spicific defines. Hope this helps. Quote Link to comment Share on other sites More sharing options...
strat Posted March 7, 2005 Share Posted March 7, 2005 (edited) Hello, I try Tab Manager on OS 2.2 I'm great working this Contributions... I want type my tap picture a link. How can I use Link this tab image? For example... I've got ( NOTEBOOKS) image..on TAB... I want a type direct " www.mypage.com/notebooks.php" link. Do you help me? Thanks. [email protected] Edited March 7, 2005 by strat 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.