public static final function create_textarea($enablewysiwyg, $id, $name, $text, $cols = '80', $rows = '15', $addtext = '', $required = false)
 {
     if ($required) {
         $addtext .= ' required="required"';
     }
     return create_textarea($enablewysiwyg, $text, $id . $name, 'cms_textarea', $name, '', '', $cols, $rows, '', '', $addtext);
 }
 function EditAsArray($adding = false, $tab = 0, $showadmin = false)
 {
     global $gCms;
     $config = $gCms->config;
     $contentops =& $gCms->GetContentOperations();
     $templateops =& $gCms->GetTemplateOperations();
     $ret = array();
     switch ($tab) {
         case 0:
             array_push($ret, array(lang('title') . ':', '<input type="text" name="title" value="' . $this->mName . '">'));
             array_push($ret, array(lang('menutext') . ':', '<input type="text" name="menutext" value="' . $this->mMenuText . '">'));
             array_push($ret, array(lang('parent') . ':', $contentops->CreateHierarchyDropdown($this->mId, $this->mParentId)));
             array_push($ret, array(lang('template') . ':', $templateops->TemplateDropdown('template_id', $this->mTemplateId)));
             array_push($ret, array($this->Lang('multiplealbumtemplate') . ':', $this->TemplateDropdown('album_template', $this->GetPropertyValue('album_template'))));
             array_push($ret, array($this->Lang('Albums') . ':', $this->AlbumsSelect('albums', $this->GetPropertyValue('albums'))));
             break;
         case 1:
             array_push($ret, array(lang('pagealias') . ':', '<input type="text" name="alias" value="' . $this->mAlias . '">'));
             array_push($ret, array(lang('active') . ':', '<input type="checkbox" name="active"' . ($this->mActive ? ' checked="true"' : '') . '>'));
             array_push($ret, array(lang('showinmenu') . ':', '<input type="checkbox" name="showinmenu"' . ($this->mShowInMenu ? ' checked="true"' : '') . '>'));
             array_push($ret, array(lang('metadata') . ':', create_textarea(false, $this->Metadata(), 'metadata', 'pagesmalltextarea', 'metadata', '', '', '80', '6')));
             array_push($ret, array(lang('titleattribute') . ':', '<input type="text" name="titleattribute" maxlength="255" value="' . cms_htmlentities($this->mTitleAttribute) . '" />'));
             array_push($ret, array(lang('tabindex') . ':', '<input type="text" name="tabindex" maxlength="10" value="' . cms_htmlentities($this->mTabIndex) . '" />'));
             array_push($ret, array(lang('accesskey') . ':', '<input type="text" name="accesskey" maxlength="5" value="' . cms_htmlentities($this->mAccessKey) . '" />'));
             if (!$adding && $showadmin) {
                 global $gCms;
                 $userops =& $gCms->GetUserOperations();
                 $ret[] = array(lang('owner') . ':', $userops->GenerateDropdown($this->Owner()));
             }
     }
     return $ret;
 }
 public function GetBlockInput()
 {
     if (!$this->GetBlockProperty('oneline')) {
         return create_textarea($this->GetBlockProperty('usewysiwyg'), $this->content_obj->GetPropertyValue($this->GetBlockProperty('id')), $this->GetBlockProperty('id'), $this->GetBlockProperty('auto_resize') ? 'AdvancedContent_textarea' : '', $this->GetBlockProperty('id'), '', $this->content_obj->GetStylesheet(), $this->GetBlockProperty('cols') ? $this->GetBlockProperty('cols') : 80, $this->GetBlockProperty('rows') ? $this->GetBlockProperty('rows') : 15, '', '', $this->GetBlockProperty('cols') || $this->GetBlockProperty('rows') ? 'style="' . ($this->GetBlockProperty('cols') ? 'width:auto;' : '') . ($this->GetBlockProperty('rows') ? 'height:auto;' : '') . '"' : '');
     } else {
         return '<input id="' . $this->GetBlockProperty('id') . '" type="text"' . ($this->GetBlockProperty('style') != '' ? 'style="' . $this->GetBlockProperty('style') . ' "' : '') . ($this->GetBlockProperty('maxlength') != '' ? ' maxlength="' . $this->GetBlockProperty('maxlength') . ' "' : '') . ($this->GetBlockProperty('size') != '' ? ' size="' . $this->GetBlockProperty('size') . ' "' : '') . ' name="' . $this->GetBlockProperty('id') . '" value="' . htmlspecialchars($this->content_obj->GetPropertyValue($this->GetBlockProperty('id'))) . '" />';
     }
 }
Example #4
0
		<div id="editab1"><?php 
    echo lang('mediatype');
    ?>
</div>
    </div>
    <div class="clearb"></div>
    <div id="page_content">
	<div id="editab0_c">
        <div class="pageoverflow">
            <p class="pagetext"><?php 
    echo lang('media_query');
    ?>
:<br/>
            <div class="pageinput">
              <?php 
    echo create_textarea(false, $media_query, 'media_query', 'pageextrasmalltextarea', 'media_query', '', '', '30', '5', '', '');
    ?>
	      <br/><?php 
    echo lang('media_query_description');
    ?>
            </div>
        </div> 
   </div>
   <div id="editab1_c">	
		<div class="pageoverflow">
			<p class="pagetext"><?php 
    echo lang('mediatype');
    ?>
:</p>
			<div class="pageinput">
<?php 
 public static function cge_wysiwyg($params, &$smarty)
 {
     if (!isset($params['name'])) {
         throw new Exceptin('cge_wysiwyg missing parameter: name');
     }
     $name = trim($params['name']);
     if (isset($params['prefix'])) {
         $name = trim($params['prefix']) . $name;
     }
     $value = '';
     if (isset($params['value'])) {
         $value = trim($params['value']);
     }
     $id = '';
     if (isset($params['id'])) {
         $id = trim($params['id']);
     }
     $rows = 15;
     $cols = 80;
     if (isset($params['rows'])) {
         $rows = (int) $params['rows'];
     }
     if (isset($params['cols'])) {
         $rows = (int) $params['cols'];
     }
     $tmp = create_textarea(true, $value, $name, '', $id, '', '', $cols, $rows);
     if (isset($params['assign'])) {
         $smarty->assign($params['assign'], $tmp);
         return;
     }
     return $tmp;
 }
Example #6
0
$smarty->assign('active_sitedown', 0);
$smarty->assign('active_setup', 0);
$smarty->assign('active_general', $active_tab == 'general' ? 1 : 0);
$smarty->assign('active_sitedown', $active_tab == 'sitedown' ? 1 : 0);
$smarty->assign('active_setup', $active_tab == 'setup' ? 1 : 0);
$smarty->assign('SECURE_PARAM_NAME', CMS_SECURE_PARAM_NAME);
$smarty->assign('CMS_USER_KEY', $_SESSION[CMS_USER_KEY]);
$smarty->assign('sitename', $sitename);
$smarty->assign('global_umask', $global_umask);
$smarty->assign('testresults', $testresults);
$smarty->assign('frontendlang', $frontendlang);
$smarty->assign('frontendwysiwyg', $frontendwysiwyg);
$smarty->assign('nogcbwysiwyg', $nogcbwysiwyg);
$smarty->assign('metadata', $metadata);
$smarty->assign('enablesitedownmessage', $enablesitedownmessage);
$smarty->assign('textarea_sitedownmessage', create_textarea(true, $sitedownmessage, 'sitedownmessage', 'pagesmalltextarea'));
$smarty->assign('urlcheckversion', $urlcheckversion);
$smarty->assign('clear_vc_cache', $clear_vc_cache);
$smarty->assign('disablesafemodewarning', $disablesafemodewarning);
$smarty->assign('allowparamcheckwarnings', $allowparamcheckwarnings);
$smarty->assign('defaultdateformat', $defaultdateformat);
$smarty->assign('enablenotifications', $enablenotifications);
$smarty->assign('sitedownexcludes', $sitedownexcludes);
$smarty->assign('basic_attributes', explode(',', $basic_attributes));
$smarty->assign('thumbnail_width', $thumbnail_width);
$smarty->assign('thumbnail_height', $thumbnail_height);
$smarty->assign('auto_clear_cache_age', $auto_clear_cache_age);
$smarty->assign('pseudocron_granularity', $pseudocron_granularity);
$tmp = array(15 => lang('cron_15m'), 30 => lang('cron_30m'), 60 => lang('cron_60m'), 120 => lang('cron_120m'), 180 => lang('cron_3h'), 360 => lang('cron_6h'), 12 * 60 => lang('cron_12h'), 24 * 60 => lang('cron_24h'), -1 => lang('cron_request'));
$smarty->assign('pseudocron_options', $tmp);
$smarty->assign('lang_pseudocron_granularity', lang('pseudocron_granularity'));
            echo ' checked="checked"';
        }
        ?>
/></p>
            </div>					
			<?php 
    }
    ?>
      
		<div class="pageoverflow">
			<p class="pagetext">*<?php 
    echo lang('content');
    ?>
:</p>
			<p class="pageinput"><?php 
    echo create_textarea($gcb_wysiwyg && $use_wysiwyg, $content, 'content', 'wysiwyg', 'content');
    ?>
</p>
		</div>
		<div class="pageoverflow">
		       <p class="pagetext"><?php 
    echo lang('description');
    ?>
:</p>
		       <p class="pageinput"><textarea name="description"><?php 
    echo $description;
    ?>
</textarea></p>
		</div>
               																		               
	<?php 
Example #8
0
$smarty->assign('active_listcontent', $active_tab == 'listcontent' ? 1 : 0);
$smarty->assign('active_editcontent', $active_tab == 'editcontent' ? 1 : 0);
$smarty->assign('active_sitedown', $active_tab == 'sitedown' ? 1 : 0);
$smarty->assign('active_setup', $active_tab == 'setup' ? 1 : 0);
$smarty->assign('SECURE_PARAM_NAME', CMS_SECURE_PARAM_NAME);
$smarty->assign('CMS_USER_KEY', $_SESSION[CMS_USER_KEY]);
$smarty->assign('sitename', $sitename);
$smarty->assign('global_umask', $global_umask);
$smarty->assign('testresults', $testresults);
$smarty->assign('frontendlang', $frontendlang);
$smarty->assign('frontendwysiwyg', $frontendwysiwyg);
$smarty->assign('nogcbwysiwyg', $nogcbwysiwyg);
$smarty->assign('metadata', $metadata);
$smarty->assign('enablesitedownmessage', $enablesitedownmessage);
$smarty->assign('use_wysiwyg', $use_wysiwyg);
$smarty->assign('textarea_sitedownmessage', create_textarea($use_wysiwyg, $sitedownmessage, 'sitedownmessage', 'pagesmalltextarea'));
$smarty->assign('checkversion', $checkversion);
$smarty->assign('disablesafemodewarning', $disablesafemodewarning);
$smarty->assign('defaultdateformat', $defaultdateformat);
$smarty->assign('enablenotifications', $enablenotifications);
$smarty->assign('sitedownexcludes', $sitedownexcludes);
$smarty->assign('sitedownexcludeadmins', $sitedownexcludeadmins);
$smarty->assign('basic_attributes', explode(',', $basic_attributes));
$smarty->assign('disallowed_contenttypes', explode(',', $disallowed_contenttypes));
$smarty->assign('thumbnail_width', $thumbnail_width);
$smarty->assign('thumbnail_height', $thumbnail_height);
$smarty->assign('allow_browser_cache', $allow_browser_cache);
$smarty->assign('browser_cache_expiry', $browser_cache_expiry);
$smarty->assign('auto_clear_cache_age', $auto_clear_cache_age);
$smarty->assign('pseudocron_granularity', $pseudocron_granularity);
$smarty->assign('listcontent_showalias', $listcontent_showalias);
Example #9
0
    echo lang('name');
    ?>
:</p>
				<p class="pageinput"><input type="text" id="plugin_name" name="plugin_name" maxlength="255" value="<?php 
    echo $plugin_name;
    ?>
" /></p>
			</div>
			<div class="pageoverflow">
				<p class="pagetext">*<?php 
    echo lang('code');
    ?>
</p>
				<p class="pageinput">
				<?php 
    echo create_textarea(false, $code, 'code', 'pagebigtextarea', 'code', '', '', '80', '15', '', 'php');
    ?>
				
				</p>
			</div>
			<div class="pageoverflow">
				<p class="pagetext">&nbsp;</p>
				<p class="pageinput">
						<input type="hidden" name="userplugin_id" value="<?php 
    echo $userplugin_id;
    ?>
" />
						<input type="hidden" id="origpluginname" name="origpluginname" value="<?php 
    echo $orig_plugin_name;
    ?>
" />
 /**
  * A smarty plugin to provide a text area
  */
 public static function smarty_function_cge_textarea($params, $smarty)
 {
     $name = '';
     $wysiwyg = false;
     $syntax = false;
     $content = '';
     $class = '';
     $id = '';
     $rows = 10;
     $cols = 80;
     $required = false;
     if (isset($params['prefix'])) {
         $name = trim($params['prefix']);
     }
     if (isset($params['name'])) {
         $name .= trim($params['name']);
     }
     if (isset($params['wysiwyg'])) {
         $wysiwyg = cge_utils::to_bool(cge_utils::get_param($params, 'wysiwyg'));
     }
     if (isset($params['syntax'])) {
         $syntax = cge_utils::to_bool(cge_utils::get_param($params, 'syntax'));
     }
     if (isset($params['required'])) {
         $required = cge_utils::to_bool(cge_utils::get_param($params, 'required'));
     }
     if (isset($params['value'])) {
         $content = $params['value'];
     }
     if (isset($params['content'])) {
         $content = $params['content'];
     }
     if (isset($params['class'])) {
         $class = trim($params['class']);
     }
     if ($name == '') {
         return;
     }
     if ($wysiwyg) {
         $syntax = false;
     }
     // no syntax and wysiwyg at the same time.
     $id = trim(cge_utils::get_param($params, 'id', $id));
     $rows = (int) cge_utils::get_param($params, 'rows', $rows);
     $rows = max(1, $rows);
     $cols = (int) cge_utils::get_param($params, 'cols', $cols);
     $cols = max(1, $cols);
     $addtext = '';
     if (isset($params['required'])) {
         $required = cge_utils::to_bool($params['required']);
         if ($required && !$wysiwyg) {
             $addtext .= ' required';
         }
     }
     if ($ph = cge_utils::get_param($params, 'placeholder')) {
         $addtext .= ' placeholder="' . $ph . '"';
     }
     if ($maxlen = (int) cge_utils::get_param($params, 'maxlength')) {
         $addtext .= ' placeholder="' . $maxlen . '"';
     }
     $output = create_textarea($wysiwyg, $content, $name, $class, $id, '', '', $cols, $rows, '', $syntax, $addtext);
     if (isset($params['assign'])) {
         $smarty->assign(trim($params['assign']), $output);
         return;
     }
     return $output;
 }
Example #11
0
				<p class="pagetext">*<?php 
    echo lang('code');
    ?>
</p>
				<div class="pageinput"><?php 
    echo create_textarea(false, $code, 'code', 'pagebigtextarea', 'code', '', '', '80', '15', '', 'php');
    ?>
</div>
			</div>
			<div class="pageoverflow">
				<p class="pagetext"><?php 
    echo lang('description');
    ?>
</p>
				<div class="pageinput"><?php 
    echo create_textarea(false, $description, 'description', 'pagebigtextarea', 'description', '', '', '80', '15');
    ?>
</div>
			</div>			
			
			<div class="pageoverflow">
				<p class="pagetext">&nbsp;</p>
				<div class="pageinput">
						<input type="hidden" name="userplugin_id" value="<?php 
    echo $userplugin_id;
    ?>
" />
						<input type="hidden" id="origpluginname" name="origpluginname" value="<?php 
    echo $orig_plugin_name;
    ?>
" />
    public static function DisplayAttributes(&$content_obj, $one, $adding)
    {
        switch ($one) {
            case 'template':
                $templateops =& cmsms()->GetTemplateOperations();
                return array(lang('template') . ':', $templateops->TemplateDropdown('template_id', $content_obj->TemplateId(), 'onchange="document.Edit_Content.submit()"'));
            case 'pagemetadata':
                return array(lang('page_metadata') . ':', create_textarea(false, $content_obj->Metadata(), 'metadata', 'pagesmalltextarea', 'metadata', '', '', '80', '6'));
            case 'pagedata':
                return array(lang('pagedata_codeblock') . ':', create_textarea(false, $content_obj->GetPropertyValue('pagedata'), 'pagedata', 'pagesmalltextarea', 'pagedata', '', '', '80', '6'));
            case 'searchable':
                $searchable = $content_obj->GetPropertyValue('searchable');
                if ($searchable == '') {
                    $searchable = 1;
                }
                return array(lang('searchable') . ':', '<div class="hidden" ><input type="hidden" name="searchable" value="0" /></div>
					<input type="checkbox" name="searchable" value="1" ' . ($searchable == 1 ? 'checked="checked"' : '') . ' />');
            case 'disable_wysiwyg':
                $disableWysiwyg = $content_obj->GetPropertyValue('disable_wysiwyg');
                if ($disableWysiwyg == '') {
                    $disableWysiwyg = 0;
                }
                return array(lang('disable_wysiwyg') . ':', '<div class="hidden" ><input type="hidden" name="disable_wysiwyg" value="0" /></div>
					<input type="checkbox" name="disable_wysiwyg" value="1"  ' . ($disableWysiwyg == 1 ? 'checked="checked"' : '') . ' onclick="this.form.submit()" />');
            default:
                return false;
        }
    }
Example #13
0
 /**
  * Returns the xhtml equivalent of a textarea.	Also takes Syntax hilighter preference
  * into consideration if it's called from the admin side.
  *
  * @param string The id given to the module on execution
  * @param string The text to display in the textarea's content
  * @param string The html name of the textarea
  * @param string The CSS class to associate this textarea to
  * @param string The html id to give to this textarea
  * @param string The encoding to use for the content
  * @param string The text of the stylesheet associated to this content.	 Only used for certain WYSIWYGs
  * @param string The number of characters wide (columns) the resulting textarea should be
  * @param string The number of characters high (rows) the resulting textarea should be
  * @param string Additional text for the text area tag.
  * @return string
  */
 function CreateSyntaxArea($id, $text, $name, $classname = '', $htmlid = '', $encoding = '', $stylesheet = '', $cols = '80', $rows = '15', $addtext = '')
 {
     return create_textarea(false, $text, $id . $name, $classname, $htmlid, $encoding, $stylesheet, $cols, $rows, '', 'html', $addtext);
 }
    function display_single_element($one, $adding)
    {
        switch ($one) {
            case 'template':
                $templateops =& cmsms()->GetTemplateOperations();
                return array(lang('template') . ':', $templateops->TemplateDropdown('template_id', $this->mTemplateId, 'onchange="document.Edit_Content.submit()"'));
            case 'pagemetadata':
                return array(lang('page_metadata') . ':', create_textarea(false, $this->mMetadata, 'metadata', 'pagesmalltextarea', 'metadata', '', '', '80', '6'));
            case 'pagedata':
                return array(lang('pagedata_codeblock') . ':', create_textarea(false, $this->GetPropertyValue('pagedata'), 'pagedata', 'pagesmalltextarea', 'pagedata', '', '', '80', '6'));
            case 'searchable':
                $searchable = $this->GetPropertyValue('searchable');
                if ($searchable == '') {
                    $searchable = 1;
                }
                return array(lang('searchable') . ':', '<div class="hidden" ><input type="hidden" name="searchable" value="0" /></div>
					<input type="checkbox" name="searchable" value="1" ' . ($searchable == 1 ? 'checked="checked"' : '') . ' />');
            case 'disable_wysiwyg':
                $disableWysiwyg = $this->GetPropertyValue('disable_wysiwyg');
                if ($disableWysiwyg == '') {
                    $disableWysiwyg = 0;
                }
                return array(lang('disable_wysiwyg') . ':', '<div class="hidden" ><input type="hidden" name="disable_wysiwyg" value="0" /></div>
					<input type="checkbox" name="disable_wysiwyg" value="1"  ' . ($disableWysiwyg == 1 ? 'checked="checked"' : '') . ' onclick="this.form.submit()" />');
            default:
                if (!in_array($one, $this->_advancedAttribs)) {
                    return parent::display_single_element($one, $adding);
                    # ToDo: here we can hook in to add MLE features for title and menutext etc.)
                }
                break;
        }
    }
Example #15
0
    echo lang('name');
    ?>
:</p>
			<p class="pageinput"><input type="text" class="name" name="css_name" maxlength="255" value="<?php 
    echo $css_name;
    ?>
" /></p>
		</div>
		<div class="pageoverflow">
			<p class="pagetext">*<?php 
    echo lang('content');
    ?>
:</p>
			<p class="pageinput">
			<?php 
    echo create_textarea(false, $css_text, 'css_text', 'pagebigtextarea', 'css_text', '', '', '80', '15', '', 'css');
    ?>
			<!-- <textarea class="pagebigtextarea" name="css_text" cols="" rows=""><_?php echo $css_text?></textarea>  -->
			</p>
		</div>
		<div class="pageoverflow">
			<p class="pagetext"><?php 
    echo lang('mediatype');
    ?>
:</p>
			<div class="pageinput">
<?php 
    $existingtypes = array("all", "aural", "braille", "embossed", "handheld", "print", "projection", "screen", "tty", "tv");
    $types = "";
    $types .= "<fieldset style=\"width:60em;\">\n";
    $types .= "<legend>Media type</legend>\n";
Example #16
0
    return;
}
if (FALSE == empty($_GET['message'])) {
    echo $themeObject->ShowMessage(lang($_GET['message']));
}
$output = '';
if (isset($_POST['submit'])) {
    @ob_start();
    $params = array();
    $res = $usertagops->CallUserTag($usertag['userplugin_name'], $params);
    $tmp = @ob_get_contents();
    @ob_end_clean();
    if ($tmp) {
        $output = $tmp;
    } else {
        $output = $res;
    }
}
$hidden = '<input type="hidden" name="' . CMS_SECURE_PARAM_NAME . '" value="' . $_SESSION[CMS_USER_KEY] . '"/>';
$hidden .= '<input type="hidden" name="userplugin_id" value="' . $udt_id . '"/>';
$smarty->assign('hidden', $hidden);
if ($output) {
    $smarty->assign('output', $output);
}
$smarty->assign('udt_name', $usertag['userplugin_name']);
$usertagops = $gCms->GetUserTagOperations();
$smarty->assign('code', create_textarea(false, $usertag['code'], 'code', 'pagebigtextarea', 'code', '', '', '80', '15', '', 'php', 'readonly="readonly"'));
echo $smarty->fetch('runuserplugin.tpl');
echo '<p class="pageback"><a class="pageback" href="' . $themeObject->BackUrl() . '">&#171; ' . lang('back') . '</a></p>' . "\n";
include_once "footer.php";
# vim:ts=4 sw=4 noet
Example #17
0
 private function _display_text_block($blockInfo, $value, $adding)
 {
     $ret = '';
     $oneline = isset($blockInfo['oneline']) && cms_to_bool($blockInfo['oneline']);
     if ($oneline) {
         $size = isset($blockInfo['size']) ? $blockInfo['size'] : 50;
         $maxlength = isset($blockInfo['maxlength']) ? $blockInfo['maxlength'] : 255;
         $ret = '<input type="text" size="' . $size . '" maxlength="' . $maxlength . '" name="' . $blockInfo['id'] . '" value="' . cms_htmlentities($value, ENT_NOQUOTES, get_encoding('')) . '" />';
     } else {
         $block_wysiwyg = true;
         $hide_wysiwyg = $this->GetPropertyValue('disable_wysiwyg');
         if ($hide_wysiwyg) {
             $block_wysiwyg = false;
         } else {
             $block_wysiwyg = $blockInfo['usewysiwyg'] == 'false' ? false : true;
         }
         $ret = create_textarea($block_wysiwyg, $value, $blockInfo['id'], '', $blockInfo['id'], '', $this->stylesheet);
     }
     return $ret;
 }
Example #18
0
:</p>
			<div class="pageinput"><?php 
    echo create_textarea(false, $content, 'content', 'pagebigtextarea', 'content', $encoding, '', '80', '15', '', 'html');
    ?>
</div>
		</div>
		<?php 
    if ($templateops->StylesheetsUsed() > 0) {
        ?>
		<div class="pageoverflow">
			<p class="pagetext"><?php 
        echo lang('stylesheet');
        ?>
:</p>
			<div class="pageinput"><?php 
        echo create_textarea(false, $stylesheet, 'stylesheet', 'pagebigtextarea', '', $encoding, '', '80', '15', '', 'css');
        ?>
</div>
		</div>
	        <?php 
    }
    if ($default == 0) {
        ?>
		<div class="pageoverflow">
			<p class="pagetext"><?php 
        echo lang('active');
        ?>
:</p>
			<div class="pageinput"><input class="pagecheckbox" type="checkbox" name="active" <?php 
        echo $active == 1 ? "checked=\"checked\"" : "";
        ?>
function block2_text()
{
    create_textarea('block2_text', 'Topic introduction blurb.');
}