jpx10
16.02.2006, 14:21
Hallo zusammen
Ich habe unter www.ecombase.biz folgendes Posting platziert:
http://www.ecombase.biz/component/option,c...,0/topic,2156.0 (http://anonym.to/?http://www.ecombase.biz/component/option,com_smf/Itemid,35/expv,0/topic,2156.0)
Dabei riet mir der Moderator HarryBoo dieses Posting hier im neuen Forum zu publizieren.
Ich würde mich sehr freuen, wenn mir hier jemand weiterhelfen könnte.
Beste Grüsse
jpx10
EDIT:// Wir wollen doch die User nicht auf eb.biz abgleiten lassen oder? ;)
Darum hier der Post aus ecombase.biz.
Gruß Alucard
Hallo zusammen
Ich habe in meinen Shop das XTC 2er Modul Coolmenue eingebaut. Dieses funktioniert auch in der Version 3.4 ohne jegliche Probleme.
Nun wollte ich zusätzlich eine Funktion einbauen, bei welcher Kunden die javascript deaktiviert haben, auf das Konventionelle Menü umgeleitet werden. Dabei entdeckte ich eine OSC Contribution von Marc Zacher. Um diese einzubauen muss man einige Modifikationen an der catalog/includes/classes/boxes.php vornehmen. Die für die Modifikation benötigten Änderungen befinden sich auch in XTC etwa an der selben stelle. Einzig die zusätzliche Datei coolmenue.php soll unter catalog/includes/boxes abgelegt werden, was es bei XTC ja nicht gibt (Das Verzeichnis). Da ich kein Programmierer bin, stehe ich nun etwas verloren da. Wer kennt sich damit aus?
Ich publiziere hier mal die Contribution, möglicherweise ist es nur eine kleine Modifikation und jemand könnte mir einen Tipp geben, was ich anders machen muss.
''>ZITAT</div>
Instructions:
1. Backup your files
2. Replace the original coolmenu.php in catalog/includes/boxes by the
coolmenu.php included in this package.
DO NOT REPLACE catalog/includes/coolmenu.php !!!
3. Edit catalog/includes/classes/boxes.php
Perform the following changes (A to F):
A) in class tableBox
After line 20 between
Â* Â* var $table_data_parameters = '';
and
// class constructor
add the line
Â* Â* var $table_string = '';
so that it looks like:
Â* Â* var $table_data_parameters = '';
Â* Â* var $table_string = '';
// class constructor
B) in class tableBox
After around line 72 before
Â* Â* Â* return $tableBox_string;
add the line
Â* Â* Â* $this->table_string = $tableBox_string;
so that it looks like
Â* Â* Â* if ($direct_output == true) echo $tableBox_string;
Â* Â* Â* $this->table_string = $tableBox_string;
Â* Â* Â* return $tableBox_string;
C) in class infoBox
At around line 78 change the constructor from originally
Â* Â* function infoBox($contents) {
to
Â* Â* function infoBox($contents, $direct_output = true) {
D) class infoBox
Around line 83 at the end of the constructor change from
Â* Â* Â* $this->tableBox($info_box_contents, true);
Â* Â* }
to
Â* Â* Â* $this->tableBox($info_box_contents, $direct_output);
Â* Â* }
E) in class infoBoxHeading
At around line 103 change the constructor from originally
Â* Â* function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
to
Â* Â* function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {
F) in class infoBoxHeading
Around line 130 at the end of the constructor change from
Â* Â* Â* $this->tableBox($info_box_contents, true);
Â* Â* }
to
Â* Â* Â* $this->tableBox($info_box_contents, $direct_output);
Â* Â* }
4. Enjoy
[/b]
Nun die Datei welche bei OSC unter: catalog/includes/boxes abgelegt werden soll.
<?php
/ ------------------------------------------------
coolMenu for osCommerce
author: Andreas Kothe
url:Â* http://www.oddbyte.de
copyright: 2003 Andreas Kothe
modified: 2003-07-28 Marc Zacher
extended to work for javascript enanbled and disabled
with javascript disabled, the conventional categories box is shown
this extension is provided by Marc Zacher
The copyright notice of Andreas Kothe in the html output
has been removed and put in this header
since it would cause problems in javascript context.
Released under the GNU General Public License
------------------------------------------------
/
?>
<script type="text/javascript">
<!--
document.write(" <TR> <TD> ");
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
Â* Â* Â* Â* Â*'text'Â* => BOX_HEADING_CATEGORIES
Â* Â* Â* Â* );
$coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false);
$output_string = $coolmenuinfoboxheading->table_string;
$info_box_contents = array();
if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
} else {
$cat_choose = '';
}
$info_box_contents[] = array('text'Â* => '
images/trans.gif');
$coolmenuinfobox = new infoBox($info_box_contents, false);
$output_string .= $coolmenuinfobox->table_string;
//remove all html commments
$output_string = preg_replace("//", "", $output_string);
//escape all occurences of "
$output_string = preg_replace('/"/', '\"', $output_string);
//escape all occurences of /
$output_string = preg_replace('/\//', '\/', $output_string);
//remove trailing \n
$output_string = preg_replace('/\\n+$/', '', $output_string);
//replace all \n with ");\ndocument.write("
$output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string);
//prepend document.write at the beginning and append ");\n
$output_string = "document.write(\"" . $output_string . "\");\n";
echo $output_string;
?>
document.write(" <\/TD> <\/TR> ");
//--> </script>
<noscript>
<?php
include(DIR_WS_BOXES . 'categories.php');
?>
</noscript>
Was müsste man da genau ändern?
Für jede noch so kleine Hilfe ein grosses DANKESCHÖN
Ich habe unter www.ecombase.biz folgendes Posting platziert:
http://www.ecombase.biz/component/option,c...,0/topic,2156.0 (http://anonym.to/?http://www.ecombase.biz/component/option,com_smf/Itemid,35/expv,0/topic,2156.0)
Dabei riet mir der Moderator HarryBoo dieses Posting hier im neuen Forum zu publizieren.
Ich würde mich sehr freuen, wenn mir hier jemand weiterhelfen könnte.
Beste Grüsse
jpx10
EDIT:// Wir wollen doch die User nicht auf eb.biz abgleiten lassen oder? ;)
Darum hier der Post aus ecombase.biz.
Gruß Alucard
Hallo zusammen
Ich habe in meinen Shop das XTC 2er Modul Coolmenue eingebaut. Dieses funktioniert auch in der Version 3.4 ohne jegliche Probleme.
Nun wollte ich zusätzlich eine Funktion einbauen, bei welcher Kunden die javascript deaktiviert haben, auf das Konventionelle Menü umgeleitet werden. Dabei entdeckte ich eine OSC Contribution von Marc Zacher. Um diese einzubauen muss man einige Modifikationen an der catalog/includes/classes/boxes.php vornehmen. Die für die Modifikation benötigten Änderungen befinden sich auch in XTC etwa an der selben stelle. Einzig die zusätzliche Datei coolmenue.php soll unter catalog/includes/boxes abgelegt werden, was es bei XTC ja nicht gibt (Das Verzeichnis). Da ich kein Programmierer bin, stehe ich nun etwas verloren da. Wer kennt sich damit aus?
Ich publiziere hier mal die Contribution, möglicherweise ist es nur eine kleine Modifikation und jemand könnte mir einen Tipp geben, was ich anders machen muss.
''>ZITAT</div>
Instructions:
1. Backup your files
2. Replace the original coolmenu.php in catalog/includes/boxes by the
coolmenu.php included in this package.
DO NOT REPLACE catalog/includes/coolmenu.php !!!
3. Edit catalog/includes/classes/boxes.php
Perform the following changes (A to F):
A) in class tableBox
After line 20 between
Â* Â* var $table_data_parameters = '';
and
// class constructor
add the line
Â* Â* var $table_string = '';
so that it looks like:
Â* Â* var $table_data_parameters = '';
Â* Â* var $table_string = '';
// class constructor
B) in class tableBox
After around line 72 before
Â* Â* Â* return $tableBox_string;
add the line
Â* Â* Â* $this->table_string = $tableBox_string;
so that it looks like
Â* Â* Â* if ($direct_output == true) echo $tableBox_string;
Â* Â* Â* $this->table_string = $tableBox_string;
Â* Â* Â* return $tableBox_string;
C) in class infoBox
At around line 78 change the constructor from originally
Â* Â* function infoBox($contents) {
to
Â* Â* function infoBox($contents, $direct_output = true) {
D) class infoBox
Around line 83 at the end of the constructor change from
Â* Â* Â* $this->tableBox($info_box_contents, true);
Â* Â* }
to
Â* Â* Â* $this->tableBox($info_box_contents, $direct_output);
Â* Â* }
E) in class infoBoxHeading
At around line 103 change the constructor from originally
Â* Â* function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
to
Â* Â* function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false, $direct_output = true) {
F) in class infoBoxHeading
Around line 130 at the end of the constructor change from
Â* Â* Â* $this->tableBox($info_box_contents, true);
Â* Â* }
to
Â* Â* Â* $this->tableBox($info_box_contents, $direct_output);
Â* Â* }
4. Enjoy
[/b]
Nun die Datei welche bei OSC unter: catalog/includes/boxes abgelegt werden soll.
<?php
/ ------------------------------------------------
coolMenu for osCommerce
author: Andreas Kothe
url:Â* http://www.oddbyte.de
copyright: 2003 Andreas Kothe
modified: 2003-07-28 Marc Zacher
extended to work for javascript enanbled and disabled
with javascript disabled, the conventional categories box is shown
this extension is provided by Marc Zacher
The copyright notice of Andreas Kothe in the html output
has been removed and put in this header
since it would cause problems in javascript context.
Released under the GNU General Public License
------------------------------------------------
/
?>
<script type="text/javascript">
<!--
document.write(" <TR> <TD> ");
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
Â* Â* Â* Â* Â*'text'Â* => BOX_HEADING_CATEGORIES
Â* Â* Â* Â* );
$coolmenuinfoboxheading = new infoBoxHeading($info_box_contents, true, false, false, false);
$output_string = $coolmenuinfoboxheading->table_string;
$info_box_contents = array();
if (MAX_MANUFACTURERS_LIST < 2) {
$cat_choose = array(array('id' => '', 'text' => BOX_CATEGORIES_CHOOSE));
} else {
$cat_choose = '';
}
$info_box_contents[] = array('text'Â* => '
images/trans.gif');
$coolmenuinfobox = new infoBox($info_box_contents, false);
$output_string .= $coolmenuinfobox->table_string;
//remove all html commments
$output_string = preg_replace("//", "", $output_string);
//escape all occurences of "
$output_string = preg_replace('/"/', '\"', $output_string);
//escape all occurences of /
$output_string = preg_replace('/\//', '\/', $output_string);
//remove trailing \n
$output_string = preg_replace('/\\n+$/', '', $output_string);
//replace all \n with ");\ndocument.write("
$output_string = preg_replace('/\\n/', "\");\ndocument.write(\"", $output_string);
//prepend document.write at the beginning and append ");\n
$output_string = "document.write(\"" . $output_string . "\");\n";
echo $output_string;
?>
document.write(" <\/TD> <\/TR> ");
//--> </script>
<noscript>
<?php
include(DIR_WS_BOXES . 'categories.php');
?>
</noscript>
Was müsste man da genau ändern?
Für jede noch so kleine Hilfe ein grosses DANKESCHÖN