Changeset 206027
- Timestamp:
- 02/15/2010 04:05:11 PM (16 years ago)
- Location:
- silverlight-gallery/trunk
- Files:
-
- 2 edited
-
image_xml.php (modified) (1 diff)
-
sl-gallery.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
silverlight-gallery/trunk/image_xml.php
r204252 r206027 3 3 $iPostID = $_GET["id"]; 4 4 5 $path = split('/',$_SERVER['PHP_SELF']); 6 7 $subdir = ""; 8 for($i=0;$i<count($path)-2;$i++) { 9 $subdir .= "../"; 10 } 11 12 require($subdir.'wp-blog-header.php'); 5 require($subdir.'../../../wp-blog-header.php'); 13 6 14 7 if (!empty($iPostID)) { -
silverlight-gallery/trunk/sl-gallery.php
r205963 r206027 38 38 define("SLGALLERY_META_START", "[sl-gallery:"); 39 39 define("SLGALLERY_META_END", "]"); 40 define("SLGALLERY_TARGET", "<div id=\"silverlightControlHost\"><object data=\"data:application/x-silverlight-2,\" type=\"application/x-silverlight-2\" width=\"###WIDTH###\" height=\"###HEIGHT###\" style='outline:none'>\n<param name=\"source\" value=\"".urlPlugins("sl-gallery")."/ClientBin/pluginSL.xap\"/>\n<param name=\"background\" value=\"###BGCOLOR###\" />\n<param name=\"windowless\" value=\"###BGMODE###\" />\n<param name=\"minRuntimeVersion\" value=\"###MINVER###\" />\n###PRELOAD###<param name=\"initParams\" value=\"GalleryUrl=".urlPlugins("sl-gallery")."/image_xml.php?id=###POSTID###,\n\t leftArrow=###LEFTARROW###, \n\trightArrow=###RIGHTARROW###, \n\tpageNumbers=###PAGENUMBERS###, \n\tthumbnails=###THUMBNAILS###, \n\tfill=###FILL######OTHERPARAMS###\" />\n<param name=\"autoupgrade\" value=\"true\" />\n<param name=\"enableHtmlAccess\" value=\"true\" /><a href=\"http://go.microsoft.com/fwlink/?LinkID=149156\" style=\"text-decoration: none;\"><img src=\"http://storage.timheuer.com/sl4wp-ph.png\" alt=\"Install Microsoft Silverlight\" style=\"border-style: none; width:400px; height:200px\"/></a></object></div>");40 define("SLGALLERY_TARGET", "<div class=\"silverlightControlHost\"><object data=\"data:application/x-silverlight-2,\" type=\"application/x-silverlight-2\" width=\"###WIDTH###\" height=\"###HEIGHT###\" style='outline:none'>\n<param name=\"source\" value=\"".urlPlugins("sl-gallery")."/ClientBin/pluginSL.xap\"/>\n<param name=\"background\" value=\"###BGCOLOR###\" />\n<param name=\"windowless\" value=\"###BGMODE###\" />\n<param name=\"minRuntimeVersion\" value=\"###MINVER###\" />\n<param name=\"initParams\" value=\"GalleryUrl=".urlPlugins("sl-gallery")."/image_xml.php?id=###POSTID###,\n\t leftArrow=###LEFTARROW###, \n\trightArrow=###RIGHTARROW###, \n\tpageNumbers=###PAGENUMBERS###, \n\tthumbnails=###THUMBNAILS###, \n\tfill=###FILL######OTHERPARAMS###\" />\n<param name=\"autoupgrade\" value=\"true\" />\n<param name=\"enableHtmlAccess\" value=\"true\" /><a href=\"http://go.microsoft.com/fwlink/?LinkID=149156\" style=\"text-decoration: none;\"><img src=\"http://storage.timheuer.com/sl4wp-ph.png\" alt=\"Install Microsoft Silverlight\" style=\"border-style: none; width:400px; height:200px\"/></a></object></div>"); 41 41 42 42 function slgallery_the_content($content) { … … 65 65 $pageNumbers = ""; 66 66 $thumbnails = ""; 67 $preloader = "";68 67 $fill = ""; 69 68 $bgColor = ""; … … 88 87 $thumbnails = substr($meta[$i],strrpos($meta[$i],"=")+1); 89 88 if ($thumbnails=="") $thumbnails=0; 90 } elseif (is_numeric(strpos($meta[$i],"preloader="))) {91 $preloader = substr($meta[$i],strrpos($meta[$i],"=")+1);92 if ($preloader=="") $preloader=0;93 89 } elseif (is_numeric(strpos($meta[$i],"fill="))) { 94 90 $fill = substr($meta[$i],strrpos($meta[$i],"=")+1); … … 124 120 if ($thumbnails=="0") $thumbnails="false"; 125 121 if (!($thumbnails=="true" || $thumbnails=="false")) $thumbnails = get_option('slgallery_standard_thumbnails'); 126 if ($preloader=="1") $preloader="true";127 if ($preloader=="0") $preloader="false";128 if (!($preloader=="true" || $preloader=="false")) $preloader = get_option('slgallery_standard_preloader');129 if ($preloader=="true") {130 $preloader = '';131 } else {132 $preloader = '<param name="splashscreensource" value="'.urlPlugins("sl-gallery").'/ClientBin/preloadSL.xaml" />';133 }134 122 if (!($fill=="uniformtofill" || $fill=="uniform")) $fill = get_option('slgallery_standard_fill'); 135 123 if (strlen($bgColor)<2) { … … 152 140 $output = str_replace("###PAGENUMBERS###", $pageNumbers, $output); 153 141 $output = str_replace("###THUMBNAILS###", $thumbnails, $output); 154 $output = str_replace("###PRELOAD###", $preloader, $output);155 142 $output = str_replace("###FILL###", $fill, $output); 156 143 $output = str_replace("###BGCOLOR###", $bgColor, $output); … … 161 148 162 149 function slgallery_wp_head() { 163 echo "< style type=\"text/css\">\n<!-- Silverlight WordPress Plugin -->\n#silverlightControlHost{width:100%,height:100%;}\n</style>";150 echo "<!-- Silverlight WordPress Plugin -->\n<style type=\"text/css\">\n.silverlightControlHost { width:100%; height:100%; }\n</style>"; 164 151 } 165 152 … … 181 168 $standard_pagenumbers = 'slgallery_standard_pagenumbers'; 182 169 $standard_thumbnails = 'slgallery_standard_thumbnails'; 183 $standard_preloader = 'slgallery_standard_preloader';184 170 $standard_fill = 'slgallery_standard_fill'; 185 171 $standard_bgColor = 'slgallery_standard_bgColor'; … … 193 179 $pagenumbers_val = get_option($standard_pagenumbers); 194 180 $thumbnails_val = get_option($standard_thumbnails); 195 $preloader_val = get_option($standard_preloader);196 181 $fill_val = get_option($standard_fill); 197 182 $bgColor_val = get_option($standard_bgColor); … … 219 204 else 220 205 update_option($standard_thumbnails, "false"); 221 if ($_POST[$standard_preloader] == "on")222 update_option($standard_preloader, "true");223 else224 update_option($standard_preloader, "false");225 206 update_option($standard_fill, $_POST[$standard_fill]); 226 207 update_option($standard_bgColor, $_POST[$standard_bgColor]); … … 233 214 $pagenumbers_val = get_option($standard_pagenumbers); 234 215 $thumbnails_val = get_option($standard_thumbnails); 235 $preloader_val = get_option($standard_preloader);236 216 $fill_val = get_option($standard_fill); 237 217 $bgColor_val = get_option($standard_bgColor); … … 277 257 278 258 <tr> 279 <td width="200px"><strong><label>Display preloader</label>: </strong></p></td>280 <td><input name="<?php echo $standard_preloader; ?>" type="checkbox" <?php if ($preloader_val=="true") echo 'checked="yes"'; ?>/></td>281 </tr>282 283 <tr>284 259 <td width="200px"><strong><label>Fill mode</label>: </strong></p></td> 285 260 <td> … … 329 304 add_option("slgallery_standard_pagenumbers","false"); 330 305 add_option("slgallery_standard_thumbnails","false"); 331 add_option("slgallery_standard_preloader","true");332 306 add_option("slgallery_standard_fill","uniformtofill"); 333 307 add_option("slgallery_standard_bgColor","#ffffff"); … … 369 343 370 344 function add_slgallery_tinymce_plugin($plugin_array) { 371 $path = urlPlugins("s l-gallery")."/editor_plugin.js";345 $path = urlPlugins("silverlight-gallery")."/editor_plugin.js"; 372 346 $plugin_array['slgallery'] = $path; 373 347 return $plugin_array;
Note: See TracChangeset
for help on using the changeset viewer.