Modul einbinden
am 08.03.2012 - 17:42 Uhr in
Hallo
ich bin neu bei Drupal. Habe Drupal 6.25 installiert.
Jetzt möchte ich dieses testmodul einbinden:
http://www.switchonthecode.com/sites/default/files/232/source/testmodule...
http://www.switchonthecode.com/tutorials/drupal-6-basic-javascript-w-jquery
Habe das Modul aktiviert. Wo kann ich das Modul auf der Frontseite sichtbar machen?
Danke!
- Anmelden oder Registrieren um Kommentare zu schreiben

Berechtigungen vergeben?
am 08.03.2012 - 18:20 Uhr
Das war anfangs immer mein Problem beim Installieren neuer Module ;-)
Auf Linux-Ebene sind alle
am 08.03.2012 - 18:35 Uhr
Auf Linux-Ebene sind alle Berechtigungen gesetzt.
Wäre nett, wenn jemand das testmodul bei sich testen könnte.
nix Linux
am 08.03.2012 - 22:07 Uhr
in Drupal bei den Benutzerberechtigungen ;-)
Hat keinen Effekt, egal ob
am 09.03.2012 - 08:16 Uhr
Hat keinen Effekt, egal ob die Haken bei Gast und auth. Benutzer gesetzt sind oder nicht.
Ich seh das Modul nicht im Frontend.
Hier das Modul:
testmodule.info
; $Id$name = Test Module
description = A test module to demonstrate various features.
core = 6.x
package = Test
testmodule.module
<?php
function testmodule_perm()
{
return array('access testmodule content');
}
function testmodule_menu()
{
$items = array();
$items['testmodule'] = array(
'title' => 'Test Module Page',
'page callback' => '_testmodule_page',
'access arguments' => array('access testmodule content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function testmodule_theme()
{
return array(
'testmodule_page' => array(
'template' => 'testmodule-page',
'arguments' => array('engines' => NULL),
),
);
}
function _testmodule_page()
{
$engines = array();
$engines[0] = array(
"model" => "CFM56", "root" => 2250,
"mid" => 2310, "tip" => 2295);
$engines[1] = array(
"model" => "GE90", "root" => 2300,
"mid" => 2322, "tip" => 2315);
$engines[2] = array(
"model" => "F404", "root" => 2380,
"mid" => 2399, "tip" => 2401);
$engines[3] = array(
"model" => "CF34", "root" => 2108,
"mid" => 2127, "tip" => 2118);
$engines[4] = array(
"model" => "TF39", "root" => 2090,
"mid" => 2106, "tip" => 2098);
return theme('testmodule_page', $engines);
}
?>
testmodule-page.tpl.module
<div id="testcontent"><table id="testmodule-table">
<thead>
<tr>
<td class="engine">Engine</td>
<td class="root">Root Bulk Temp. (R)</td>
<td class="mid">Mid Span Bulk Temp. (R)</td>
<td class="tip">Tip Bulk Temp. (R)</td>
</tr>
</thead>
<tbody>
<? for($i = 0; $i < count($engines); $i++) : ?>
<tr>
<td class="engine"><?= $engines[$i]['model'] ?></td>
<td class="root"><?= $engines[$i]['root'] ?></td>
<td class="mid"><?= $engines[$i]['mid'] ?></td>
<td class="tip"><?= $engines[$i]['tip'] ?></td>
</tr>
<? endfor; ?>
</tbody>
</table>
</div>