Wordpress Plugin Include-File-Source
Wordpress Plugin Include-File-Source
WP Include-File-Source is a simple Wordpress plugin for publishing source codes which are saved as files in the system of your server or web space. It uses the well known SyntaxHighlighter plugin to generate proper code visualization, t.m. you need to install this plugin, too.
WP Include-File-Source ist ein simples Plugin für Wordpress, um Quelltexte zu veröffentlichen, die als Dateien auf Deinem Server bzw. Webspace gespeichert sind. Es greift für die farbliche Hervorhebung des Textes auf das bekannte SyntaxHighlighter plugin zurück (d.h. dieses Plugin sollte ebenfalls installiert sein).
Features
- Easy handlung using the short tag [
include-source
] - No configuration required
- Auto-detection code languages from file extensions
- Optional
type="language"
tag to specify the highlighting type manually - Including multiple files in one source code block
Features
- Einfache Handhabung mit dem Short-tag [
include-source
] - Keine Konfiguration notwendig
- Auto-detection der Programmiersprache durch die Dateiendung
- Optionales
type="language"
-tag für manuelle Eingabe der Sprache - Möglichkeit mehrere Dateien in einen Code-Block einzubetten
Requirements, download and installation
As the plugin core is class based you need PHP 5. Furthermore this plugin requires the SyntaxHighlighter plugin.
You can view the package details here or download the ZIP file directly here.
To install the plugin, download the zip, extract the folder
wp-include-file-source
in your plugin directory and activate the plugin in Wordpress.
Installationsvoraussetzungen, Download und Installation
Da der Plugin-Kern klassenbasiert ist wird PHP 5 benötigt. Weiterhin wird das SyntaxHighlighter plugin für die Code-Hervorhebung verwendet und muss installiert sein.
Die Package-Details können hier eingesehen werden, die ZIP-Datei kann hier direkt heruntergeladen werden.
Um das Plugin zu installieren lade das zip herunter, entpacke das Verzeichnis
wp-include-file-source
in Deinen Plugin-Ordner und aktiviere es in Wordpress.
Usage
To include a file (e.g. the c++ file main.cc), write:
[include-source file="/path/from/document-root/main.cc"]
All paths are related to your document root (in PHP $_SERVER['DOCUMENT_ROOT']
).
To include multiple files, type:
[include-source file1="..." file2="..." file3="..." ...]
To specify the language yourself (e.g. PHP), write:
[include-source type="php" file="..."]
Anwendung
Um eine Datei einzubinden (z.B. die c++ Datei main.cc), schreibe:
[include-source file="/path/from/document-root/main.cc"]
Alle Dateipfade sind auf das Root-Verzeichnis des Servers bezogen, nicht auf das
Wordpress-Installationsverzeichnis (in PHP $_SERVER['DOCUMENT_ROOT']
).
Um mehrere Dateien in einen Block einzubetten, tippe:
[include-source file1="..." file2="..." file3="..." ...]
Um die Sprache für den Syntax-Highlighter selbst zu definieren (z.B. PHP), schreibe
[include-source type="php" file="..."]