Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/docu/en/adm_function.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Documentation | Netautor Professional | functions</title>
	<link rel="stylesheet" type="text/css" href="../../../include/docu.css">
</head>
<body>

<a name="page_top"> </a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td class="menu">
		<font class="menu"><b>application:</b></font>
		<font class="function"><b>Functions</b></font>
	</td>
	<td align="right" nowrap>
		<span class="link">
		&raquo;&nbsp;<a href="#screen" class="link">Screenshot</a><br>
		</span>
	</td>
</tr>
</table>

<br>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td class="text">
		<font class="menu"><b>Description</b></a>
		<br>
		On the left side, all functions are displayed, which can be used in the templates. This list is divided into internal and external functions.
		<br>
		Internal functions are included in Netautor Professional, external functions can be user created or come from other projects.
		<br>
		<br>
		The form on the right side can be used to displays properties of internal functions, or to set properties for own, external functions.
		<br>
		By defining own functions with this form, the appropriate function documentation is created automatically.
		Further, the functions is registered in the template management and available for including in templates.
		To enable faster access to the varipus function definition, one single file is created containing all definitions.
		This file is available in <i>netautor/cache/npf_functions.dat</i>.
		<br>
		Each function consists of a PHP and an XML part. These parts are saved in two seperate files.
		The files for internal functions can be found in <i>netautor/napro4/include/npf_lib/</i>.
		<br>
		The files for external functions are in <i>netautor/napro4/include/npf_lib/</i>.
		<br>
	</td>
</tr>
<tr>
	<td class="text" align="right">
		<a href="#page_top" class="menu"><img src="../../../grafik/button_top.gif" border="0"></a><br>
		<img src="../../../grafik/pixel.gif" width="1" height="4"><br>
	</td>
</tr>
<tr>
	<td class="line"><img src="../../../grafik/pixel.gif" width="1" height="1"></td>
</tr>
</table>

<br>

<a name="screen"> </a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td class="text">
		<font class="menu"><b>Screenshot:</b></font>
		<br>
		<img src="../../../grafik/pixel.gif" width="1" height="4"><br>
		<img src="../../../grafik/en/docu/adm_function.jpg" width="723" height="531"><br>
		<br>
		
		<table width="732" class="text">
		<tr>
			<td width="350" valign="top">
				<ol type="1">
					<li value="1" class="screenshot">
						<b>Head</b>
						<br>
						General information about the function<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>function name</b>
						<br>
						Name of the function<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Context</b>
						<br>
						Specifies the context of a function. This is only used for documentation and has no effect on the function itself.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Type</b>
						<br>
						Specifies if the function is an internal or external function.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Has tail</b>
						<br>
						Specifies if a function has only one tag or an opening and an end tag.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>date</b>
						<br>
						creation date of the function<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Grouping</b>
						<br>
						Specifies with which other functions this function should share parameters. Parameters and their values are
						exchanged runtime between these functions.
						(e.g.l: npf_results and npf_show_counter, npf_setlist)<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>PHP-Function</b>
						<br>
						Name of the php function which is executed instead of the function tag.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Auto create</b>
						<br>
						Specifies, if the appropriate PHP file including the function call schould be generated automatically.
						This spares some time, when the function is defined in Netautor before creating the php code.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>PHP-File</b>
						<br>
						Name of the file which contains the PHP function specified above.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>deprecated function</b>
						<br>
						date and selection of the new function.<br>
						<br>
					</li>
					<li value="2" class="screenshot">
						<b>Description</b>
						<br>
						General description of the function. In the first field, the language is specified (de,en,fr,...), the second field contains the description itself.
						This is only required for the documentation, but should alway be specified.<br>
						<br>
					</li>
					<li value="3" class="screenshot">
						<b>Example</b>
						<br>
						To enter examples for this function to the documentation.<br>
						<br>
					</li>
					<li value="4" class="screenshot">
						<b>Author</b>
						<br>
						Contains details about the author of the function.<br>
						<br>
					</li>
					<li value="5" class="screenshot">
						<b>save</b>
						<br>
						saves current data.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>new</b>
						<br>
						clears the form<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>delete</b>
						<br>
						deletes the selected function.<br>
						<br>
					</li>
					<li value="6" class="screenshot">
						<b>available parameters</b>
						<br>
						list of the available parameters in this function. click one paramter to edit.<br>
						<br>
					</li>
				</ol>
			</td>
			<td width="27" valign="top">
				<img src="../../../grafik/pixel.gif" width="27" height="1"><br>
			</td>
			<td width="355" valign="top">
				<ol type="1">
					<li value="7" class="screenshot">
						<b>Parameters</b>
						<br>
						Input fields for one or more parameters. This block is displayed once for each parameter.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Name</b>
						<br>
						Name of the parameters<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>date</b>
						<br>
						creation date of the parameter.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Explizit</b>
						<br>
						Defines if a parameter is mandatory or not.
						If a parameter is mandatory and is not used in a template, the template is saved but the compiler
						displays an error message and no php file is created.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<b>Is Flag</b>
						<br>
						Specifies if a parameter is a "FLAG" (yes/no or 0/1) or if it can contain whole values.<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>Replacer</b>
						<br>
						<i>none</i><br>
						Values like %FIELDNAME% are not changed.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<i>protected</i><br>
						Values like %FIELDNAME% are replaced by the value of the field "FIELDNAME".
						The parameter value %FIELDNAME% remains if no field with the name "FIELDNAME exists.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<i>full</i><br>
						Values like %FIELDNAME% are replaced by the value of the field "FIELDNAME".
						The parameter value is deleted if no field with the name "FIELDNAME exists.<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>Quote</b>
						<br>
						<i>None</i><br>
						The parameter value is added to the array $params without changes.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<i>Simple</i><br>
						The parameter value is splitted by commas and added to the array $params as sub array.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<i>Extended</i><br>
						The given value is splitted by commas but grouped by parentheses.<br>
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						<i>Extended List</i><br>
						The parameter value is splitted by commas and added to the array $params as sub array, where the
						values are used as keys and converted to capitals.<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>Settings</b>
						<br>
						the parameters default value if not set.<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>Possible Values</b>
						<br>
						possible values for the parameter<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>deprecated parameter</b>
						<br>
						date and selection of the new parameter.<br>
						
						<img src="../../../grafik/pixel.gif" width="1" height="6"><br>
						
						<b>Description</b>
						<br>
						General description of the parameter. In the first field, the language is specified (de,en,fr,...), 
						the second field contains the description itself. This is only required for the documentation, 
						but should alway be specified.<br>
						<br>
					</li>
					<li value="8" class="screenshot">
						<b>Function Search</b>
						<br>
						List of the available functions. click one function to edit.<br>
						<br>
					</li>
				</ol>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="text" align="right">
		<a href="#page_top" class="menu"><img src="../../../grafik/button_top.gif" border="0"></a><br>
		<img src="../../../grafik/pixel.gif" width="1" height="4"><br>
	</td>
</tr>
<tr>
	<td class="line"><img src="../../../grafik/pixel.gif" width="1" height="1"></td>
</tr>
</table>

<br>
<!--
<table border="0" cellpadding="0" cellspacing="5" width="100%">
<tr>
	<td class="text">
		<font class="menu"><b>Related:</b></font>
	</td>
	<td class="text" align="right">
		<a href="#page_top" class="menu"><img src="../../../grafik/button_top.gif" border="0"></a><br>
		<img src="../../../grafik/pixel.gif" width="1" height="4"><br>
	</td>
</tr>
<tr>
	<td class="line" colspan="2"><img src="../../../grafik/pixel.gif" width="1" height="1"></td>
</tr>
</table>
-->
<a name="ende"> </a>

</body>
</html>
Return current item: Netautor Professional