Bluefish default snippets

From Bluefish Wiki
Jump to: navigation, search

<?xml version="1.0"?>

<!-- default_snippets.xml $Revision: 22/3/2010   -->

<!--
              DO NOT COPY THIS FILE FROM THE WIKI MAIN PAGE!
     BUT FROM THE EDIT TAB (OR THE VIEW SOURCE IF YOU ARE NOT LOGGIN IN)
               ONLY THE PART WITHIN: <pre> </pre>
-->

<!-- USAGE:
	Copy and import this file in the snippets left panel menu.
 -->

<snippets>
<branch title=" C ">
<leaf title="Comment" type="insert">
<before>/*</before>
<after>*/</after>
</leaf>
<leaf title="Walk GList" type="insert">
<before>GList *tmplist;
tmplist = g_list_first(%0);
while(tmplist){
	</before>
<after>
	tmplist = g_list_next(tmplist);
}</after>
<param num="0" name="GList Name"/>
</leaf>
<leaf title="define" type="insert">
<before>#define %0
</before>
<after>
</after>
<param num="0" name="#define Name"/>
</leaf>
<leaf title="ifdef" type="insert">
<before>
#ifdef %0
</before>
<after>
#endif /* %0 */
</after>
<param num="0" name="#ifdef Name"/>
</leaf>
</branch>
<branch title="Apache">
<leaf title="Basic Authentication" type="insert">
<before>AuthName "%1"
AuthType Basic
require valid-user
AuthUserFile %0
</before>
<after></after>
<param num="0" name="Full Path to Password File"/>
<param num="1" name="Security Description"/>
</leaf>
<leaf title="Deny Access to .inc" type="insert">
<before><FilesMatch "\.inc$">
	Order allow,deny
	Deny from all
</FilesMatch></before>
<after></after>
</leaf>
</branch>
<branch title="DHTML">
<leaf title="Auto-submit Select Box" type="insert">
<before><form action="%0" method="%1" name="%2">
	<select name="%3" onchange="document.%1.submit();">
	</before>
<after></select>
	<noscript>
		<input type="submit" value="Go" />
	</noscript>
</form></after>
<param num="0" name="Form Action"/>
<param num="1" name='Form Method ("get" or "post")'/>
<param num="2" name="Form Name"/>
<param num="3" name="Select Name"/>
</leaf>
<leaf title="Image Rollover" type="insert">
<before><img src="%1" id="%0" onmouseover="this.src='%2';" onmouseout="this.src='%1';" /></before>
<after></after>
<param num="0" name="<img> ID"/>
<param num="1" name="onmouseout src"/>
<param num="2" name="onmouseover src"/>
</leaf>
</branch>
<branch title="DocBook">
<leaf title="Date" type="insert">
<before><date>%0</date></before>
<after></after>
<param num="0" name="Date"/>
</leaf>
<branch title="Figures">
<branch title="Figure">
<leaf title="SGML" type="insert">
<before><para><figure float="0">
	<title>%0</title>
	<screenshot><mediaobject>
	<imageobject>
	<imagedata fileref="%1" format="%2">
	</imageobject>
	<textobject>
	<phrase>%3</phrase>
	</textobject>
	</mediaobject></screenshot>
</figure></para>
</before>
<after></after>
<param num="0" name="Title"/>
<param num="1" name="Image Location"/>
<param num="2" name="Format"/>
<param num="3" name="Phrase"/>
</leaf>
<leaf title="XML" type="insert">
<before><para><figure float="0">
	<title>%0</title>
	<screenshot><mediaobject>
	<imageobject>
	<imagedata fileref="%1" format="%2"/>
	</imageobject>
	<textobject>
	<phrase>%3</phrase>
	</textobject>
	</mediaobject></screenshot>
</figure></para>
</before>
<after></after>
<param num="0" name="Title"/>
<param num="1" name="Image Location"/>
<param num="2" name="Format"/>
<param num="3" name="Phrase"/>
</leaf>
</branch>
<branch title="Image Object">
<leaf title="SGML" type="insert">
<before><imageobject>
	<imagedata fileref="%0" format="%1">
</imageobject>
</before>
<after></after>
<param num="0" name="Image Location"/>
<param num="1" name="Format"/>
</leaf>
<leaf title="XML" type="insert">
<before><imageobject>
	<imagedata fileref="%0" format="%1"/>
</imageobject>
</before>
<after></after>
<param num="0" name="Image Location"/>
<param num="1" name="Format"/>
</leaf>
</branch>
<branch title="Inline Image">
<leaf title="SGML" type="insert">
<before><inlinemediaobject>
	<imageobject>
	<imagedata fileref="%1" format="%2">
	</imageobject>
	<textobject>
	<phrase>%3</phrase>
	</textobject>
</inlinemediaobject></before>
<after></after>
<param num="0" name="Image Location"/>
<param num="1" name="Format"/>
<param num="2" name="Phrase"/>
</leaf>
<leaf title="XML" type="insert">
<before><inlinemediaobject>
	<imageobject>
	<imagedata fileref="%1" format="%2"/>
	</imageobject>
	<textobject>
	<phrase>%3</phrase>
	</textobject>
</inlinemediaobject></before>
<after></after>
<param num="0" name="Image Location"/>
<param num="1" name="Format"/>
<param num="2" name="Phrase"/>
</leaf>
</branch>
</branch>
<branch title="GUI">
<leaf title="Key Cap" type="insert">
<before><keycap></before>
<after></keycap></after>
</leaf>
<leaf title="Key Symbol" type="insert">
<before><keysym>%0</keysym></before>
<after></after>
<param num="0" name="Key Symbol"/>
</leaf>
<leaf title="Menu Choice" type="insert">
<before><menuchoice>
	<shortcut>
		<keycombo><keysym>%0</keysym></keycombo>
	</shortcut>
	<guimenu>%1</guimenu>
	<guimenuitem>%2</guimenuitem>
</menuchoice>
</before>
<after></after>
<param num="0" name="Key Symbol"/>
<param num="1" name="Menu"/>
<param num="2" name="Menu Item"/>
</leaf>
</branch>
<branch title="Headers">
<leaf title="Article" type="insert">
<before><article>
</before>
<after>
</article></after>
</leaf>
<leaf title="Article Info" type="insert">
<before><articleinfo>
</before>
<after>
</articleinfo></after>
</leaf>
<branch title="Authors">
<leaf title="Author" type="insert">
<before><author>
	<firstname>%0</firstname>
	<surname>%1</surname>
</author></before>
<after></after>
<param num="0" name="First Name"/>
<param num="1" name="Surname"/>
</leaf>
<leaf title="Author Group" type="insert">
<before><authorgroup>
</before>
<after>
</authorgroup></after>
</leaf>
<leaf title="Copyright" type="insert">
<before><copyright>
	<year>%0</year>
	<holder>%1</holder>
</copyright></before>
<after></after>
<param num="0" name="Year"/>
<param num="1" name="Holder"/>
</leaf>
</branch>
<branch title="DocTypes">
<leaf title="Article" type="insert">
<before><!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V%0//EN" [
</before>
<after>]></after>
<param num="0" name="Version"/>
</leaf>
<leaf title="Book" type="insert">
<before><!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V%0//EN" [
</before>
<after>]></after>
<param num="0" name="Version"/>
</leaf>
</branch>
<branch title="Entity">
<leaf title="Complex Entity" type="insert">
<before><!ENTITY %0 "%1"></before>
<after></after>
<param num="0" name="Entity Name"/>
<param num="1" name="Entity Definition"/>
</leaf>
<leaf title="Simple Entity" type="insert">
<before><!ENTITY %0 "%0"></before>
<after></after>
<param num="0" name="Entity Name"/>
</leaf>
<leaf title="System Entity" type="insert">
<before><!ENTITY %0 SYSTEM "%0"></before>
<after></after>
<param num="0" name="Entity Name"/>
</leaf>
</branch>
<branch title="History">
<leaf title="Revision" type="insert">
<before><revision>
	<revnumber>%0</revnumber>
	<date>%1</date>
	<authorinitials>%2</authorinitials>
	<revremark>%3</revremark>
</revision></before>
<after></after>
<param num="0" name="Revision Number"/>
<param num="1" name="Revision Date"/>
<param num="2" name="Author's Initials"/>
<param num="3" name="Remark"/>
</leaf>
<leaf title="Revision History" type="insert">
<before><revhistory>
</before>
<after>
</revhistory></after>
</leaf>
<leaf title="Legal Notice" type="insert">
<before><legalnotice>
<para></before>
<after></para>
</legalnotice></after>
</leaf>
</branch>
</branch>
<branch title="Layout">
<leaf title="Acronym" type="insert">
<before><acronym>
</before>
<after></acronym></after>
</leaf>
<leaf title="Application" type="insert">
<before><application>
</before>
<after></application></after>
</leaf>
<leaf title="Computer Output" type="insert">
<before><computeroutput>
</before>
<after></computeroutput>
</after>
</leaf>
<leaf title="Emphasis" type="insert">
<before><emphasis></before>
<after></emphasis></after>
</leaf>
<leaf title="Option" type="insert">
<before><option></before>
<after></option>
</after>
</leaf>
</branch>
<branch title="Links">
<leaf title="External Link with Text" type="insert">
<before><ulink url="%0">%1</ulink>
</before>
<after></after>
<param num="0" name="Link URL"/>
<param num="1" name="Text"/>
</leaf>
<branch title="External Link without Text">
<leaf title="SGML" type="insert">
<before><ulink url="%0">
</before>
<after></after>
<param num="0" name="Link URL"/>
</leaf>
<leaf title="XML" type="insert">
<before><ulink url="%0"/>
</before>
<after></after>
<param num="0" name="Link URL"/>
</leaf>
</branch>
<branch title="Internal Link">
<leaf title="SGML" type="insert">
<before><xref linkend="%0">
</before>
<after></after>
<param num="0" name="Link ID"/>
</leaf>
<leaf title="XML" type="insert">
<before><xref linkend="%0"/>
</before>
<after></after>
<param num="0" name="Link ID"/>
</leaf>
</branch>
</branch>
<branch title="Lists">
<leaf title="Itemized List" type="insert">
<before><itemizedlist>
	  <listitem><para></before>
<after></para></listitem>
</itemizedlist></after>
</leaf>
<leaf title="List Item" type="insert">
<before><listitem><para></before>
<after></para></listitem></after>
</leaf>
<leaf title="Ordered List" type="insert">
<before><orderedlist>
	  <listitem><para></before>
<after></para></listitem>
</orderedlist></after>
</leaf>
<leaf title="Variable List" type="insert">
<before><variablelist><title>%0</title>
	<varlistentry><term>%1</term>
	<listitem><para>%2</para></listitem>
	</varlistentry>
</variablelist></before>
<after></after>
<param num="0" name="Title"/>
<param num="1" name="Term"/>
<param num="2" name="Item"/>
</leaf>
<leaf title="Variable List Entry" type="insert">
<before><varlistentry><term>%0</term>
	<listitem><para>%1</para></listitem>
</varlistentry>
</before>
<after></after>
<param num="0" name="Term"/>
<param num="1" name="Item"/>
</leaf>
<leaf title="Paragraph" type="insert">
<before><para></before>
<after></para></after>
</leaf>
</branch>
<branch title="Procedures">
<leaf title="Procedure" type="insert">
<before><procedure><title>%0</title>
	<step><para>
</before>
<after></para>
</step>
</procedure>

</after>
<param num="0" name="Title"/>
</leaf>
<leaf title="Step" type="insert">
<before><step><para>
</before>
<after></para>


</after>
</leaf>
<leaf title="Substep" type="insert">
<before><substeps>
	<step><para>
</before>
<after></para></step>
</substeps>



</after>
</leaf>
<leaf title="Program Listing" type="insert">
<before><programlisting></before>
<after></programlisting></after>
</leaf>
</branch>
<branch title="Sections">
<leaf title="Section With ID" type="insert">
<before><sect%0 id="%1">
<title>%2</title>
</sect%0>
</before>
<after>
</after>
<param num="0" name="Section Number"/>
<param num="1" name="Section ID"/>
<param num="2" name="Title"/>
</leaf>
<leaf title="Simple Section" type="insert">
<before><sect%0>
<title>%1</title>
</sect%0>
</before>
<after>
</after>
<param num="0" name="Section Number"/>
<param num="1" name="Title"/>
</leaf>
</branch>
<branch title="Tables">
<leaf title="Entry" type="insert">
<before><entry align="%0" valign="%1"></before>
<after></entry>
</after>
<param num="0" name="Horizontal Alignment"/>
<param num="1" name="Vertical Alignment"/>
</leaf>
<leaf title="Informal Table" type="insert">
<before><informaltable><tgroup cols="%0" colsep="%1" rowsep="%2"></before>
<after>
</informaltable></after>
<param num="0" name="# cols"/>
<param num="1" name="Column Separator"/>
<param num="2" name="Row Separator"/>
</leaf>
<leaf title="Row" type="insert">
<before><row>
	<entry align="%0" valign="%1"></before>
<after></entry>
</row>
</after>
<param num="0" name="Horizontal Alignment"/>
<param num="1" name="Vertical Alignment"/>
</leaf>
</branch>
<branch title="Warnings">
<leaf title="Important" type="insert">
<before><important><para></before>
<after></para></important>

</after>
</leaf>
<leaf title="Note" type="insert">
<before><note><para></before>
<after></para></note>

</after>
</leaf>
<leaf title="Tip" type="insert">
<before><tip><para></before>
<after></para></tip>

</after>
</leaf>
<leaf title="Warning" type="insert">
<before><warning><para>
</before>
<after></para></warning>
</after>
</leaf>
</branch>
</branch>
<branch title="HTML">
<leaf title='"Made with Bluefish" Link' type="insert">
<before><a href="http://bluefish.openoffice.nl/">Made with Bluefish HTML editor.</a></before>
<after></after>
</leaf>
<leaf title="Any paired tag" type="insert">
<before><%0></before>
<after></%0></after>
<param num="0" name="Tag Name"/>
</leaf>
<leaf title="Any single tag" type="insert">
<before><%0 /></before>
<after></after>
<param num="0" name="Tag Name"/>
</leaf>
<leaf title="Any tag with 'class' attribute" type="insert">
<before><%0 class="%1"></before>
<after></%0></after>
<param num="0" name="Tag Name"/>
<param num="1" name="Class"/>
</leaf>
<leaf title="Any tag with 'id' attribute" type="insert">
<before><%0 id="%1"></before>
<after></%0></after>
<param num="0" name="Tag Name"/>
<param num="1" name="Unique ID"/>
</leaf>
<leaf title="Any tag with 'style' attribute" type="insert">
<before><%0 style="%1"></before>
<after></%0></after>
<param num="0" name="Tag Name"/>
<param num="1" name="Style"/>
</leaf>
<leaf title="Comment" type="insert">
<before><!-- %0</before>
<after> --></after>
<param num="0" name="Comment Text"/>
</leaf>
<branch title="DOCTYPEs">
<leaf title="HTML Frameset" type="insert">
<before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"></before>
<after></after>
</leaf>
<leaf title="HTML Strict" type="insert">
<before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"></before>
<after></after>
</leaf>
<leaf title="HTML Transitional" type="insert">
<before><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"></before>
<after></after>
</leaf>
<leaf title="XHTML Frameset" type="insert">
<before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"></before>
<after></after>
</leaf>
<leaf title="XHTML Strict" type="insert">
<before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"></before>
<after></after>
</leaf>
<leaf title="XHTML Transitional" type="insert">
<before><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd"></before>
<after></after>
</leaf>
<leaf title="External Stylesheet" type="insert">
<before><link rel="stylesheet" type="text/css" href="%0" /></before>
<after></after>
<param num="0" name="Stylesheet"/>
</leaf>
</branch>
<branch title="Forms">
<leaf title="<form>" type="insert">
<before><form action="%0" method="%1"></before>
<after></form></after>
<param num="0" name="Action"/>
<param num="1" name="Method"/>
</leaf>
<leaf title="<input> Checkbox" type="insert">
<before><input type="checkbox" name="%0" value="%1" /></before>
<after></after>
<param num="0" name="Name"/>
<param num="1" name="Checked Value"/>
</leaf>
<leaf title="<input> File" type="insert">
<before><input type="file" name="%0" /></before>
<after></after>
<param num="0" name="Name"/>
</leaf>
<leaf title="<input> Password" type="insert">
<before><input type="password" name="%0" value="%1" /></before>
<after></after>
<param num="0" name="Name"/>
</leaf>
<leaf title="<input> Radio" type="insert">
<before><input type="radio" name="%0" value="%1" /></before>
<after></after>
<param num="0" name="Name"/>
<param num="1" name="Checked Value"/>
</leaf>
<leaf title="<input> Submit" type="insert">
<before><input type="submit" name="%0" value="%1" /></before>
<after></after>
<param num="0" name="Name"/>
<param num="1" name="Button Text"/>
</leaf>
<leaf title="<input> Text" type="insert">
<before><input type="text" name="%0" value="%1" /></before>
<after></after>
<param num="0" name="Name"/>
<param num="1" name="Default Value"/>
</leaf>
<leaf title="<label>" type="insert">
<before><label for="%0"></before>
<after></label></after>
<param num="0" name="For"/>
</leaf>
<leaf title="<option>" type="insert">
<before><option value="%0">%1</before>
<after></option></after>
<param num="0" name="Value"/>
<param num="1" name="Option Text"/>
</leaf>
<leaf title="<select>" type="insert">
<before><select name="%0"></before>
<after></select></after>
<param num="0" name="Name"/>
<param num="1" name=""/>
</leaf>
<leaf title="Hyperlinked Anchor" type="insert">
<before><a href="%0" title="%1">%2</before>
<after></a></after>
<param num="0" name="Link Destination"/>
<param num="1" name="Title"/>
<param num="2" name="Linked Text"/>
</leaf>
<leaf title="Image" type="insert">
<before><img src="%0" height="%1" width="%2" alt="%3" /></before>
<after></after>
<param num="0" name="Image src"/>
<param num="1" name="Height"/>
<param num="2" name="Width"/>
<param num="3" name="alt Text"/>
</leaf>
<leaf title="Link" type="insert">
<before><link rel="%0" type="%1" href="%2" /></before>
<after></after>
<param num="0" name="Relationship"/>
<param num="1" name="Type"/>
<param num="2" name="href"/>
</leaf>
</branch>
<branch title="Meta">
<leaf title="HTTP Refresh" type="insert">
<before><meta http-equiv="refresh" content="%0; URL=%1"></before>
<after></after>
<param num="0" name="Refresh time (seconds)"/>
<param num="1" name="Destination URL"/>
</leaf>
<leaf title="Meta tag" type="insert">
<before><meta name="%0" content="%1" /></before>
<after></after>
<param num="0" name="Name"/>
<param num="1" name="Content"/>
</leaf>
<leaf title="Named Anchor" type="insert">
<before><a name="%0"></before>
<after></a></after>
<param num="0" name="Name"/>
</leaf>
<leaf title="Script" type="insert">
<before><script type="application/x-javascript">
	<!--

	-->
</script></before>
<after></after>
</leaf>
</branch>
</branch>
<branch title="PHP+HTML">
<leaf title="Checkbox" type="insert">
<before><input type="checkbox" name="%0" value="%1" <?php if (isset($%0)) { echo 'checked'; } ?>></before>
<after></after>
<param num="0" name="<input> Name"/>
<param num="1" name="Checked Value"/>
</leaf>
<leaf title="Form" type="insert">
<before><form method="POST" action="<?php echo $SCRIPT_NAME ?>">

</before>
<after></form></after>
</leaf>
<leaf title="Form + Action" type="insert">
<before><?php if (isset($submitted)) {
//form submit code here
} else { ?>
<form method="POST" action="<?php echo $SCRIPT_NAME ?>">

<input type="submit" name="submitted" value="%0"></form>
<?php } // end of form ?></before>
<after></after>
<param num="0" name="Submit Button Text"/>
</leaf>
<branch title="General">
<leaf title="Calendar Table" type="insert">
<before><?php
	$now = getdate(time());
	$time = mktime(0,0,0, $now['mon'], 1, $now['year']);
	$date = getdate($time);
	$dayTotal = cal_days_in_month(0, $date['mon'], $date['year']);
	//Print the calendar header with the month name.
	print '<table><tr><td colspan="7"><strong>' . $date['month'] . '</strong></td></tr>';
	for ($i = 0; $i < 6; $i++) {
		print '<tr>';
		for ($j = 1; $j <= 7; $j++) {
			$dayNum = $j + $i*7 - $date['wday'];
			//Print a cell with the day number in it.  If it is today, highlight it.
			print '<td';
			if ($dayNum > 0 && $dayNum <= $dayTotal) {
				print ($dayNum == $now['mday']) ? ' style="background: #ccc;">' : '>';
				print $dayNum;
			}
			else {
				//Print a blank cell if no date falls on that day, but the row is unfinished.
				print '>';
			}
			print '</td>';
		}
		print '</tr>';
		if ($dayNum >= $dayTotal && $i != 6)
			break;
	}
	print '</table>';
?></before>
<after></after>
</leaf>
</branch>
<branch title="Selectbox">
<leaf title="From Array" type="insert">
<before><select name="%0">
<?php
while(list($key, $val)=each($%1)) {
	if (isset($%0) && ($%0 == $val)) {
		echo '<option value="'.$key.'" selected>'.$val.'</option>';
	} else {
		echo '<option value="'.$key.'">'.$val.'</option>';
	}
}
?></select></before>
<after></after>
<param num="0" name="<select> Name"/>
<param num="1" name="Name of Array w/ Options"/>
</leaf>
<leaf title="From InterBase Result Set" type="insert">
<before><select name="%0">
<?php
while($row = ibase_fetch_row($%1)) {
	if (isset($%0) && ($%0 == $row[%2])) {
	\techo '<option value="'.$row[%2].'" selected>'.$row[%3].'</option>';
	} else {
		echo '<option value="'.$row[%2].'">'.$row[%3].'</option>';
	}
}
?></select></before>
<after></after>
<param num="0" name="<select> Name"/>
<param num="1" name="Query Result Handle"/>
<param num="2" name="Value Index"/>
<param num="3" name="Label Index"/>
</leaf>
<leaf title="From MySQL Result Set" type="insert">
<before><select name="%0">
<?php
while($row = mysql_fetch_row($%1)) {
	if (isset($%0) && ($%0 == $row[%2])) {
	\techo '<option value="'.$row[%2].'" selected>'.$row[%3].'</option>';
	} else {
	\techo '<option value="'.$row[%2].'">'.$row[%3].'</option>';
	}
}
?></select></before>
<after></after>
<param num="0" name="<select> Name"/>
<param num="1" name="Query Result Handle"/>
<param num="2" name="Value Index"/>
<param num="3" name="Label Index"/>
</leaf>
<leaf title="Text Input" type="insert">
<before><input type="text" name="%0" value="<?php if (isset($%0)) { echo $%0; } ?>"></before>
<after></after>
<param num="0" name="<input> Name"/>
</leaf>
<leaf title="Textarea" type="insert">
<before><textarea name="%0" rows="20" cols="40"><?php if (isset($%0)) { echo $%0; } ?></textarea></before>
<after></after>
<param num="0" name="<textarea> name"/>
</leaf>
</branch>
</branch>
<branch title="PHP">
<branch title="File">
<leaf title="Include" type="insert">
<before>include_once(%0);
</before>
<after></after>
<param num="0" name="Filename (quoted or variable with $)"/>
</leaf>
<leaf title="Open and Print" type="insert">
<before>$fd = fopen(%0, 'r');
while (!feof($fd)) {
	$buffer = fgets($fd, 4096);
	echo $buffer;
}
fclose($fd);</before>
<after></after>
<param num="0" name="Filename (quoted or variable with $)"/>
</leaf>
<leaf title="Require" type="insert">
<before>require_once(%0);
</before>
<after></after>
<param num="0" name="Filename (quote or variable with $)"/>
</leaf>
</branch>
<branch title="General">
<branch title="Date">
<leaf title="D Month YYYY" type="insert">
<before>print date('j F Y');</before>
<after></after>
</leaf>
<leaf title="DD MM YY" type="insert">
<before>print date('d/m/y');</before>
<after></after>
</leaf>
<leaf title="HH MM SS" type="insert">
<before>print date('H:i:s');</before>
<after></after>
</leaf>
<leaf title="HH MM SS (AM PM)" type="insert">
<before>print date('h:i:s A');</before>
<after></after>
</leaf>
<leaf title="MM DD YY" type="insert">
<before>print date('m/d/y');</before>
<after></after>
</leaf>
<leaf title="Month Dth, YYYY" type="insert">
<before>print date('F jS, Y');</before>
<after></after>
</leaf>
<leaf title="Define Constant" type="insert">
<before>define('%0', %1);</before>
<after></after>
<param num="0" name="Constant Name (unquoted string)"/>
<param num="1" name="Value (quoted or variable with $)"/>
</leaf>
<leaf title="Iterate over Array" type="insert">
<before>foreach ($%0 as $key => $value) {
	</before>
<after>
}
</after>
<param num="0" name="Array Name"/>
</leaf>
<leaf title="Location header" type="insert">
<before>header('Location: '.%0);</before>
<after></after>
<param num="0" name="Destination URL (quoted or variable with $)"/>
</leaf>
<leaf title="Loop (for)" type="insert">
<before>for ($%0 = %1; $%0 <= %2; $%0++) {
 </before>
<after>
}
</after>
<param num="0" name="Iterator Variable Name"/>
<param num="1" name="Start Value"/>
<param num="2" name="End Value"/>
</leaf>
<leaf title="Pretty Print Array" type="insert">
<before>print_r($%0);</before>
<after></after>
<param num="0" name="Array Name"/>
</leaf>
<leaf title="Save Uploaded Files" type="insert">
<before>foreach ($_FILES as $key=>$value) {
	$temp = $_FILES[$key]['tmp_name'];
	$filename = strtolower(str_replace(' ', '', $_FILES[$key]['name']));
	$dest = '%0' . $filename;
	if ($temp) {
		if (!move_uploaded_file($tempLoc, $dest))
			$message .= "<p>An error occurred uploading <strong>$filename</strong>.  Please try again.<p>";
		else {
			chmod($dest, 0775);
			$message .= '<p>' . $filename . 'successfully uploaded to "%0".</p>';
		}
	}
}</before>
<after></after>
<param num="0" name="Destination Directory"/>
</leaf>
<leaf title="Send Mail" type="insert">
<before>mail("%0", "%1", $%2);
</before>
<after></after>
<param num="0" name="Destination Address"/>
<param num="1" name="Subject Line"/>
<param num="2" name="Message Body (variable name)"/>
</leaf>
<leaf title="Set Cookie" type="insert">
<before>setcookie(%0, %1, %2, %3, %4, '%5');</before>
<after></after>
<param num="0" name="Cookie name (quoted or variable with $)"/>
<param num="1" name="Cookie Value (quoted or variable with $)"/>
<param num="2" name="Seconds to Expire (quoted or variable with $)"/>
<param num="3" name="Cookie Path (quoted or variable with $)"/>
<param num="4" name="Cookie Domain (quoted or variable with $)"/>
<param num="5" name="Secure (0 or 1)"/>
</leaf>
<leaf title="Simple Data Cleanse" type="insert">
<before>trim(htmlspecialchars(%0));</before>
<after>1</after>
</leaf>
</branch>
</branch>
<branch title="InterBase">
<leaf title="Connect" type="insert">
<before>$ibase_id = ibase_connect('%0:%1', '%2', '%3');
</before>
<after></after>
<param num="0" name="Host Name"/>
<param num="1" name="Database Path"/>
<param num="2" name="Username"/>
<param num="3" name="Password"/>
</leaf>
<leaf title="Fetch Row" type="insert">
<before>while ($%1 = ibase_fetch_row($%0)) {
	echo $%1[0];
</before>
<after>
}
ibase_free_result($%0);
</after>
<param num="0" name="InterBase Result Variable Name"/>
<param num="1" name="Row Variable  Name"/>
</leaf>
<leaf title="Query" type="insert">
<before>$%0 = ibase_query(%2);
</before>
<after>ibase_free_result($%0);
</after>
<param num="0" name="Result Variable Name"/>
<param num="1" name="Query String (quoted or variable with $)"/>
</leaf>
</branch>
<branch title="MySQL">
<leaf title="Connect" type="insert">
<before>$mysql_id = mysql_connect('%0', '%1', '%2');
mysql_select_db('%3', $mysql_id);
</before>
<after></after>
<param num="0" name="Host Name"/>
<param num="1" name="Username"/>
<param num="2" name="Password"/>
<param num="3" name="Database Name"/>
</leaf>
<leaf title="Fetch Row" type="insert">
<before>while ($%1 = mysql_fetch_row($%0)) {
	echo $%1[0];
</before>
<after>
}
mysql_free_result($%0);
</after>
<param num="0" name="Result Variable Name"/>
<param num="1" name="Row Variable Name"/>
</leaf>
<leaf title="Query" type="insert">
<before>$%0 = mysql_query(%1, %2);
</before>
<after></after>
<param num="0" name="Result Variable Name"/>
<param num="1" name="Connection ID Name"/>
<param num="2" name="Query String (quoted or variable with $)"/>
</leaf>
</branch>
<branch title="ODBC">
<leaf title="Connect" type="insert">
<before>$odbc_id = odbc_connect('%0', '%1', '%2');
</before>
<after></after>
<param num="0" name="ODBC Data Source Name"/>
<param num="1" name="Username"/>
<param num="2" name="Password"/>
</leaf>
<leaf title="Execute Query" type="insert">
<before>$%0 = odbc_exec(%1, %2);
</before>
<after></after>
<param num="0" name="Result Variable Name"/>
<param num="1" name="ODBC Connection ID Name"/>
<param num="2" name="Query String (quoted or variable with $)"/>
</leaf>
<leaf title="Fetch Row" type="insert">
<before>while($success = odbc_fetch_row($%0)) {
	
}</before>
<after></after>
<param num="0" name="Result Variable Name"/>
</leaf>
<leaf title="PHP Tags" type="insert">
<before>
<?php
</before>
<after>
?>
</after>
</leaf>
</branch>
<branch title="Test">
<leaf title="In Array" type="insert">
<before>if (in_array($%0, $%1)) {
	</before>
<after>
}</after>
<param num="0" name="Test Variable"/>
<param num="1" name="Array Name"/>
</leaf>
<leaf title="Is Defined" type="insert">
<before>if (defined($%0)) {
	</before>
<after>
}</after>
<param num="0" name="Test Constant"/>
</leaf>
<leaf title="Is NOT Set" type="insert">
<before>if (!isset($%0)) {
	</before>
<after>
}</after>
<param num="0" name="Test Variable"/>
</leaf>
<leaf title="Is Set" type="insert">
<before>if (isset($%0)) {
	</before>
<after>
}</after>
<param num="0" name="Test Variable"/>
</leaf>
</branch>
</branch>
<branch title="Replace">
<branch title="Convert In Selection">
<leaf title="<td> to <th>" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(<|</)(td)([^>]*)(>)</searchpat>
<replacepat>\0th\2></replacepat>
</leaf>
<leaf title="Spaces (4) to Single Tabs" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(    )</searchpat>
<replacepat>	</replacepat>
</leaf>
<leaf title="Spaces (8) to Single Tabs" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(        )</searchpat>
<replacepat>	</replacepat>
</leaf>
<leaf title="Tabs to Spaces (4)" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(	)</searchpat>
<replacepat>    </replacepat>
</leaf>
<leaf title="Tabs to Spaces (8)" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(	)</searchpat>
<replacepat>        </replacepat>
</leaf>
</branch>
<branch title="Strip">
<leaf title="Any tag in Selection" type="snr" casesens="0" matchtype="posix" region="selection">
<searchpat>(</?%0( *| +[^>]*)>)</searchpat>
<replacepat></replacepat>
<param num="0" name="Tag Name"/>
</leaf>
<leaf title="End of line Whitespace" type="snr" casesens="0" matchtype="perl" region="selection">
<searchpat>(?<=\S)\s*(?=(\n|\r))</searchpat>
<replacepat></replacepat>
</leaf>
<leaf title="Font tags" type="snr" casesens="0" matchtype="posix" region="beginning">
<searchpat>(<font[^>]*>|</font>)</searchpat>
<replacepat></replacepat>
</leaf>
</branch>
</branch>
<branch title="SQL">
<leaf title="Select All" type="insert">
<before>SELECT * FROM %0</before>
<after></after>
<param num="0" name="Table Name"/>
</leaf>
<leaf title="Select All w/ Left Join" type="insert">
<before>SELECT * FROM %0 LEFT JOIN %1 ON %2</before>
<after></after>
<param num="0" name="Table"/>
<param num="1" name="Join Table"/>
<param num="2" name="Full ON clause"/>
</leaf>
<leaf title="Select Conditional" type="insert">
<before>SELECT * FROM %0 WHERE %1 %2 '%3'</before>
<after></after>
<param num="0" name="Table Name"/>
<param num="1" name="Comparison Field"/>
<param num="2" name="Comparison (=, >, <, <>, etc.)"/>
<param num="3" name="Compare Against (w\/o quotes)"/>
</leaf>
</branch>
</snippets>