ahref

from strings

splugin('ahref', 'http://example.com/index.html?this=this&that=that#something', 'Example Link', 'target="_blank"');
	echo '

' . $this->splugin('modify', $result, 'htmlentities nl2br') . '

'; echo "

$result

"; ?>

from arrays

splugin(
		'ahref',
		parse_url('http://example.com/index.html?this=this&that=that#something'),
		'Example Link',
		array('target' => "_blank")
	);
	echo '

' . $this->splugin('modify', $result, 'htmlentities nl2br') . '

'; echo "

$result

"; ?>

checkbox

set as $key => $val) {
		$result .= $this->splugin(
			'checkbox', // plugin 
			"xboxen[$key]", // checkbox name
			$key, // checkbox value
			'key1', // pre-checked
			'', // default value when not checked
			'dumb="dumber"' // attributes
		);
		$result .= $val . "

\n"; } $this->plugin('modify', $result, 'htmlentities nl2br'); ?>

cycle

repeat 1 on array


	plugin('cycle', array('a', 'b', 'c'), $i) ?>

repeat 3 on preset


	plugin('cycle', 'lightdark', $i, 3) ?>

dateformat

plugin('dateformat', "Aug 8, 1970") ?>

plugin('dateformat', "Aug 8, 1970", 'mydate') ?>

javascript

splugin('javascript', 'path/to/file.js')) ?>

image

local

splugin('image', 'savant.gif')) ?>
plugin('image', 'savant.gif') ?>

nonexistent

splugin('image', 'savantx.gif', 'image does not exist')) ?>
plugin('image', 'savantx.gif', 'image does not exist') ?>

stream

splugin('image', 'http://phpsavant.com/etc/fester.jpg')) ?>
plugin('image', 'http://phpsavant.com/etc/fester.jpg') ?>

options

assoc

splugin('options', $this->set, 'key1', 'dumb="dumber"');
	$this->plugin('modify', $result, 'htmlentities nl2br');
?>

seq

splugin('options', $this->set, 'val2', array('attrib' => 'this & that'), true);
	$this->plugin('modify', $result, 'htmlentities nl2br');
?>

radios

assoc

splugin('radios', 'das_radio', $this->set, 'key1', 'nil', "

\n", 'dumb="dumber"'); $this->plugin('modify', $result, 'htmlentities nl2br'); ?>

seq

splugin('radios', 'das_radio', $this->set, 'val2', 'nil', "

\n", 'dumb="dumber"', true); $this->plugin('modify', $result, 'htmlentities nl2br'); ?>

stylesheet

splugin('stylesheet', 'path/to/styles.css')) ?>

textarea

splugin('textarea', 'longtext', "some really long text");
	$this->plugin('modify', $result, 'htmlentities nl2br');
?>

fester

plugin('fester', 'Gomez') ?>
plugin('fester', 'Morticia') ?>
plugin('fester', 'Cara Mia!') ?>

Plugin Objects

_resource[plugin]:
_resource['plugin']) ?>