Esempio n. 1
0
 function nggSmoothReplace($content)
 {
     global $wpdb, $data_ngs;
     list($begin, $middle, $end) = $this->nggSmoothFindStringBetween($content, "[smooth", "]");
     if ($begin == $content) {
         return $content;
     }
     // New Way [smooth=id:; width:; height:; timed:; delay:; transition:; arrows:; info:; carousel:; text:; open:; links:;]
     $middleValues = substr($middle, 0, -1);
     // Remove last brackets
     $middleValues = explode("=", $middleValues);
     $middleValues = explode(";", $middleValues[1]);
     $final = array();
     foreach ($middleValues as $value) {
         list($key, $value) = explode(":", $value);
         if (trim($key) != "") {
             $final[trim(strtolower($key))] = trim($value);
         }
     }
     $info = $this->get_values($final);
     $info["galleryID"] = $wpdb->get_var("SELECT gid FROM {$wpdb->nggallery} WHERE gid  = '" . $info["galleryID"] . "' ");
     if (!$info["galleryID"]) {
         $info["galleryID"] = $wpdb->get_var("SELECT gid FROM {$wpdb->nggallery} WHERE name = '" . $info["galleryID"] . "' ");
     }
     if (!$info["galleryID"]) {
         return $begin . $middle . $end;
     }
     if ($info["galleryID"]) {
         if ($info["use_frames"]) {
             $middle = $this->nggSmoothFrame($info);
         } else {
             $middle = nggSmoothShow($info);
         }
     }
     return $this->nggSmoothReplace($begin . $middle . $end);
     // More than one gallery per post
 }
Esempio n. 2
0
$info = array();
$info["galleryID"] = $_REQUEST["galleryID"];
$info["width"] = $_REQUEST["width"];
$info["height"] = $_REQUEST["height"];
$info["timed"] = $_REQUEST["timed"];
$info["showArrows"] = $_REQUEST["showArrows"];
$info["showCarousel"] = $_REQUEST["showCarousel"];
$info["embedLinks"] = $_REQUEST["embedLinks"];
$info["delay"] = $_REQUEST["delay"];
$info["defaultTransition"] = $_REQUEST["defaultTransition"];
$info["showInfopane"] = $_REQUEST["showInfopane"];
$info["textShowCarousel"] = $_REQUEST["textShowCarousel"];
$info["showCarouselOpen"] = $_REQUEST["showCarouselOpen"];
$info["margin"] = $_REQUEST["margin"];
$info["align"] = $_REQUEST["align"];
include "../../../wp-config.php";
?>
<html>
  <head>
    <?php 
nggSmoothHead();
?>
  </head>
  
  <body>
    <?php 
echo nggSmoothShow($info);
?>
  </body>  
</html>