album = $album; $v->domain = $input->server("SERVER_NAME"); $user = identity::active_user(); $v->access_key = rest::get_access_key($user->id)->access_key; $v->protocol = (empty($_SERVER["HTTPS"]) OR $_SERVER["HTTPS"] === "off") ? "http" : "https"; $v->file_filter = addslashes(json_encode( array("photo" => array("label" => "Images", "types" => array("*.jpg", "*.jpeg", "*.png", "*.gif")), "movie" => array("label" => "Movies", "types" => array("*.flv", "*.mp4"))))); $v->sort_order = addslashes( json_encode(array("ASC" => (string)t("Ascending"), "DESC" => (string)t("Descending")))); $sort_fields = array(); foreach (album::get_sort_order_options() as $field => $description) { $sort_fields[$field] = (string)$description; } $v->sort_fields = addslashes(json_encode($sort_fields)); $v->rest_uri = url::site("rest") . "/"; $v->controller_uri = url::site("organize") . "/"; $v->swf_url = url::file("modules/organize/lib/Gallery3WebClient.swf?") . filemtime(MODPATH . "organize/lib/Gallery3WebClient.swf"); print $v; } function add_album_fields() { print json_encode(array("title" => (string)t("Title"), "description" => (string)t("Description"), "name" => (string)t("Directory name"), "slug" => (string)t("Internet Address"))); } }