Plugin Directory

Changeset 555792


Ignore:
Timestamp:
06/10/2012 08:35:09 PM (14 years ago)
Author:
dyerware
Message:

v1.7

Location:
easy-spoiler/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • easy-spoiler/trunk/easy-spoiler-settings.php

    r434396 r555792  
    4747                'text' => 'Do Animations',
    4848                'help' => 'You can turn off animations that use the jQuery library if you suspect a plugin conflict, or if you want faster open/close action.' ),       
     49
    4950            (object) array(
    5051                'title' => 'Animation Speed',
     
    5253                'pick' => (object)array("fast","slow"),
    5354                'help' => 'Speed of the spoiler open/close animations.' ),     
     55/*
     56            (object) array(
     57                'title' => 'Inner Border',
     58                'key' => 'GBL_BORDERSTYLE',
     59                'pick' => (object)array("none", "solid", "dotted", "dashed", "double", "ridge", "inset", "outset"),
     60                'text' => 'Style of the border surrounding the Spoiler contents',
     61                'help' => 'The border width in pixels.  To not show a border, enter 0.' ), 
     62                   
     63            (object) array(
     64                'title' => 'Inner Border Size',
     65                'key' => 'GBL_BORDERWIDTH',
     66                'text' => 'Size of the border surrounding the Spoiler contents',
     67                'help' => 'The border width in pixels.' ), 
     68*/
     69               
    5470            (object) array(
    5571                'title' => 'Show Select Content button',
     
    5773                'style' => 'max-width: 5em',
    5874                'text' => 'Provide the reader a select content button',             
    59                 'help' => 'If checked, a user can click on a select button as a convenience to auto-select the content of a spoiler.' ),                   
     75                'help' => 'If checked, a user can click on a select button as a convenience to auto-select the content of a spoiler.' ),
     76                                   
    6077            (object) array(
    6178                'title' => 'Refresh IFrames (beta)',
     
    6481                'text' => 'Scan for and refresh IFrames internal to a spoiler when opened.',               
    6582                'help' => 'Some browsers do not refresh iframes correctly when going from hidden to seen.  This will atempt to force a refresh of the iframes contained within a spoiler upon opening it.' ),   
     83
     84            (object) array(
     85                'title' => 'Right-to-Left language',
     86                'key' => 'GBL_RTOL',
     87                'style' => 'max-width: 5em',
     88                'text' => 'Place the show/hide button on the left side of the spoiler.',               
     89                'help' => 'If checked, the title will be placed on the right and the button on the left.' ),
    6690        )),
    6791       
     
    104128            'text' => 'The size of the font (in percent)',             
    105129            'help' => 'Provide a number as a percent for the title size.  It may be larger than 100 (120 is the default).' ),
    106            
     130   
     131        (object) array(
     132            'title' => 'Use wordpress theme native text color',
     133            'key' => 'GBL_TITLEUSETHEME',
     134            'style' => 'max-width: 5em',
     135            'text' => 'Render the title text using wordpress theme color',             
     136            'help' => 'If checked, the title text color will be derived from wordpress theme colors.' ),
     137           
     138        (object) array(
     139            'title' => 'Allow Wrapping',
     140            'key' => 'GBL_TITLEWRAP',
     141            'style' => 'max-width: 5em',
     142            'text' => 'Check this if you want long titles to wrap, rather than an elongated single line.',             
     143            'help' => 'The default behavior is to perform wrapping of long titles.  If you wish to dictate no wrapping, uncheck this.  If you enable the shortcode parsing within titles you may want to disable wrapping.' ),
     144                   
    107145        (object) array(
    108146            'title' => 'Embed shortcodes within Title',
     
    128166    (object) array(
    129167        'title' => 'Colors',
    130         'help' => 'These settings change color defaults.',
     168        'help' => 'These settings change color defaults.  They overide any other choices made on this page regarding color.',
    131169        'options' => array(
    132170       
     
    199237                'help' => 'The default button type rendered by the plugin.  Use No Styling to have it render natively.  Flat will provide a borderless link-style button'),
    200238   
     239            (object) array(
     240                'title' => 'Use wordpress theme native text color',
     241                'key' => 'GBL_BUTTONTEXTUSETHEME',
     242                'style' => 'max-width: 5em',
     243                'text' => 'Render the button text using wordpress theme color',             
     244                'help' => 'If checked, the button text color will be derived from wordpress theme colors' ),
     245           
    201246            /*
    202247            (object) array(
  • easy-spoiler/trunk/easy-spoiler.css

    r448242 r555792  
    172172}
    173173
     174.easySpoilerButtonLeft
     175{
     176-moz-border-radius-topleft: 5px;
     177-moz-border-radius-topright: 0px;
     178-moz-border-radius-bottomleft: 0px;
     179-moz-border-radius-bottomright: 0px;
     180border-top-left-radius: 5px;
     181border-top-right-radius: 0px;
     182border-bottom-left-radius: 0px;
     183border-bottom-right-radius: 0px;
     184-webkit-border-top-left-radius: 5px;
     185-webkit-border-top-right-radius: 0px;
     186-webkit-border-bottom-left-radius: 0px;
     187-webkit-border-bottom-right-radius: 0px;   
     188-khtml-border-top-left-radius: 5px;
     189-khtml-border-top-right-radius: 0px;
     190-khtml-border-bottom-left-radius: 0px;
     191-khtml-border-bottom-right-radius: 0px;
     192xpadding: 10px;
     193margin: 0px 0px;
     194xborder: 0px solid;
     195font-size:100%;
     196text-decoration: none;
     197font-weight: normal;
     198}
     199
    174200a.easySpoilerButton:hover
    175201{
  • easy-spoiler/trunk/easy-spoiler.php

    r550025 r555792  
    22/*
    33Plugin Name: Easy Spoiler
    4 Version: 1.6.3
     4Version: 1.7
    55Plugin URI: http://www.dyerware.com/main/products/easy-spoiler
    66Description: Creates an attractive container to hide a spoiler within a post or page.  Works in comments and widgets as well.  Also supports clustering spoilers into groups.
     
    7979    var $GBL_TITLEPARSECHARCLOSE = ')';
    8080    var $GBL_TITLEWRAP = true;
     81   
     82    var $GBL_TITLEUSETHEME = false;
     83    var $GBL_BUTTONTEXTUSETHEME = false;
     84   
     85    var $GBL_RTOL = false;
    8186   
    8287    /*
     
    178183            'GBL_INNERTEXTCOLOR', 'GBL_BUTTONLINE', 'GBL_REFRESHIFRAMES', 'GBL_ANIMATIONSPEED', 'GBL_TITLEBARBUTTON',
    179184            'GBL_SHOWSELECT', 'GBL_SELECT', 'GBL_TITLEBOLD', 'GBL_TITLESIZE', 'GBL_TITLEPARSE', 'GBL_TITLEPARSECHAROPEN',
    180             'GBL_TITLEPARSECHARCLOSE','GBL_TITLEWRAP',
     185            'GBL_TITLEPARSECHARCLOSE','GBL_TITLEWRAP', 'GBL_TITLEUSETHEME', 'GBL_BUTTONTEXTUSETHEME', 'GBL_RTOL',
    181186        );
    182187        $this->op = (object) array();
     
    333338        $scontent = do_shortcode($content);
    334339       
     340        if ($this->GBL_TITLEUSETHEME)
     341        {
     342            $gblTitleColor = '';
     343        }
     344        else
     345        {
     346            $gblTitleColor = 'color:#000000;';
     347        }
     348       
     349        if ($this->GBL_BUTTONTEXTUSETHEME)
     350        {
     351            $gblButtonTextColor = '';
     352        }
     353        else
     354        {
     355            $gblButtonTextColor = 'color:#000000;';
     356        }
    335357       
    336358        if ($this->GBL_CUSTOMCOLORS)
     
    347369        }
    348370       
     371        //var $GBL_RTOL = false;
     372                       
    349373        $toggleList = "";
    350374        $iframe = 'false';
     
    478502       
    479503        $doBorder = "";
    480         $gblTitleColor = "color:#000000;";
     504     
     505       
     506               
     507        if ($this->GBL_TITLEUSETHEME)
     508        {
     509            $gblTitleColor = '';
     510        }
     511        else
     512        {
     513            $gblTitleColor = 'color:#000000;';
     514        }
     515       
     516        if ($this->GBL_BUTTONTEXTUSETHEME)
     517        {
     518            $gblButtonTextColor = '';
     519        }
     520        else
     521        {
     522            $gblButtonTextColor = 'color:#000000;';
     523        }
     524       
    481525        if ($this->GBL_CUSTOMCOLORS)
    482526        {
     
    520564        $titleAction = "";
    521565        $buttonAction = "onclick='wpSpoilerToggle(" . $rowDiv2 . "," .$doAnim. "," .$show. "," .$hide. "," .$speed. "," .$iframe. "); return false;'";
     566
    522567        $buttonCSS = "'easySpoilerButton'";
    523         $buttonOtherCSS = "'easySpoilerButtonOther'";
     568        $buttonOtherCSS = "'easySpoilerButtonOther'";       
     569        if ($this->GBL_RTOL)
     570        {
     571            $buttonCSS = "'easySpoilerButtonLeft'";
     572        }
    524573       
    525574        if ($this->GBL_TITLEBARBUTTON)
    526575        {
    527             $buttonOtherCSS = "'easySpoilerButton'";
     576            if ($this->GBL_RTOL)
     577            {
     578                $buttonCSS = "'easySpoilerButtonLeft'";
     579            }
     580            else
     581            {
     582                $buttonOtherCSS = "'easySpoilerButton'";
     583            }
     584           
    528585            $doShowButtons = "display:none;";
    529586            $titleAction = $buttonAction . " onselectstart='return false;'";
     
    536593        $conclude = "";
    537594   
    538        
    539595        if ($this->GBL_BUTTONSTYLE == "Default")
    540596        {
    541597            if ($this->GBL_CUSTOMCOLORS == false)
    542598            {
    543                 $gblButtonTextColor = 'color:#000000;';
     599                //$gblButtonTextColor = 'color:#000000;';
    544600                $gblButtonBkg = 'background-color:#fcfcfc;background-image:none;';
    545601                $gblButtonLine = 'border-style:solid;border-color:#cccccc;';
     
    621677       }
    622678       
    623 //border-style:{$this->GBL_BORDERSTYLE}; border:{$this->GBL_BORDERWIDTH}px;
     679       if ($this->GBL_RTOL)
     680       {
     681        $row1 = "<th class=" . $titlea . "style='" . $hideButtons . "text-align:left;vertical-align:middle;font-size:100%;" . $gblOuterBkg . $gblLineColor . " white-space:nowrap;'>" .
     682            "<a href='' " . $buttonAction . " id=" . $spoilerbutton . " class=" . $buttonOtherCSS . " value=" . $show .
     683            " align='left' style='font-size:100%;" . $gblButtonTextColor . $gblButtonBkg . $doBorder . $gblButtonLine . $doShowButtons . " margin: 3px 0px 3px 5px; padding: 4px;'>" . $this->GBL_SHOW . "</a>" .
     684            "<a href='' " . $selAction . " class=" . $buttonCSS . " style='font-size:100%;" . $gblButtonTextColor . $gblButtonBkg . $doBorder . $gblButtonLine .
     685            $doSelButtons . " margin: 3px 0px 3px; padding: 4px; ' align='left'>" . $this->GBL_SELECT . "</a>" .
     686            "</th>";
     687           
     688        $row2 = "<th class=" . $titleb . " style='white-space:" . $titleWrap . ";font-weight:" . $fontWeight . ";text-align:right;vertical-align:middle;font-size:" . $titleSize . "%;" .
     689                $gblOuterBkg . $gblLineColor . $gblTitleColor. "'>" . $spoilertitle . "</th>";     
     690       }
     691       else
     692       {
     693        //<th class={$titlea}  style='white-space:{$titleWrap};font-weight:{$fontWeight};text-align:left;vertical-align:middle;font-size:{$titleSize}%;{$gblOuterBkg}{$gblLineColor}{$gblTitleColor}'>{$spoilertitle}</th>
     694        $row1 = "<th class=" . $titlea . " style='white-space:" . $titleWrap . ";font-weight:" . $fontWeight . ";text-align:left;vertical-align:middle;font-size:" . $titleSize . "%;" .
     695                $gblOuterBkg . $gblLineColor . $gblTitleColor. "'>" . $spoilertitle . "</th>";
     696        //<th class={$titleb}  style='{$hideButtons}text-align:right;vertical-align:middle;font-size:100%;{$gblOuterBkg}{$gblLineColor} white-space:nowrap;'>
     697            //<a href='' {$selAction} class={$buttonOtherCSS} style='font-size:100%;{$gblButtonTextColor}{$gblButtonBkg}${doBorder}{$gblButtonLine} ${doSelButtons} margin: 3px 0px 3px; padding: 4px; ' align='right'>{$this->GBL_SELECT}</a><a href='' {$buttonAction} id={$spoilerbutton} class={$buttonCSS} value={$show} align='right' style='font-size:100%;{$gblButtonTextColor}{$gblButtonBkg}${doBorder}{$gblButtonLine}${doShowButtons} margin: 3px 0px 3px 5px; padding: 4px;"'>{$this->GBL_SHOW}</></th>
     698        $row2 = "<th class=" . $titleb . "style='" . $hideButtons . "text-align:right;vertical-align:middle;font-size:100%;" . $gblOuterBkg . $gblLineColor . " white-space:nowrap;'>" .
     699            "<a href='' " . $selAction . " class=" . $buttonOtherCSS . " style='font-size:100%;" . $gblButtonTextColor . $gblButtonBkg . $doBorder . $gblButtonLine . $doSelButtons .
     700            " margin: 3px 0px 3px; padding: 4px; ' align='right'>" . $this->GBL_SELECT . "</a><a href='' " . $buttonAction . " id=" . $spoilerbutton . " class=" . $buttonCSS . " value=" .
     701            $show . " align='right' style='font-size:100%;" . $gblButtonTextColor . $gblButtonBkg . $doBorder . $gblButtonLine . $doShowButtons . " margin: 3px 0px 3px 5px; padding: 4px;'>" .
     702            $this->GBL_SHOW . "</></th>";
     703       }
    624704
    625705       return <<<ecbCode
     
    628708<table class='easySpoilerTable' border='0' style='text-align:center;' align='center' bgcolor='FFFFFF' >
    629709
    630 <tr style='white-space:{$titleWrap};'><th class={$titlea}  style='white-space:{$titleWrap};font-weight:{$fontWeight};text-align:left;vertical-align:middle;font-size:{$titleSize}%;{$gblOuterBkg}{$gblLineColor}{$gblTitleColor}'>{$spoilertitle}</th>
    631 <th class={$titleb}  style='{$hideButtons}text-align:right;vertical-align:middle;font-size:100%;{$gblOuterBkg}{$gblLineColor} white-space:nowrap;'>
    632 <a href='' {$selAction} class={$buttonOtherCSS} style='font-size:100%;{$gblButtonTextColor}{$gblButtonBkg}${doBorder}{$gblButtonLine} ${doSelButtons} margin: 3px 0px 3px; padding: 4px; ' align='right'>{$this->GBL_SELECT}</a><a href='' {$buttonAction} id={$spoilerbutton} class={$buttonCSS} value={$show} align='right' style='font-size:100%;{$gblButtonTextColor}{$gblButtonBkg}${doBorder}{$gblButtonLine}${doShowButtons} margin: 3px 0px 3px 5px; padding: 4px;"'>{$this->GBL_SHOW}</></th>
     710<tr style='white-space:{$titleWrap};'>
     711{$row1}
     712{$row2}
    633713</tr>
    634714<tr><td class='easySpoilerRow' colspan='2' style='{$gblLineColor}'><div id='{$rowDiv}' class='easySpoilerSpoils'  style='display:none; white-space:wrap; overflow:auto; vertical-align:middle;{$gblInnerBkg}${gblInnerTextColor}{$gblLineColor}'>
  • easy-spoiler/trunk/readme.txt

    r550025 r555792  
    55Tags: spoiler,hint,tip,answer,hidden,hide,mobile,shortcode,dyerware
    66Requires at least: 2.8
    7 Tested up to: 3.3.1
    8 Stable tag: 1.6.3
     7Tested up to: 3.3.2
     8Stable tag: 1.7
    99
    1010This plugin allows you to create a container for spoilers within pages, posts, comments, and widgets.  Also supports spoiler groups.
     
    6969== Upgrade Notice ==
    7070
     71= 1.7 =
     72 * Support for Right-to-Left languages and format.  Option is located on admin panel under 'global defaults'.
     73 * Support to use your theme's native text color for spoiler title and button text when using easyspoiler's native theme.
     74   Note this feature is ignored if you have enabled custom colors.  The button and title theme enable options are located
     75   on the admin panel in title and button options, respectively.
     76 
    7177= 1.6.3 =
    7278 * Fix for fireFox issue with spoilergroups causing a reload of the page when opened.
     
    131137== Changelog ==
    132138
     139= 1.7 =
     140 * Support for Right-to-Left languages and format.  Option is located on admin panel under 'global defaults'.
     141 * Support to use your theme's native text color for spoiler title and button text when using easyspoiler's native theme.
     142   Note this feature is ignored if you have enabled custom colors.  The button and title theme enable options are located
     143   on the admin panel in title and button options, respectively.
     144   
    133145= 1.6.3 =
    134146 * Fix for fireFox issue with spoilergroups causing a reload of the page when opened.
Note: See TracChangeset for help on using the changeset viewer.