/** * content_areas_frontend_template_function * * the template function for content areas, returns the * content for the specific content area * * @params array $params * @params object $smarty * @return void */ function content_areas_frontend_template_function($params, &$smarty) { $ContentAreas = ContentAreas::getInstance(); $registered = $ContentAreas->isRegistered($params['name']) ? '' : ' content-area-unregistered'; echo '<div class="content-area' . $registered . '" id="content-area-' . $params['name'] . '">'; echo $ContentAreas->getContent($params['name'], $smarty->getTemplateVars('page_id')); echo '</div>'; }
<?php /** * Content Areas Plugin, Furasta.Org * * @author Conor Mac Aoidh <*****@*****.**> * @licence http://furasta.org/licence.txt The BSD Licence * @version 1 */ if (!defined('AJAX_LOADED') || !defined('AJAX_VERIFIED')) { exit; } $name = addslashes(@$_POST['name']); $content = @$_POST['content']; if ($name == '' || $content == '') { exit; } $ContentAreas = ContentAreas::getInstance(); $ContentAreas->addArea($name, 'all', $content); exit;