Jump to content

Demitry

Members
  • Content count

    352
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Demitry

  1. @Tsimi hey Lambros, I am almost finished with those two menu modules and my site header is looking really great! I'm having a problem with the divider not displaying in the XS version. I added the insert statement to function install() and the MODULE_CONTENT_HEADER_CATMENU_XS_DIVIDER to the function keys() array in /includes/modules/content/header/cm_header_catmenu_xs.php ..then checked in admin and it shows the divider as enabled. However, it is not displaying in the actual menu. Do you know what it could be? did I miss something? btw, I found this javascript fix for when the dropdown-menu goes off screen, ..in case you want to use it. I just added it to the script in /includes/modules/content/header/templates/catmenu.php bottom of page. // fix for when the dropdown menu goes off screen $(document).on('shown.bs.dropdown', function () { OffsetDropdown() $(window).on('resize.bs.dropdown', function () { OffsetDropdown() }) }) $(document).on('hide.bs.dropdown', function() { $(window).off('resize.bs.dropdown') }) var OffsetDropdown = function() { var dropdown = $('.open>.dropdown-menu') if (dropdown.length == 0) return var rightOffset = dropdown.offset().left + dropdown.width() var browserWidth = $('body').innerWidth() var neededLeftOffset = dropdown.position().left - (rightOffset - browserWidth) if (neededLeftOffset < 0) { dropdown.css({ left: neededLeftOffset - 3 }) } else { dropdown.css({ left: 0 }) } }
  2. @Tsimi Lambros, Thanks man! That really helps... I've modified the catmenu_xs.php templates to include the header buttons and a hamburger menu icon for tablets and mobile. For some reason I thought the end of the class file was the way to go because the list structure is defined there, but I'll def use the template files instead. Thanks again. Demitry
  3. @Tsimi Right, that's what I thought. I don't think it should be a problem. I think it's just adding some <li></li> links code towards the end of the related class files. I'll have to take a look and see.
  4. @Tsimi hey Lambros, How do I add pages to the menu for both modules? Pages like About Us, Contact, FAQ, etc., I looked for something in the admin area - kind of like WordPress has where you add pages and add them to the menu, but could not find it. Or do I need to hard code them into both modules? I should add that I will be using the menus for more than just categories.
  5. @Tsimi Lambros, no worries man, ..there's no need to change it, I was just making a suggestion. I installed BS Edge about a month and half back and am learning the new osC structure all over again. It's good stuff, though it's not a turn-key solution and contrary to Burt and other top contributors, ..I believe it should be.
  6. @Tsimi one minor correction: in change #1 of my aforementioned post above,… removed class hidden-sm on line 18… fantastic contribution! ..should really be a default or integrated option for osC BS Edge. If there is one thing I’d suggest is to minify and combine the two javascript files into one and add the css from /ext/menu_xs/css/component.css and the css code in /includes/modules/content/header/templates/catmenu.php to the user.css file. This would reduce the number of resources called in /includes/modules/content/header/templates/catmenu_xs.php file from three to one and help with page loading speed. However, I realize that these changes would also add an extra step to the installation (via the user.css file addition) and make it slightly more technical for the non-techie user.
  7. @Tsimi hey Lambros, I appreciate the follow-up. Actually, I did not need to change any of the CSS for that. The default state of the navbar collapse break-point is 992px (I think). And I needed it to be 767px. So, I resolved it by making the following two changes. 1) /includes/modules/content/header/templates/catmenu.php removed class hidden-sm on line 17, so that it looks like this: echo '<div id="catMenu" class="col-sm-12 hidden-xs">'; 2) /includes/modules/content/header/templates/catmenu_xs.php removed class visible-sm on line 20, so that it looks like this: <div id="dl-menu" class="dl-menuwrapper visible-xs" style="z-index:10000;"> That's it! Works awesome! ...and btw, I love that it is two separate modules, because this way I can just change the sort order and make the XS menu display at the top of the page for mobile devices. Thank you for all your help. Demitry
  8. @Tsimi cool, ..thanks Lambros somehow I had to write three paragraphs to say that I needed to change the brake-points for when the navbar collapses. lol I'll take a look at these links now.
  9. @Tsimi hey Lambros, ..thank you for the reply. yeah, I thought that containing span tag was unnecessary, but I figured I'd stay consistent with the rest of the contribution because /includes/classes/catmenu.php has the same nested span set on line 70. I'll remove them in both files. As far as the other thing, I'm a bit new to BS and I did not want to alter that BS grid structure for XS and SM. I'll take a look at that file today. I redesigned the header layout and was looking to have the horizontal menu change to the compact mobile version, but at a screen width that would accommodate my layout design. That change needs to be made where the screen width is smaller than the one controlled by the BS grid for XS and SM. So, I need to find a solution to somehow manage that switch, ..whether from the user.css file or some other place. Is there a specific file and code block where I could change it so that it responds to my own setting for screen width to switch over to the compact mobile version menu? Thanks.
  10. @Tsimi Also, I found a minor error: in /includes/classes/catmenu_xs.php line 64 is missing an opening <span> tag for the nested span set. It should be: $root_link_title = '<strong><span><span class="fa fa-list fa-lg"></span>&nbsp;' . $link_title . '</span></strong>';
  11. @Tsimi Hi, ..very nice contribution! I know the instructions file says that XS menu will only show in SM and XS viewport however, I was wondering if there is a way to have this altered to respond to media screen width instead?, ..or perhaps there is another responsive menu module that I could use with the Horizontal Categories Menu?
  12. Demitry

    [Addon} Theme Switcher

    ok Jim, I do have the latest version and my version is arranged the same way, but the ../navbar_modules/templates/ all have to do with that black bar at the top of the page and not the rest of the header. I understand that this thread is support for the Theme Switcher addon, and I am trying to change the theme layout,.. hence, why I posted here. However, I will try the 2.3.4-BS-Edge forum. Thank you for your help. Demitry
  13. Demitry

    [Addon} Theme Switcher

    @kymation Jim, That file cm_navbar.php is not the header module. It is one of the sub-modules that the header is composed of. It is that top black bar that contains the osCommerce link on the left and the shopping cart link on the right (by default). So, /includes/template_top.php requires the /includes/header.php file, which calls $oscTemplate->getContent('header'); I get that all the header templates for the header are located via /includes/modules/content/header/templates/... However, where are all these header sub-modules / elements / templates,.. structured into the actual header? There has to be a file where these elements are all compiled to form the header.
  14. Demitry

    [Addon} Theme Switcher

    @kymation @frankl I found this online and it's of great value in regards to how Boostrap is structured via CSS, but I am still a bit at a loss as how to move these elements around in 2.3.4-BS-Edge. https://getbootstrap.com/docs/3.3/css/ For example the header has 5 templates of elements, but I cannot figure out where these are constructed to form the header. If I know this piece, then I can use CSS based on the grid to position them where I need them. It seems like there are so many files to construct each element and section of the page that it gets a bit confusing. Once I figure this out, it should be fine, and I will make appropriate CSS adjustments where needed for each of the 4 browser resizing points. I just need to know how this is all constructed. If there is any documentation on this, that would certainly help. Thanks.
  15. Demitry

    [Addon} Theme Switcher

    ok, good point, ..thanks Jim So, where do I change the layout for,.. lets say the header? Is it in the /includes/modules/content/header/templates/... and related CSS classes? Where is all this compiled?, on the individual page? or is there a grid of some sort that is sectioned into zones? Still struggling with the new structure.
  16. Demitry

    [Addon} Theme Switcher

    I can work with css, but I was looking more to re-positioning the divs and recreating the layout structure for the header, footer, menu, and main body. The default layout is nice, but plain and the Theme Switcher only changes the layout colors.
  17. Demitry

    [Addon} Theme Switcher

    Thanks Frank, ..any documentation on customizing the header and footer? I'm still trying to get familiarized with the file structure and code.
  18. Demitry

    [Addon} Theme Switcher

    Actually a couple of other changes in that /includes/template_top.php file with the jquery version and the font-awesome style-sheet version.
  19. Demitry

    [Addon} Theme Switcher

    Hi, I just installed it and the instructions mention only the one line change in the /includes/template_top.php file, however, I noticed that there was another change made. The viewport meta tag had the following content attribute removed in the add-on file: shrink-to-fit=no If this is a needed change, the instruction documentation should be updated. Also, possibly in a future release, it would be good to have a preview of each theme in admin because as of right now, you have to change it, save it, and then go to the home page and refresh it. Even a selection of screenshot thumbs would be good on that admin page. I was really looking to change the layout some like that of the header, footer, menu and main body. I'm not sure if there is an addon for this or any documentation on how to customize these areas. Any help would be greatly appreciated. Thanks.
  20. Demitry

    Database Optimizer

    Phil, ...agreed, ..and that's pretty much what I always try to do. Though as for the tables and nested tables, this is legacy osC code and we will likely be poking fun the same way at divs and nested divs at some point in the near future. :) The issues I brought up are minor and do not affect the functionality of Jack's code and his fantastic contribution.
  21. Demitry

    Database Optimizer

    Phil, ..yeah, I know the nested tables are pretty bad, lol Jack, The code I posted above has no errors displayed. This is my "altered" file. The particular form in question on your uploaded file opens the form inside of a closed <td></td> tags set and closes that form outside of a </tr> tag. So, ...even if you can structure a form as <form><tr><td></td></tr></form> (by removing that closed </td> tag),... it is not proper structure to have an open <tr> tag follow an open <td> tag, which would be the case if you removed that closed </td> tag. As in,... <td><form><tr><td> ... </td></tr></form></td> I only wanted to bring this to your attention to keep the code structure clean. What you do with it is completely your choice. I've already made the change in my file and I am happy with them.
  22. Demitry

    Database Optimizer

    I've never done that and I'm not sure how to do it. I can just paste that code for the page here and you can copy it into a file and look at it in DreamWeaver. Just a precaution for anyone else who looks at this code, ..This code has my modifications and will not work on your site without modifications to other files, so don't use it! <?php /* $Id: database_optimizer_cron.php,v 1.0 2011/02/02 database_optimizer_cron.php Originally Created by: Jack_mcs - http://www.oscommerce-solution.com osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Portions Copyright 2011 oscommerce-solution.com Released under the GNU General Public License */ require('includes/application_top.php'); require('includes/database_optimizer_db_handler.php'); require('includes/languages/english/database_optimizer/database_optimizer_need_help.php'); DO_CheckDatabase(); $actionRunOptimizer = ((isset($_POST['action_run_optimizer']) && $_POST['action_run_optimizer'] == 'process') ? true : false); $currentVersion = ''; $message = ''; /********************** BEGIN VERSION CHECKER *********************/ if (file_exists('includes/functions/version_checker.php')) { require('includes/languages/' . $language . '/version_checker.php'); require('includes/functions/version_checker.php'); $contribPath = 'http://addons.oscommerce.com/info/4441'; $currentVersion = 'Database Optimizer V 1.6'; $contribName = 'Database Optimizer V'; $versionStatus = ''; } /********************** END VERSION CHECKER *********************/ if (isset($_POST['action'])) { /********************** CHECK THE VERSION ***********************/ if ($_POST['action'] == 'getversion') { if (isset($_POST['version_check']) && $_POST['version_check'] == 'on') { $versionStatus = AnnounceVersion($contribPath, $currentVersion, $contribName); } } } else if ($actionRunOptimizer) { $forceOptimize = true; //this is being ran manually so ignore the setting for optimizing require('includes/functions/database_optimizer.php'); require('includes/modules/database_optimizer.php'); if (! $optionSelected) { $messageStack->add(ERROR_NO_OPTION_SELECTED, 'error'); } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <link rel="stylesheet" type="text/css" href="includes/database_optimizer.css"> <script type="text/javascript" src="includes/general.js"></script> <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css" type="text/css"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js"></script> <script type="text/javascript"><!-- function showHelp(page) { //console.log('show help '+page); $( "#do_help" ).dialog({ show: "fade", hide: "fade", position: ['middle',100], width: 600, height: 400, modal: true, open: function(event, ui) { $(this).load(page); } //, buttons: { "Ok": function() { $(this).dialog("close"); } } }); } function ToggleBoxes(cnt) { for (i = 0; i < cnt; i++) { var id = 'opt_'+ i; if (document.getElementById(id).checked == true) { document.getElementById(id).checked = false; } else { document.getElementById(id).checked = true; } } } //--></script> <style type="text/css"> table.BorderedBox {border:1px solid #ddd; background-color:#eee; } .do_small { float:right;font-family:Verdana, Arial, sans-serif; font-size:10px; font-weight:bold; color:#ff0000 } .do_small_inline { display:inline-block; font-family:Verdana, Arial, sans-serif; font-size:10px; font-weight:bold; color:#ff0000 } </style> <script type="text/javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=800,height=800,screenX=150,screenY=150,top=15,left=15') } //--></script> </head> <body> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="BorderedBox"> <tr> <td><table border="0" width="40%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo str_replace(" ", "&nbsp;", $currentVersion); ?></td> </tr> <tr> <td class="smallText" valign="top"><?php echo HEADING_TITLE_SUPPORT_THREAD; ?></td> </tr> </table></td> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"><?php echo HEADING_TITLE_AUTHOR; ?></td> </tr> <?php if (function_exists('AnnounceVersion')) { $idParts = explode(' ', $currentVersion); foreach ($idParts as $part) { if ($part !== 'V') { $name .= $part; } else { break; } } $id = $idParts[count($idParts)-1]; if (DATABASE_OPTIMIZER_ENABLE_VERSION_CHECKER == 'true') { ?> <tr> <td style="float:right"> <table border="0" cellpadding="0"> <tr> <td class="do_small"><?php echo AnnounceVersion($contribPath, $currentVersion, $contribName); ?></td> <td class="do_small"><INPUT style="vertical-align:middle; margin-top:3px" type="radio" name="version_check_unreleased" onClick="window.open('http://www.oscommerce-solution.com/check_unreleased_updates.php?id=<?php echo $id; ?>&name=<?php echo $name; ?>')"><span style="vertical-align:top"><?php echo TEXT_VERSION_CHECK_UPDATES_UNRELEASED; ?></span></td> </tr> </table></td> </tr> <?php } elseif (tep_not_null($versionStatus)) { echo ' <tr><td class="do_small">' . $versionStatus . '</td></tr>'; } else { $open_form = tep_draw_form('version_check', FILENAME_DATABASE_OPTIMIZER, '', 'post') . tep_draw_hidden_field('action', 'getversion'); ?> <tr> <td style="float:right"><?php echo $open_form; ?><table border="0" cellpadding="0"> <tr> <td class="do_small_inline"><INPUT style="vertical-align:middle; margin-top:0px" type="radio" name="version_check" onClick="this.form.submit();"><?php echo TEXT_VERSION_CHECK_UPDATES; ?></td> <td class="do_small_inline"><INPUT style="vertical-align:middle; margin-top:0px" type="radio" name="version_check_unreleased" onClick="window.open('http://www.oscommerce-solution.com/check_unreleased_updates.php?id=<?php echo $id; ?>&name=<?php echo $name; ?>')"><?php echo TEXT_VERSION_CHECK_UPDATES_UNRELEASED; ?></td> </tr> </table></form></td> </tr> <?php } // if (DATABASE_OPTIMIZER_ENABLE_VERSION_CHECKER == 'true') } else { ?> <tr> <td class="do_small"><?php echo TEXT_MISSING_VERSION_CHECKER; ?></td> </tr> <?php } // if (function_exists('AnnounceVersion')) ?> </table></td> </tr> <tr> <td class="do_small tt"><div style="float:right; margin-bottom:10px; color:sienna; text-align:center"><?php echo TEXT_HELP; ?></div></td> </tr> </table></td> </tr> <!-- BEGIN LOWER SECTION --> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <!-- BEGIN DELETE AND GENERATE FILE --> <tr> <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right"><?php echo tep_draw_form('database_optimizer', FILENAME_DATABASE_OPTIMIZER, '', 'post') . tep_draw_hidden_field('action_run_optimizer', 'process'); ?><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><input type="checkbox" name="toggle_boxes" onClick="return ToggleBoxes('<?php echo count($optionsArray); ?>');"></td> <td colspan="2" class="smallText">Select ALL</td> </tr> <?php $idx = 0; foreach ($optionsArray as $option) { ?> <tr> <td><input type="checkbox" name="<?php echo $option['post']; ?>" id="<?php echo 'opt_' . $idx; ?>"></td> <td class="smallText"><?php echo $option['option']; ?></td> <td class="smallText"><?php echo $option['explain']; ?></td> </tr> <?php $idx++; } // foreach ?> <tr> <td colspan="3" align="center" style="padding:25px;"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE);?></td> </tr> </table></form></td> </tr> </table></td> </tr> </table></td> </tr> <!-- END DELETE AND GENERATE FILE --> <!-- BEGIN SHOW THE RESULTS --> <?php if (tep_not_null($message)) { ?> <tr> <td colspan="2" class="smallText" style="padding:10px 0px 5px 10px;"><?php echo str_replace("\r\n", "<br>", $message); ?></td> </tr> <?php } ?> <!-- END SHOW THE RESULTS --> <tr> <td class="main" style="padding:20px 0px 20px 10px;"><span style="font-weight:bold; color:red;">Please Note:</span> All settings for this Database Optimization feature can be managed on the <a href="configuration.php?gID=5011" style="font-size:12px;">Database Optimizer configuration</a> page. </td> </tr> <tr> <td colspan="2" class="main" style="padding:10px 0px 5px 10px;"><div style="width:75%;"><?php echo DO_TEXT_MAIN; ?></div></td> </tr> <!-- END LOWER SECTION --> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  23. Demitry

    Database Optimizer

    right, but removing the closing </td> tag will not resolve it, because then it is followed by an open <tr> tag (as in... <td><form><tr>). Here is a screenshot of how I changed it (including some other edits). Thank you for the cron job clarification. I initially thought that if that ON/OFF setting is turned to ON, then it would initiate the cron job based on the number of days increment. However, I am glad that I do not have to turn it on and off to apply a manual run. Thank you for that.
  24. Demitry

    Database Optimizer

    Jack, That line is 187 and the form closing tag is on line 211. I got that line number from your file not my changed one. Here is a screenshot of it in DreamWeaver to show what I'm talking about. This shows the whole second form and some of the other stuff I mentioned.
  25. Demitry

    Database Optimizer

    I checked again, and I did download the latest version (V 1.6) that was from Jan 15th this year. Does keeping the ON/OFF setting to ON in configuration, automatically make it a cron job? In other words, if I only wanted to run it manually, would I have to keep that setting turned off and only turn it on when I wanted to run the optimization?
×