Jump to content

Gyakutsuki

♥Ambassador
  • Content count

    727
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Gyakutsuki

  1. Define_mainpage problem with ssl and non ssl : If you are with two server, one on ssl and on on nonssl, defin_mainpage write only on ssl. The problem is developp a code : If you are no ssl : no change If you are ssl : no change If you are ssl and nonssl : write mainpage in ssl and non ssl directory I am not a developper but i studied the code of mainpage. Here my observations and my proposition to developp a new code on mainpage.php with include ssl and nonssl Could you help me to develop a new code on these observations : Regards ###################################################################### The identified files in configure.php and mainpage.php admin/includes/Configure.php example with admin is in ssl and catalog is in nonssl in admin/includes/configure.php: ?define('DIR_WS_CATALOG', '/catalog/'); // absolute path required ?define('DIR_FS_CATALOG', '/home/httpd/vhosts/mysite.com/httpsdocs/catalog/'); // absolute path required httpdocs=ssl httpdoc=nonssl ?define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); ?define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); Original (if admin=nonssl and catalog=nonssl or admin=ssl and catalog=ssl only): No change line 45 at 47 (Files identifiction) ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; ? ? ? ?} else { ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; line 133 / 135 (130/148) Write mode verification ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; ? ?} else { ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; line 227 : Save the modification ? ? ? ? ? ?<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, 'current_path=' . DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_file_manager.gif', IMAGE_FILE_MANAGER) . '</a>'; ?></td> [/code] ------------------------------------------------------------------------------ My proposition if the catalog is included in ssl and nonssl include in configure.php ?define('DIR_WS_CATALOG_NONSSL', '/catalog/'); // absolute path required ?define('DIR_FS_CATALOG_NONSSL', '/home/httpd/vhosts/mysite.com/httpdoc/catalog/'); // absolute path required [/code] httpdoc = nonssl ?define('DIR_WS_CATALOG_LANGUAGES_NONSSL', DIR_WS_CATALOG . 'includes/languages/'); ?define('DIR_FS_CATALOG_LANGUAGES_NONSSL', DIR_FS_CATALOG . 'includes/languages/'); [/code] if admin=ssl and catalog=nonssl then write mainpage in ssl and mainpage nonssl line 45 at 47 ((Files identifiction) ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; ? ? ? ?} else { ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; + line 45 at 47 (idenitification du fichier) ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES_NONSSL . $HTTP_GET_VARS['filename']; ? ? ? ?} else { ? ? ? ? ?$file = DIR_FS_CATALOG_LANGUAGES_NONSSL . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; line 133 / 135 (130/148) Write mode verification ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; ? ?} else { ? ? ?$file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; + line 133 / 135 (130/148) Files write verification ? ? ?$file = DIR_FS_CATALOG_LANGUAGES_NONSSL . $HTTP_GET_VARS['filename']; ? ?} else { ? ? ?$file = DIR_FS_CATALOG_LANGUAGES_NONSSL . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; ? line 227 : Save the modification ? ? ? ? ? ?<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, 'current_path=' . DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_file_manager.gif', IMAGE_FILE_MANAGER) . '</a>'; ?></td> + ? ? ? ? ? ?<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, 'current_path=' . DIR_FS_CATALOG_LANGUAGES_NONSSL . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_file_manager.gif', IMAGE_FILE_MANAGER) . '</a>'; ?></td> #############################################################################
  2. Gyakutsuki

    Main page with ssl and nonssl

    Here the files code of define_mainpage.php in admin. <?php /* $Id: define_mainpage.php,v 1.2 2002/04/06 00:00:00 mattice Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce ////////////////////////////////////////////////////////////////////////// define_mainpage.php Version 1.2 DESCRIPTION: An extremely simple hack of define_languages.php, this file ALWAYS looks for the file mainpage.php in the language directory. This is a nice example to show how easy you can adapt existing code to your needs; apart from the translation and filename(s) I only had to add ONE SINGLE LINE to define_languages.php to make it into this. 06/04/02 Matthijs (mattice@xs4all.nl) This file has been edit to be up to date with the current snapshot...some minor and slight additions where added and simple little things where fixed: July 29, 2002 Steven Pignataro (steven_joseph_p@yahoo.com) ///////////////////////////////////////////////////////////////////////// Released under the GNU General Public License */ require('includes/application_top.php'); // This will cause it to look for 'mainpage.php' $HTTP_GET_VARS['filename'] = 'mainpage.php'; switch ($HTTP_GET_VARS['action']) { case 'save': if ( ($HTTP_GET_VARS['lngdir']) && ($HTTP_GET_VARS['filename']) ) { if ($HTTP_GET_VARS['filename'] == $language . '.php') { $file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; } else { $file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; } if (file_exists($file)) { if (file_exists('bak' . $file)) { @unlink('bak' . $file); } @rename($file, 'bak' . $file); $new_file = fopen($file, 'w'); $file_contents = stripslashes($HTTP_POST_VARS['file_contents']); fwrite($new_file, $file_contents, strlen($file_contents)); fclose($new_file); } tep_redirect(tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'])); } break; } if (!$HTTP_GET_VARS['lngdir']) $HTTP_GET_VARS['lngdir'] = $language; $languages_array = array(); $languages = tep_get_languages(); $lng_exists = false; for ($i=0; $i<sizeof($languages); $i++) { if ($languages[$i]['directory'] == $HTTP_GET_VARS['lngdir']) $lng_exists = true; $languages_array[] = array('id' => $languages[$i]['directory'], 'text' => $languages[$i]['name']); } if (!$lng_exists) $HTTP_GET_VARS['lngdir'] = $language; ?> <!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"> <script language="Javascript1.2"><!-- // load htmlarea //MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.5 Products Description HTML - Head _editor_url = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } <?php if (HTML_AREA_WYSIWYG_BASIC_DEFINE == 'Basic'){ ?> if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_basic.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } <?php } else{ ?> if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_advanced.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } <?php }?> // --></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- 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="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('lng', FILENAME_DEFINE_MAINPAGE, '', 'get'); ?> <td class="pageHeading"><?php echo BOX_CATALOG_DEFINE_MAINPAGE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '1', HEADING_IMAGE_HEIGHT); ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_pull_down_menu('lngdir', $languages_array, '', 'onChange="this.form.submit();"'); ?></td> </form></tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ( ($HTTP_GET_VARS['lngdir']) && ($HTTP_GET_VARS['filename']) ) { if ($HTTP_GET_VARS['filename'] == $language . '.php') { $file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['filename']; } else { $file = DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir'] . '/' . $HTTP_GET_VARS['filename']; } if (file_exists($file)) { $file_array = @file($file); $file_contents = @implode('', $file_array); $file_writeable = true; if (!is_writeable($file)) { $file_writeable = false; $messageStack->reset(); $messageStack->add(sprintf(ERROR_FILE_NOT_WRITEABLE, $file), 'error'); echo $messageStack->output(); } ?> <tr><?php echo tep_draw_form('language', FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'] . '&filename=' . $HTTP_GET_VARS['filename'] . '&action=save'); ?> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo $HTTP_GET_VARS['filename']; ?></b></td> </tr> <tr> <td class="main"><?php echo tep_draw_textarea_field('file_contents', 'soft', '80', '20', $file_contents, (($file_writeable) ? '' : 'readonly')); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right"><?php if ($file_writeable) { echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; } ?></td> </tr> </table></td> </form></tr> <?php if (HTML_AREA_WYSIWYG_DISABLE_DEFINE == 'Disable') {} else { ?> <script language="JavaScript1.2" defer> // MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.5 Products Description HTML - Body var config = new Object(); // create new config object config.width = "<?php echo DEFINE_MAINPAGE_WYSIWYG_WIDTH; ?>px"; config.height = "<?php echo DEFINE_MAINPAGE_WYSIWYG_HEIGHT; ?>px"; config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;'; config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>; // More Configs can added here: // Dreamscape added Dynamic Language Function editor_generate('file_contents',config); <?php } ?> </script> <?php } else { ?> <tr> <td class="main"><b><?php echo TEXT_FILE_DOES_NOT_EXIST; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><?php echo '<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir']) .' ">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td> </tr> <?php } } else { $filename = $HTTP_GET_VARS['lngdir'] . '.php'; ?> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="smallText"><a href="<?php echo tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'] . '&filename=' . $filename); ?>"><b><?php echo $filename; ?></b></a></td> <?php $dir = dir(DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir']); $left = false; if ($dir) { $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.')); while ($file = $dir->read()) { if (substr($file, strrpos($file, '.')) == $file_extension) { echo ' <td class="smallText"><a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'] . '&filename=' . $file) . '">' . $file . '</a></td>' . "\n"; if (!$left) { echo ' </tr>' . "\n" . ' <tr>' . "\n"; } $left = !$left; } } $dir->close(); } ?> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, 'current_path=' . DIR_FS_CATALOG_LANGUAGES . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_file_manager.gif', IMAGE_FILE_MANAGER) . '</a>'; ?></td> </tr> <?php } ?> </table></td> </tr> </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'); ?>
  3. Hello ! I have a problem with mainpage and ssl. My files are on 2 differents server one on http://www.bleu-lavande.com another on https://www.bleu-lavande.com (ssl server) When I try to change a text via my administration panel with mainpage. The update text is on https://www.bleu-lavande.com and no on http://www.bleu-lavande.com You can have the difference on this page http://www.bleu-lavande.com.eu/catalog/ https://www.bleu-lavande.com/eu/catalog/ The difference between the two is '.' after 'directeur' Could you help me solve this problem. Is it a bug on mainpage on just a little pb to solve ? How to save the text in the same time at NONSSL and SSL ? Thanks for your explanation and your help. It's importnat for me to solve this problem.
  4. Gyakutsuki

    Define Mainpage v 1.2 problems

    Hello ! I have a problem with mainpage and ssl. My files are on 2 differents server one on http://www.bleu-lavande.com another on https://www.bleu-lavande.com (ssl server) When i try to change a text via my administration panel with mainpage. The update text is on https://www.bleu-lavande.com and no on http://www.bleu-lavande.com You can have the difference on this page http://www.bleu-lavande.com.eu/catalog/ https://www.bleu-lavande.com/eu/catalog/ The diffrence between the two is '.' after 'directeur' Could you help me solve this problem. Is it a bug on mainpage on just a little pb to solve ? How to save the text in the same time at NONSSL and SSL ?
  5. Hello ! I have a problem with mainpage and ssl. My files are on 2 differents server one on http://www.bleu-lavande.com another on https://www.bleu-lavande.com (ssl server) When i try to change a text via my administration panel with mainpage. The update text is on https://www.bleu-lavande.com and no on http://www.bleu-lavande.com You can have the difference on this page http://www.bleu-lavande.com.eu/catalog/ https://www.bleu-lavande.com/eu/catalog/ The diffrence between the two is '.' after 'directeur' Could you help me solve this problem. Is it a bug on mainpage on just a little pb to solve ?
  6. Gyakutsuki

    ssl and mainpage

    Hello ! I have a problem with mainpage and ssl. My files are on 2 differents server one on http://www.bleu-lavande.com another on https://www.bleu-lavande.com (ssl server) When i try to change a text via my administration panel with mainpage. The update text is on https://www.bleu-lavande.com and no on http://www.bleu-lavande.com You can have the difference on this page http://www.bleu-lavande.com.eu/catalog/ https://www.bleu-lavande.com/eu/catalog/ The diffrence between the two is '.' after 'directeur' Could you help me solve this problem. Is it a bug on mainpage on just a little pb to solve ?
  7. I have installed pollbooth v2.0 but when i try to config pooboth in admin area, i have a problem. In fact, this problem is the link : pollbooth.php?action=config. Could you help to solve this problem ? Thank There the code for pollbooth boxe. <!-- polls //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_POLLS, // 'link' => '<a href ="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=polls') '</a>' 'link' => tep_href_link (FILENAME_POLLS, 'selected_box=polls') ); if ($selected_box == 'polls') { $contents[] = array('text' => // $heading[] = array('align' => // 'left', // 'text' => BOX_HEADING_POLLS, // 'link' => '<a href ="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=polls') '</a>' . tep_admin_files_boxes(FILENAME_POLLS, BOX_POLLS_POLLS) . //polls.php, tep_admin_files_boxes(FILENAME_POLLS1, BOX_POLLS_CONFIG) . // polls.php?action=config // <a href="' . tep_href_link(FILENAME_POLLS , 'action=config', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_POLLS_CONFIG . '</a>'); tep_admin_files_boxes(FILENAME_POLLBOOTH, BOX_POLLS_RESULTS) //pollbooth.php ); } // if ($selected_box == 'polls') { // $contents[] = array('align' => // 'left', // 'text' => '<a href="' . tep_href_link(FILENAME_POLLS, 'action=config', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_POLLS_CONFIG . '</a><BR><a href="' . tep_href_link(FILENAME_POLLS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_POLLS_POLLS . '</a><br>' . // '<a href="pollbooth.php?op=list" class="menuBoxContentLink">R?sultat sondages</a><br>' // tep_admin_files_boxes(FILENAME_POLLS, BOX_POLLS_CONFIG1) // tep_admin_files_boxes(FILENAME_POLLS, BOX_POLLS_CONFIG) // ); // } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- polls-eof //-->
  8. Hello ! 1/ Congratulation for this add on. i would change a little html code. When you tape a synthaxe and "enter" for a other sentence, a html code <p> lkhkjhk </p> is created. how to do for to have a lkjlkjljl <br> ? only 2/ A put a categorie description v1.5. This contribution allow to create a summary in a category. A want to include your code. How to do ? Thanks for your anwer.
  9. Gyakutsuki

    Image Catlog V1.32

  10. Gyakutsuki

    Image Catlog V1.32

    This add add on allows to insert 9 images in the product description. small image big image image deleted. To do : Delete the name of the image when this image is deleted. If you can help me (thanks) This add on works after the 29/06/2003. http://www.oscommerce.com/community/contributions,1327
×