Plugin Directory

Changeset 206027


Ignore:
Timestamp:
02/15/2010 04:05:11 PM (16 years ago)
Author:
rickota
Message:
 
Location:
silverlight-gallery/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • silverlight-gallery/trunk/image_xml.php

    r204252 r206027  
    33$iPostID = $_GET["id"];
    44
    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');
     5require($subdir.'../../../wp-blog-header.php');
    136
    147if (!empty($iPostID)) {
  • silverlight-gallery/trunk/sl-gallery.php

    r205963 r206027  
    3838define("SLGALLERY_META_START", "[sl-gallery:");
    3939define("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>");
     40define("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>");
    4141
    4242function slgallery_the_content($content) {
     
    6565    $pageNumbers = "";
    6666    $thumbnails = "";
    67     $preloader = "";
    6867    $fill = "";
    6968    $bgColor = "";
     
    8887            $thumbnails = substr($meta[$i],strrpos($meta[$i],"=")+1);
    8988            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;
    9389        } elseif (is_numeric(strpos($meta[$i],"fill="))) {
    9490            $fill = substr($meta[$i],strrpos($meta[$i],"=")+1);
     
    124120    if ($thumbnails=="0") $thumbnails="false";
    125121    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     }
    134122    if (!($fill=="uniformtofill" || $fill=="uniform"))  $fill = get_option('slgallery_standard_fill');
    135123    if (strlen($bgColor)<2) {
     
    152140    $output = str_replace("###PAGENUMBERS###", $pageNumbers, $output);
    153141    $output = str_replace("###THUMBNAILS###", $thumbnails, $output);
    154     $output = str_replace("###PRELOAD###", $preloader, $output);
    155142    $output = str_replace("###FILL###", $fill, $output);
    156143    $output = str_replace("###BGCOLOR###", $bgColor, $output);
     
    161148
    162149function 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>";
    164151}
    165152
     
    181168    $standard_pagenumbers = 'slgallery_standard_pagenumbers';
    182169    $standard_thumbnails = 'slgallery_standard_thumbnails';
    183     $standard_preloader = 'slgallery_standard_preloader';
    184170    $standard_fill = 'slgallery_standard_fill';
    185171    $standard_bgColor = 'slgallery_standard_bgColor';
     
    193179    $pagenumbers_val = get_option($standard_pagenumbers);
    194180    $thumbnails_val = get_option($standard_thumbnails);
    195     $preloader_val = get_option($standard_preloader);
    196181    $fill_val = get_option($standard_fill);
    197182    $bgColor_val = get_option($standard_bgColor);
     
    219204        else
    220205            update_option($standard_thumbnails, "false");
    221         if ($_POST[$standard_preloader] == "on")
    222             update_option($standard_preloader, "true");
    223         else
    224             update_option($standard_preloader, "false");
    225206        update_option($standard_fill, $_POST[$standard_fill]);
    226207        update_option($standard_bgColor, $_POST[$standard_bgColor]);
     
    233214        $pagenumbers_val = get_option($standard_pagenumbers);
    234215        $thumbnails_val = get_option($standard_thumbnails);
    235         $preloader_val = get_option($standard_preloader);
    236216        $fill_val = get_option($standard_fill);
    237217        $bgColor_val = get_option($standard_bgColor);
     
    277257
    278258                    <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>
    284259                        <td width="200px"><strong><label>Fill mode</label>: </strong></p></td>
    285260                        <td>
     
    329304    add_option("slgallery_standard_pagenumbers","false");
    330305    add_option("slgallery_standard_thumbnails","false");
    331     add_option("slgallery_standard_preloader","true");
    332306    add_option("slgallery_standard_fill","uniformtofill");
    333307    add_option("slgallery_standard_bgColor","#ffffff");
     
    369343
    370344function add_slgallery_tinymce_plugin($plugin_array) {
    371    $path = urlPlugins("sl-gallery")."/editor_plugin.js";
     345   $path = urlPlugins("silverlight-gallery")."/editor_plugin.js";
    372346   $plugin_array['slgallery'] = $path;
    373347   return $plugin_array;
Note: See TracChangeset for help on using the changeset viewer.