ATK Extensions: Difference between revisions
| (15 intermediate revisions by 5 users not shown) | |||
| Line 14: | Line 14: | ||
== FCKeditor == | == FCKeditor == | ||
Description: | Description: WYSIWYG editor. | ||
<br />Usage: | <br />Usage: | ||
<syntaxhighlight lang="php"> | |||
$this->add(new atkFckAttribute('text')); | |||
</syntaxhighlight> | |||
<br />URL: [http://www.fckeditor.net/ http://www.fckeditor.net/] | <br />URL: [http://www.fckeditor.net/ http://www.fckeditor.net/] | ||
<br />Latest version in ATK: 2.2 | <br />Latest version in ATK: 2.2 | ||
| Line 27: | Line 30: | ||
See example below: | See example below: | ||
<syntaxhighlight lang="php"> | |||
$mailer = atknew('atk.utils.atkmailer'); | $mailer = atknew('atk.utils.atkmailer'); | ||
$mailer->AddAddress("mailto@mail. | $mailer->isHtml(true); | ||
$mailer->AddAddress("mailto@mail.org"); | |||
$mailer->FromName = "ATK Application Mailer"; | $mailer->FromName = "ATK Application Mailer"; | ||
$mailer->From = 'mailer@achievo.org'; | $mailer->From = 'mailer@achievo.org'; | ||
$mailer->Subject = 'Welcome to the ATK Application!'; | $mailer->Subject = 'Welcome to the ATK Application!'; | ||
$mailer->Body = 'Welcome to the ATK Application | $mailer->Body = nl2br('Welcome to the ATK Application | ||
We, the team, wish to thank you for making use of our ATK Application. | |||
We, the team, wish to thank you for making use of our ATK Application. | |||
Yours Truly, | Yours Truly, | ||
The Team.'); | The Team.'); | ||
$mailer->Send(); | $mailer->Send(); | ||
</syntaxhighlight> | |||
You can use all the methods described in the PHPMailer documentation. | You can use all the methods described in the PHPMailer documentation. | ||
| Line 56: | Line 64: | ||
<br />URL: [http://www.sergiopereira.com/articles/prototype.js.html http://www.sergiopereira.com/articles/prototype.js.html] | <br />URL: [http://www.sergiopereira.com/articles/prototype.js.html http://www.sergiopereira.com/articles/prototype.js.html] | ||
<br />Latest version in ATK: 1.5.0_rc0 | <br />Latest version in ATK: 1.5.0_rc0 | ||
<br />Available since: ATK 5.7 | <br />Available since: ATK 5.7 | ||
<br /> | <br /> | ||
| Line 62: | Line 70: | ||
Description: | Description: | ||
<br />Usage: | <br />Usage: | ||
Register neccesary javascript and style: | Register neccesary javascript and style: | ||
<syntaxhighlight lang="php"> | |||
pfPage::register_javascript_file($config_platformroot."atk/javascript/window/window.js", false); | pfPage::register_javascript_file($config_platformroot."atk/javascript/window/window.js", false); | ||
pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/default.css", false); | pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/default.css", false); | ||
</syntaxhighlight> | |||
Register custom style: | Register custom style: | ||
<syntaxhighlight lang="php"> | |||
pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/alphacube.css", false); | pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/alphacube.css", false); | ||
</syntaxhighlight> | |||
In javascript-file (see URL for other examples): | In javascript-file (see URL for other examples): | ||
<javascript> | |||
Dialog.alert("Your alert dialog", | Dialog.alert("Your alert dialog", | ||
{ | { | ||
windowParameters: {className: 'alphacube', width:300, height:70}, okLabel: "close", ok:function(win) {return true;} | windowParameters: {className: 'alphacube', width:300, height:70}, okLabel: "close", ok:function(win) {return true;} | ||
}); | }); | ||
</javascript> | |||
<br />URL: [http://prototype-window.xilinus.com/ http://prototype-window.xilinus.com/] | <br />URL: [http://prototype-window.xilinus.com/ http://prototype-window.xilinus.com/] | ||
<br />Latest version in ATK: 0.96.2 | <br />Latest version in ATK: 0.96.2 | ||
<br />Available since: ATK 5.7 | <br />Available since: ATK 5.7 | ||
<br /> | <br /> | ||
| Line 85: | Line 100: | ||
<br />URL: [http://script.aculo.us/ http://script.aculo.us/] | <br />URL: [http://script.aculo.us/ http://script.aculo.us/] | ||
<br />Latest version in ATK: 1.6.1 | <br />Latest version in ATK: 1.6.1 | ||
<br />Available since: ATK 5.7 | <br />Available since: ATK 5.7 | ||
<br /> | <br /> | ||
| Line 93: | Line 108: | ||
<br />URL: [http://openrico.org/ http://openrico.org/] | <br />URL: [http://openrico.org/ http://openrico.org/] | ||
<br />Latest version in ATK: 1.1.2 | <br />Latest version in ATK: 1.1.2 | ||
<br />Available since: ATK 5.7 | <br />Available since: ATK 5.7 | ||
== Simpletest test framework == | == Simpletest test framework == | ||
| Line 105: | Line 120: | ||
Description: | Description: | ||
<br />Usage: | <br />Usage: | ||
You can use Smarty like this: | |||
<syntaxhighlight lang="php"> | |||
$smarty = atkSmarty::getInstance(); | |||
$smarty->assign('var','great'); | |||
$parsed_template = $smarty->fetch(moduleDir('mymodule').'templates/mytemplate.tpl'); | |||
</syntaxhighlight> | |||
Or with the '''string''' resource: | |||
<syntaxhighlight lang="php"> | |||
$smarty = atkSmarty::getInstance(); | |||
$smarty->assign('var','great'); | |||
$parsed_template = $smarty->fetch('string: ATK is {$var}!'); | |||
</syntaxhighlight> | |||
<br />URL: [http://smarty.php.net/ http://smarty.php.net/] | <br />URL: [http://smarty.php.net/ http://smarty.php.net/] | ||
<br />Latest version in ATK: 2.6.11 | <br />Latest version in ATK: 2.6.11 | ||
| Line 122: | Line 152: | ||
<br />URL: [http://www.ejeliot.com/ http://www.ejeliot.com/] | <br />URL: [http://www.ejeliot.com/ http://www.ejeliot.com/] | ||
<br />Latest version in ATK: no version information available | <br />Latest version in ATK: no version information available | ||
<br />Available since: ATK 5.7 | <br />Available since: ATK 5.7 | ||
<!-- | <!-- | ||
Latest revision as of 08:55, 11 March 2011
ADOdb Date Library, part of the ADOdb abstraction library
Description:
Usage:
URL: http://adodb.sourceforge.net/
Latest version in ATK: 4.54
Available since: ATK 4
Crossbrowser DHTML functions
Description:
Usage:
URL: http://www.wallner-software.com
Latest version in ATK: 1.0
Available since: ATK 2
FCKeditor
Description: WYSIWYG editor.
Usage:
$this->add(new atkFckAttribute('text'));
URL: http://www.fckeditor.net/
Latest version in ATK: 2.2
Available since: ATK 5.2.0
PHPMailer
Description:
Usage:
You can use the PHPMailer by calling the atkMailer, which is a wrapper for the PHPMailer. See example below:
$mailer = atknew('atk.utils.atkmailer');
$mailer->isHtml(true);
$mailer->AddAddress("mailto@mail.org");
$mailer->FromName = "ATK Application Mailer";
$mailer->From = 'mailer@achievo.org';
$mailer->Subject = 'Welcome to the ATK Application!';
$mailer->Body = nl2br('Welcome to the ATK Application
We, the team, wish to thank you for making use of our ATK Application.
Yours Truly,
The Team.');
$mailer->Send();
You can use all the methods described in the PHPMailer documentation.
URL: http://phpmailer.sourceforge.net/
Latest version in ATK: 1.73
Available since: ATK 5.6
PEAR::Services_JSON
Description:
Usage:
URL: http://pear.php.net/pepr/pepr-proposal-show.php?id=198
Latest version in ATK: 1.1
Available since: ATK saruman branch (unreleased)
Prototype javascript library
Description:
Usage:
URL: http://www.sergiopereira.com/articles/prototype.js.html
Latest version in ATK: 1.5.0_rc0
Available since: ATK 5.7
Prototype window class javascript library
Description:
Usage:
Register neccesary javascript and style:
pfPage::register_javascript_file($config_platformroot."atk/javascript/window/window.js", false);
pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/default.css", false);
Register custom style:
pfPage::register_stylesheet_file(".".$config_platformroot."atk/javascript/window/themes/alphacube.css", false);
In javascript-file (see URL for other examples): <javascript>
Dialog.alert("Your alert dialog",
{
windowParameters: {className: 'alphacube', width:300, height:70}, okLabel: "close", ok:function(win) {return true;}
});
</javascript>
URL: http://prototype-window.xilinus.com/
Latest version in ATK: 0.96.2
Available since: ATK 5.7
Script.aculo.us javascript library
Description:
Usage:
URL: http://script.aculo.us/
Latest version in ATK: 1.6.1
Available since: ATK 5.7
Rico javascript library
Description:
Usage:
URL: http://openrico.org/
Latest version in ATK: 1.1.2
Available since: ATK 5.7
Simpletest test framework
Description:
Usage:
URL: http://www.lastcraft.com/simple_test.php
Latest version in ATK: 1.0
Available since: ATK 5.2
Smarty
Description:
Usage:
You can use Smarty like this:
$smarty = atkSmarty::getInstance();
$smarty->assign('var','great');
$parsed_template = $smarty->fetch(moduleDir('mymodule').'templates/mytemplate.tpl');
Or with the string resource:
$smarty = atkSmarty::getInstance();
$smarty->assign('var','great');
$parsed_template = $smarty->fetch('string: ATK is {$var}!');
URL: http://smarty.php.net/
Latest version in ATK: 2.6.11
Available since: ATK 5.0
The DHTML / JavaScript Calendar
Description:
Usage:
URL: http://www.dynarch.com/projects/calendar/
Latest version in ATK: 0.9.2
Available since: ATK 4
The PhpCaptcha class by Edward Eliot
Description:
Usage: the PhpCaptcha class is used in the atkcaptchaattribute
URL: http://www.ejeliot.com/
Latest version in ATK: no version information available
Available since: ATK 5.7