function smarty_function_entryGallery($params, &$smarty) { global $berta; if (!empty($params['entry'])) { return BertaGallery::getHTMLForEntry($params['entry']['__raw'], $berta->environment == 'engine'); } return ''; }
if($jsonRequest) { //var_dump($_REQUEST); //echo str_replace(array("\n", "\r"), array('\n', ''), $jsonRequest) . "\n\n"; $decoded = $result = Zend_Json::decode(str_replace(array("\n", "\r"), array('\n', ''), $jsonRequest)); // var_dump($decoded); switch($decoded['property']) { case 'gallery': if($decoded['section'] && $decoded['entry']) { $blog = BertaContent::loadBlog($decoded['section']); $entry = BertaContent::getEntry($decoded['entry'], $blog); echo BertaGallery::getHTMLForEntry($entry, true); } break; case 'galleryEditor': if($decoded['section'] && $decoded['entry']) { $blog = BertaEditor::loadBlog($decoded['section']); $entry = BertaEditor::getEntry($decoded['entry'], $blog); if($entry) {