예제 #1
0
function lshowcase_settings_page()
{
    ?>
    <div class="wrap">
<h2>Settings</h2>
    <?php 
    if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == "true") {
        $msg = "Settings Updated";
        lshowcase_message($msg);
    }
    ?>
	<form method="post" action="options.php" id="dsform">
    <?php 
    settings_fields('lshowcase-plugin-settings');
    $options = get_option('lshowcase-settings');
    ?>
    <table width="70%" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td colspan="3"><h2>Logo Showcase Names</h2></td>
    </tr>
  <tr>
    <td align="right">Singular Name:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_name_singular]" value="<?php 
    echo $options['lshowcase_name_singular'];
    ?>
" /></td>
    <td rowspan="2" valign="top"><p class="howto">What do you want to call this feature?</p>
      <p class="howto">For Administration purposes only.</p></td>
  </tr>
  <tr>
    <td align="right">Plural Name:</td>
    <td>    <input type="text" name="lshowcase-settings[lshowcase_name_plural]" value="<?php 
    echo $options['lshowcase_name_plural'];
    ?>
" />
</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><h2>Logo Image Size Settings</h2></td>
    </tr>
  <tr>
    <td align="right">Width</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_thumb_width]" value="<?php 
    echo $options['lshowcase_thumb_width'];
    ?>
" /></td>
    <td rowspan="3" valign="top"><span class="howto">This will be the size of the Images. When they are uploaded they will follow this settings. If you change this settings after the image is uploaded they will show scaled.</span></td>
  </tr>
  <tr>
    <td align="right">Height</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_thumb_height]" value="<?php 
    echo $options['lshowcase_thumb_height'];
    ?>
" /></td>
    </tr>
  <tr>
    <td align="right">Crop</td>
    <td><select name="lshowcase-settings[lshowcase_thumb_crop]">
      <option value="true" <?php 
    selected($options['lshowcase_thumb_crop'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_thumb_crop'], 'false');
    ?>
>No</option>
    </select></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><h2>Carousel Settings</h2></td>
    </tr>
  <tr>
    <td align="right" nowrap>Auto Scroll</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autoscroll]">
      <option value="true"  <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'true');
    ?>
>Yes - Auto Scroll With Pause</option>
      <option value="ticker"  <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'ticker');
    ?>
>Yes - Auto Scroll Non Stop</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">Slides will automatically transition</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Pause Time</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_pause]" value="<?php 
    echo $options['lshowcase_carousel_pause'];
    ?>
" /></td>
    <td><span class="howto">The amount of time (in ms) between each auto transition (if Auto Scroll with Pause is On)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Pause on Hover</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autohover]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_autohover'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autohover'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">Auto scroll will pause when mouse hovers over slider</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Auto Controls</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autocontrols]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_autocontrols'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autocontrols'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If active, "Start" / "Stop" controls will be added (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Transition Speed:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_speed]" value="<?php 
    echo $options['lshowcase_carousel_speed'];
    ?>
" /></td>
    <td><span class="howto">Slide transition duration (in ms - intenger) </span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Image Margin:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_slideMargin]" value="<?php 
    echo $options['lshowcase_carousel_slideMargin'];
    ?>
" /></td>
    <td><span class="howto">Margin between each image (intenger)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Infinite Loop:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_infiniteLoop]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_infiniteLoop'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_infiniteLoop'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, clicking "Next" while on the last slide will transition to the first slide and vice-versa</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Show Pager:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_pager]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_pager'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_pager'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, a pager will be added. (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Show Controls:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_controls]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_controls'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_controls'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, "Next" / "Prev" image controls will be added. (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Minimum Slides:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_minSlides]" value="<?php 
    echo $options['lshowcase_carousel_minSlides'];
    ?>
" /></td>
    <td><span class="howto">The minimum number of slides to be shown. Slides will be sized down if carousel becomes smaller than the original size.</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Maximum Slides:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_maxSlides]" value="<?php 
    echo $options['lshowcase_carousel_maxSlides'];
    ?>
" /></td>
    <td><span class="howto">The maximum number of slides to be shown. Slides will be sized up if carousel becomes larger than the original size.</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Number of Slides to move:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_moveSlides]" value="<?php 
    echo $options['lshowcase_carousel_moveSlides'];
    ?>
" /></td>
    <td><span class="howto">The number of slides to move on transition.  If zero, the number of fully-visible slides will be used.</span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>

 </table>



	<input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
</form>
<?php 
}
예제 #2
0
function lshowcase_settings_page()
{
    ?>
    <div class="wrap">
<h2>Settings</h2>
    <?php 
    if (isset($_GET['settings-updated']) && $_GET['settings-updated'] == "true") {
        $msg = "Settings Updated";
        lshowcase_message($msg);
    }
    ?>
	<form method="post" action="options.php" id="dsform">
    <?php 
    settings_fields('lshowcase-plugin-settings');
    $options = get_option('lshowcase-settings');
    ?>
    <table width="70%" border="0" cellspacing="5" cellpadding="5">
  <tr>
    <td colspan="3"><h2>Logo Showcase Names</h2></td>
    </tr>
  <tr>
    <td align="right">Singular Name:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_name_singular]" value="<?php 
    echo $options['lshowcase_name_singular'];
    ?>
" /></td>
    <td rowspan="2" valign="top"><p class="howto">What do you want to call this feature?</p>
      <p class="howto">For Administration purposes only.</p></td>
  </tr>
  <tr>
    <td align="right">Plural Name:</td>
    <td>    <input type="text" name="lshowcase-settings[lshowcase_name_plural]" value="<?php 
    echo $options['lshowcase_name_plural'];
    ?>
" />
</td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><h2>Logo Image Size Settings</h2></td>
    </tr>
  <tr>
    <td align="right">Width</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_thumb_width]" value="<?php 
    echo $options['lshowcase_thumb_width'];
    ?>
" /></td>
    <td rowspan="3" valign="top"><span class="howto">This will be the size of the Images. When they are uploaded they will follow this settings. If you change this settings after the image is uploaded they will show scaled.</span></td>
  </tr>
  <tr>
    <td align="right">Height</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_thumb_height]" value="<?php 
    echo $options['lshowcase_thumb_height'];
    ?>
" /></td>
    </tr>
  <tr>
    <td align="right">Crop</td>
    <td><select name="lshowcase-settings[lshowcase_thumb_crop]">
      <option value="true" <?php 
    selected($options['lshowcase_thumb_crop'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_thumb_crop'], 'false');
    ?>
>No</option>
    </select></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><h2>Default Carousel Settings</h2></td>
    </tr>
  <tr>
    <td align="right" nowrap>Auto Scroll</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autoscroll]">
      <option value="true"  <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'true');
    ?>
>Yes - Auto Scroll With Pause</option>
      <option value="ticker"  <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'ticker');
    ?>
>Yes - Auto Scroll Non Stop</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autoscroll'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">Slides will automatically transition</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Pause Time</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_pause]" value="<?php 
    echo $options['lshowcase_carousel_pause'];
    ?>
" /></td>
    <td><span class="howto">The amount of time (in ms) between each auto transition (if Auto Scroll with Pause is On)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Pause on Hover</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autohover]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_autohover'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autohover'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">Auto scroll will pause when mouse hovers over slider</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Auto Controls</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_autocontrols]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_autocontrols'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_autocontrols'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If active, "Start" / "Stop" controls will be added (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Transition Speed:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_speed]" value="<?php 
    echo $options['lshowcase_carousel_speed'];
    ?>
" /></td>
    <td><span class="howto">Slide transition duration (in ms - intenger) </span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Image Margin:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_slideMargin]" value="<?php 
    echo $options['lshowcase_carousel_slideMargin'];
    ?>
" /></td>
    <td><span class="howto">Margin between each image (intenger)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Infinite Loop:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_infiniteLoop]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_infiniteLoop'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_infiniteLoop'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, clicking "Next" while on the last slide will transition to the first slide and vice-versa</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Show Pager:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_pager]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_pager'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_pager'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, a pager will be added. (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Show Controls:</td>
    <td><select name="lshowcase-settings[lshowcase_carousel_controls]">
      <option value="true" <?php 
    selected($options['lshowcase_carousel_controls'], 'true');
    ?>
>Yes</option>
      <option value="false" <?php 
    selected($options['lshowcase_carousel_controls'], 'false');
    ?>
>No</option>
    </select></td>
    <td><span class="howto">If Active, "Next" / "Prev" image controls will be added. (Doesn't work for Auto Scroll Non Stop)</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Minimum Slides:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_minSlides]" value="<?php 
    echo $options['lshowcase_carousel_minSlides'];
    ?>
" /></td>
    <td><span class="howto">The minimum number of slides to be shown.</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Maximum Slides:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_maxSlides]" value="<?php 
    echo $options['lshowcase_carousel_maxSlides'];
    ?>
" /></td>
    <td><span class="howto">The maximum number of slides to be shown. (Place 0 to let the script calculate the maximum number of slides that fit the viewport) </span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Number of Slides to move:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_carousel_moveSlides]" value="<?php 
    echo $options['lshowcase_carousel_moveSlides'];
    ?>
" /></td>
    <td><span class="howto">The number of slides to move on transition.  If zero, the number of fully-visible slides will be used.</span></td>
  </tr>

  

  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3"><h2>Advanced Settings</h2></td>
    </tr>
 
   <tr>
    <td align="right" valign="top" nowrap>Custom CSS:</td>
    <td><textarea rows="6" columns="10" name="lshowcase-settings[lshowcase_css]"><?php 
    if (isset($options['lshowcase_css'])) {
        echo $options['lshowcase_css'];
    }
    ?>
</textarea></td>
    <td><span class="howto">Place here any custom CSS you want to display together with the Logos Showcase layout. You can for example target the text below the logos if active, using the following css:
 <br>.lshowcase-description { color:#333; font-weight:bold; }
    </span></td>
  </tr>
   <tr>
    <td align="right" valign="top" nowrap>Custom JS:</td>
    <td><textarea rows="6" columns="10" name="lshowcase-settings[lshowcase_js]"><?php 
    if (isset($options['lshowcase_js'])) {
        echo $options['lshowcase_js'];
    }
    ?>
</textarea></td>
    <td><span class="howto">Place here any custom javascript you want to display together with the Logos Showcase layout. 
    </span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Default Image URL:</td>
    <td><input type="text" name="lshowcase-settings[lshowcase_default_image]" value="<?php 
    if (isset($options['lshowcase_default_image'])) {
        echo $options['lshowcase_default_image'];
    }
    ?>
" /></td>
    <td><span class="howto">If you want the logo entries with no image to display a default one, place the URL here.</span></td>
  </tr>
  <tr>
    <td align="right" nowrap>Force Carousel Transition Mode:</td>
    <td>

    <?php 
    $mode = isset($options['lshowcase_carousel_mode']) ? $options['lshowcase_carousel_mode'] : 'horizontal';
    ?>

	<select name="lshowcase-settings[lshowcase_carousel_mode]">
      <option value="horizontal"  <?php 
    selected($mode, 'horizontal');
    ?>
>Horizontal</option>
      <option value="vertical"  <?php 
    selected($mode, 'vertical');
    ?>
>Vertical</option>
      <option value="fade"  <?php 
    selected($mode, 'fade');
    ?>
>Fade</option>
    </select>

</td>
    <td><span class="howto">Options available: 'horizontal', 'vertical' and 'fade'. The 'fade' and 'vertical' mode will only display one slide at a time, ignoring the minimum and maximum slides settings above. Automatic non-stop scrolling carousel will not work in 'fade' mode. This will affect all carousels.</span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  
 </table>

    
    
	<input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" />
</form>
<?php 
}