Package wp-include-file-source

Version1.0
Checksumac4ad81b0e697a767f2b6997a204d8756b41ab3f
Downloadwp-include-file-source.zip
Download SHA1431b6fb498231150ebfd24e21e20cd12449201d8
Download MD5894fca0f5b176db8aac8dab0a87cb162
License
WP Include File Source is written by Stefan Wilhelm
(cerberos@AtWillys.de), and licensed under the GPL:

    WP Include File Source
    Copyright (C) 2010 Stefan Wilhelm

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Readme
Wordpress plugin WP Include File Source

WP Include File Source is a simple text-include plugin for source codes
files, which exist somewhere in a htdocs ($_SERVER['DOCUMENT_ROOT'])
sub-folder. It uses the powerful highlighting  plugin "syntaxhighlighter".


Requirements

	(1) You need PHP 5 because the plugin is based on a class
	(2) You need the plugin "syntaxhighlighter"

Installation

	(1) Copy the wp-include-file-source folder to your plugin folder
	(2) Activate the plugin in the plugin pane


Configuration

	The plugin does not require any configuration

Usage

	Use the short tag

		[include-source file="/file/location"]

	to include files. The plugin automatically detects the file extension.
	However, if you want to define your file type yourself, type:

		[include-source type="e.g. php" file="..."]

	To include multiple files in the same block, write:

		[include-source file1="..." file2="..." file3="..."]

	Note: The highlight type (code language) will be determined using
	the extension of the first file.

How it works

	The plugin generates a content filter hook with the priority 6
	(because the syntaxhighlighter has 7 and this plugin has to be
	processed before). The filter method processes the short tag
	"include-source", which simply reads the specified files and places
	the contents in a [sourcecode type="..."] <contents> [/sourcecode]
	frame. This frame will be processed by the syntaxhighlighter.
	If more than one files are specified, all contents will be copied
	in the [sourcecode][/sourcecode] frame, separated with newline.
	The type of the block is the type specified or determined using
	the first file.
Contents
wp-include-file-source.php
version
readme
license