/** * Save Gallery Content * */ public static function SectionFromPost_Gallery(&$section) { if (empty($_POST['images'])) { $section['content'] = '<ul class="gp_gallery"><li class="gp_to_remove"></li></ul>'; return; } ob_start(); echo '<ul class="gp_gallery">'; foreach ($_POST['images'] as $i => $image) { $thumb_path = \gp\tool::ThumbnailPath($image); $caption = $_POST['captions'][$i]; \gp\tool\Files::cleanText($caption); echo '<li>'; echo '<a class="gallery_gallery" title="' . htmlspecialchars($caption) . '" data-arg="gallery_gallery" href="' . $image . '" data-cmd="gallery">'; echo '<img src="' . $thumb_path . '" alt="" /></a>'; echo '<div class="caption">'; echo $caption; echo '</div>'; echo '</li>'; } echo '</ul>'; $section['content'] = ob_get_clean(); $section['images'] = $_POST['images']; $section['captions'] = $_POST['captions']; }
function Save404() { $text =& $_POST['gpcontent']; \gp\tool\Files::cleanText($text); $this->error_data['404_TEXT'] = $text; if ($this->SaveData_Message()) { return true; } $this->Edit404($text); return false; }