<?php /** * Codepress editor * This module uses CodePress editor released under * GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 * * @author Paul Bukowski <*****@*****.**> * @copyright Copyright © 2008, Telaxus LLC * @license MIT * @version 0.1 * @package epesi-libs * @subpackage codepress */ defined("_VALID_ACCESS") || die('Direct access forbidden'); HTML_Quickform::registerElementType('codepress', 'modules/Libs/Codepress/HTML_Quickform_codepress_0.php', 'HTML_Quickform_codepress'); load_js('modules/Libs/Codepress/0.9.6/codepress.js'); eval_js_once('document.observe("e:load", function(){CodePress.run();})'); Libs_QuickFormCommon::add_on_submit_action('CodePress.update(this)'); class Libs_CodepressCommon extends ModuleCommon { }
/** * This module uses CKeditor editor released under * GNU Lesser General Public License Version 2.1 or later (the "LGPL") * CKeditor - The text editor for Internet - http://www.Ckeditor.net * Copyright (C) 2003-2007 Frederico Caldeira Knabben * * @author Paul Bukowski <*****@*****.**> * @copyright Copyright © 2007, Telaxus LLC * @version 1.0 * @license MIT * @package epesi-libs * @subpackage Ckeditor */ defined("_VALID_ACCESS") || die('Direct access forbidden'); if (!MOBILE_DEVICE && class_exists('HTML_Quickform')) { HTML_Quickform::registerElementType('ckeditor', 'modules/Libs/CKEditor/ckeditor.php', 'HTML_Quickform_ckeditor'); /* load_js('modules/Libs/CKEditor/onsubmit.js');*/ load_css('modules/Libs/CKEditor/frontend.css'); /* Libs_QuickFormCommon::add_on_submit_action("if(typeof(ckeditor_onsubmit)!='undefined')ckeditor_onsubmit(this)");*/ } class Libs_CKEditorCommon extends ModuleCommon { public static function QFfield_cb(&$form, $field, $label, $mode, $default, $desc, $rb_obj, $display_callbacks) { if ($mode == 'add' || $mode == 'edit') { $fck = $form->addElement('ckeditor', $field, $label); $fck->setFCKProps('99%', '300', true); if ($mode == 'edit') { $form->setDefaults(array($field => $default)); } } else {
/** * Form builder * @package CMS * @author Christopher Troup <*****@*****.**> * @version 2.0 */ require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/element.php'; require_once dirname(__FILE__) . '/PEAR/HTML/QuickForm/advmultiselect.php'; require_once 'HTML/QuickForm/Renderer/ArraySmarty.php'; require_once 'HTML/QuickForm/Renderer/Tableless.php'; // Register the fckeditor form element type with the QuickForm object. HTML_Quickform::registerElementType('fckeditor', 'HTML_Quickform_fckeditor.php', 'HTML_Quickform_fckeditor'); HTML_Quickform::registerElementType('tinymce', 'HTML_Quickform_tinymce.php', 'HTML_Quickform_tinymce'); HTML_Quickform::registerElementType('swfchart', 'HTML_Quickform_swfchart.php', 'HTML_Quickform_swfchart'); HTML_Quickform::registerElementType('dbimage', 'HTML_Quickform_dbimage.php', 'HTML_Quickform_dbimage'); /** * Create object oriented Forms * * This is just a wrapper for the PEAR Quickform package. It simplifies syntax as well as registers custom form element * types, such as FCKeditor. * * @package CMS * @subpackage Core */ class Form extends HTML_QuickForm { public function display() { $renderer =& new HTML_QuickForm_Renderer_Tableless(); $this->accept($renderer);