Project

General

Profile

1
<html>
2

    
3
	<head>
4
	<title>Droplets</title>
5
	<link href="readme.css" rel="stylesheet" type="text/css" media="screen" />
6
</head>
7

    
8
	<body>
9
		<small><font color="#7f7f7f">Droplets Help</font></small><br />
10
		<h2> <img src="../img/droplets_logo.png" alt="" width="297" height="81" border="0"></h2> <br />
11
		Droplets are small chunks of php code (just like the code module) that can be included in your template or any other content section. <br />
12
		Including a droplet is done by encapsulating the droplet name in double brackets. <br />
13
		If you want to use the droplet &quot;ModifiedWhen&quot; (to show the last modified date and time of the current page) you only need to add <b>[[ModifiedWhen]]</b> to your template or WYSIWYG contentpage. <br />
14
		<br />
15
		You are encouraged to create your own droplets and share them with the community. <br />
16
		<br />
17
		<h3>Installation</h3>
18
		<br />
19
		Droplets are installed as a admin tool. The installation is done using the normal &quot;Add module&quot; page in the WB backend. <br />
20
		When the installation is successfull, there is a new tool added to the Admin-Tools menu. <br />
21
		Clicking the tool will display the current installed droplets, and a button to create your own. <br />
22
		<br />
23
		<h3>Getting Droplets</h3>
24
		<br />
25
		A fast growing number of Droplets are available for use, you can use the <a href="http://www.websitebakers.com/pages/droplets/official-library.php" target="_new">Official Droplets Library</a> in the AMASP project website, or you can search the WB Forum. <br />
26
		<br />
27
		<h3>Coding Droplets</h3>
28
		<br />
29
		Droplets run in PHP mode, no <font color="#ff0000">&lt;?php</font> or <font color="#ff0000">?&gt;</font> is allowed in the code! If any of these tags are found in the code they will be removed. Your code will not run as expected. <br />
30
		The droplet code can NOT echo or print data to the output stream directly. The Droplet name is replaced by the return value of the PHP code.<br />
31
		Example: [[HelloWorld]] <br />
32
		<br />
33
		<font color="#ff0000">Wrong code:</font> echo &quot;Hello World&quot;; <br />
34
		<font color="#339966">Correct code:</font> return &quot;Hello World&quot;; <br />
35
		<br />
36
		Since version 0.3 Droplets can modify the complete page content. <br />
37
		When the Droplet is called, an extra variable ($wb_page_data) is made available. 
38
		This variable holds all the content of your current generated webpage.
39
		You can modify any part of this content simply by replacing it in the variable. There is no need to return this variable, the Droplet code will process changed content automatically.<br /><br />
40
		
41
		Since version 0.3 Droplets will check the PHP code you have saved for validity. <br />
42
		When the code will not execute correctly a red flashing icon will apear in the backend Droplets list. <br />
43
		The standard blue icon is no guarantee that the Droplets does what you would expect it to do, it will just tell you if the code is valid PHP code.<br /><br />
44
		
45
		Since version 0.3 Droplets you do not need to return any data. When you end your code with <pre>return true;</pre> there will not be an errormessage. The processed Droplet tag will be removed.<br />
46

    
47
		<br />
48
		<h3>PHP color coding</h3>
49
		<br />
50
		The Droplets edit page is ready to use the EditArea module. This module creates a color coded editor for PHP code. <br />
51
		EditArea comes as a seperate module (installed as an admin tool). <br />
52
		Use the WB Forum or the <a href="http://www.websitebakers.com/" target="_new">AMASP</a> project to find the latest EditArea download. <br />
53
		<br />
54
		<h3>More Information</h3>
55
		<br />
56
		More information (including localized help) can be found on the <a href="http://www.websitebakers.com/pages/droplets/about-droplets.php" target="_new">Droplets pages</a> of the AMASP project website. <br />
57
		<br />
58
		<br />
59
		<br />
60
	</body>
61

    
62
</html>
(3-3/3)