Eigene Boxen wurden bisher so /templates/Honeygrid/source/boxes/sample_box.php abgelegt. In welchen Ordner müssen oder sollen die in GXModule hin??? In der GXModule-Anleitung ist da leider nichts aufgeführt.
Und gleich die nächste Frage! Wo pack ich in GXModules eigene Bilder/Icons hin, welche ich für Module benötige? Eigene Fonts?
Versuch für die Boxen mal /GXModules/<Modulhersteller>/<Modul>/Shop/Templates/Honeygrid/Source/Boxes. Wie bindest du die Bilder denn ein? Hast du mal ein Codebeispiel?
Das wäre ein Beispiel im Adminbereich: Code: $ratingimg = xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $select_comment['comment_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $select_comment['comment_rating']));
Wenn man einen Ordner Images hätte, könnte man das ja dahin packen. Nur weis ich nicht ob GXModules so einen Ordner verträgt?
Source/Boxes geht nicht! WARNING(2): "include(/var/www/vhosts/******************/httpdocs/templates/Honeygrid/source/boxes/calender.php): failed to open stream: No such file or directory"
Soweit ich das weiß ist es relativ egal, was für zusätzliche Ordner man sich noch in sein Modulverzeichnis packt. Hmm, ok dann muss ich da noch mal schauen
Erstellst du den ContentView nach folgendem Beispiel? PHP: class SampleBoxLayoutContentView extends SampleBoxLayoutContentView_parent{ public function prepare_data() { parent::prepare_data(); if($GLOBALS['coo_template_control']->get_menubox_status('sample_box')) { include(DIR_WS_BOXES . 'sample_box.php'); } }} Dann musst du das DIR_WS_BOXES in deinem include entfernen und da den Pfad zu deiner Datei rein werfen
So geht das noch besser, da ich dann den Ordner nicht mehr benötige! PHP: class BlogLayoutContentView extends BlogLayoutContentView_parent{ public function prepare_data() { if(gm_get_conf('MODULE_CENTER_BLOG_INSTALLED') == 1) { parent::prepare_data(); if($GLOBALS['coo_template_control']->get_menubox_status('blog')) { $sampleBox = MainFactory::create_object('BlogContentView'); $boxHtml = $sampleBox->get_html(); $boxPos = $GLOBALS['coo_template_control']->get_menubox_position('blog'); $this->set_content_data($boxPos, $boxHtml); } if($GLOBALS['coo_template_control']->get_menubox_status('calender')) { $coo_calender = MainFactory::create_object('CalenderContentView'); $t_box_html = $coo_calender->get_html(0); $boxPosition = $GLOBALS['coo_template_control']->get_menubox_position('calender'); $this->set_content_data($boxPosition, $t_box_html); // include('GXModules/IndivStyle/Blog/Shop/Templates/Honeygrid/Source/Boxes/calender.php') } } else { parent::prepare_data(); } } }
Ich führe das mal gleich hier weiter. Wie sieht es mit eigenen Smartyfunktionen aus? GXModules/Modulebauer/Modulname/Shop/Templates/Honeygrid/Smarty ???
@Steffen (indiv-style.de) Smarty Funktionen müssen im Ordner GXModules/Modulebauer/Modulname/Shop/SmartyPlugins/ sein. Der Ordner SmartyPlugins kann auch tiefer verschachtelt sein.