Basics: Was sind Inhaltsmodule - What is a content module

Tutorien zu Inhaltsmodulen
Tutorials for content modules

Basics: Was sind Inhaltsmodule - What is a content module

Beitragvon Stoffel » Do 22. Apr 2010, 10:36

*************** english text follows after the german **********************

Inhaltsmodule stehen ab der Version 1.2 zur Verfügung

Inhaltsmodule sind kleine Code-Blöcke geschrieben in HTML/PHP, mit denen sich zusätzliche Funktionen in die Webseite integrieren lassen.

Zu Integration muss zunächst ein Modul programmiert werden. Das hört sich vielleicht schlimmer an, als es ist, aber wer sich ein wenig mit HTML und PHP auskennt dem gelingen schnell Ergebnisse.

Grundlagen:
1. Ein Seitenmodul ist in PHP und/oder HTML geschrieben
2. Module werden in einem Verzeichnis gespeichert, welches den Namen des Moduls in Kleinbuchstaben enthält. Z.B: sitemap
3. Der Name der Datei muss immer mod_modulname.php lauten, auch wenn sie nur HTML-Code enthält. Z.B.: mod_sitemap.php, mod_contact.php
4. innerhalb des Ordners sollte eine readme.txt Datei existieren, in der die Funktion des Moduls beschrieben ist (Beispiel s. vorhandene Module)
5. eine leere index.html Seite sollte in dem Ordner gespeichert werden (als Vorlage kann eine Datei aus den existierenden Modulen dienen)

Nun muss das Modul noch im Ordner /modules gespeichert werden.

Nachfolgend die Struktur eines Inhaltsmoudls, wenn es richtig aufgesetzt wurde:
Code: Alles auswählen
/modules
   /modulename
       readme.txt
       index.html
       mod_modulename.php


Zum Thema "Porgrammierung" eines Moduls bitte das Tutorial "Programmierung eines Inhaltsmoduls" lesen

************************* ENGLISH *********************
Content modules are available as of version 1.2

Content modules are little code snipptes written in HTML/PHP to add some functionality to your webpages as they could be integrated into your page by the editor.

First of all you need to program such a module using HTML/PHP. That sounds much more complicated as it is. Read the other thread "Programming a page module" to get a basic understanding.

Basics:
1. A page module is written in PHP and/or HTML
2. Modules are saved in a folder that has the same name as the module and is written in lower case, e.g. sitemap
3. The name of the file has to be mod_modulename.php, even if it contains only HTML-code. E.B.: mod_sitemap.php, mod_contact.php
4. within the folder you should create a file readme.txt, that describes the function of the module(for an example study the existing readme in the existing module folders)
5. you should also save an empty index.html page inside the folder (use the existing file from the other modules)

Now the complete module (folder) has to be saved within the folder /modules on your webserver.

The folder structure should look like this if you folllow the instructions:

Code: Alles auswählen
/modules
   /modulename
       readme.txt
       index.html
       mod_modulename.php


To learn how to program a page module read the thread about "Programming a page module".
Stoffel
Administrator
 
Beiträge: 40
Registriert: Di 23. Mär 2010, 08:42

Zurück zu Tutorials Content Modules



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast

cron