SG2_Obj=$SG2_Objcet; } //admin public function admin_menu() { add_menu_page('scrollGallery2 Admin', 'Scroll Gallery 2', 'manage_options', SG2_PLUGINNAME."-admin", array($this, 'admin_general_page')); // add Admin Menu } public function admin_general_page() { ?>
Here you can change the global scrollGallery2 options:
'; } public function SG2_options_field_html_design() { $options = get_option("SG2_Options"); $act_cssfile = $options['SG2_design']; echo 'Active design: $act_css_name
Autor: $act_css_author
Version: $act_css_version
Description: $act_css_description
- are the images clickable?
"; echo "* - show next-button?
"; echo "* - show prev-button?
"; echo "* - opacity level for the buttons in percent, from 0 to 100.
"; } public function SG2_options_field_html_thumbArrows() { $options = get_option("SG2_Options"); echo "* - show arrows in thumbarea if autoScroll is disabled.
"; echo "* - opacity level for the arrows in percent, from 0 to 100.
"; } public function SG2_options_field_html_autoScroll() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_enableSwipeMode() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_followImages(){ $options = get_option("SG2_Options"); echo " *"; } public function SG2_options_field_html_useCaptions() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_useDesc() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_thumbsdown() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_diashow() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_diashowDelay() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_thumbOpacity() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_w() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_field_html_h() { $options = get_option("SG2_Options"); echo ""; } public function SG2_options_validate($input) { $input['SG2_design'] = (string) (isset( $input['SG2_design'] ) ? htmlspecialchars(stripslashes($input['SG2_design']), ENT_QUOTES, 'UTF-8') : "scrollGallery2_greyDesign.css"); $input['SG2_start'] = (int) (is_numeric( $input['SG2_start'] ) ? $input['SG2_start'] : 0); $input['SG2_area'] = (int) is_numeric( $input['SG2_area'] ) ? $input['SG2_area'] : 200; $input['SG2_thumbarea'] = (string) (isset( $input['SG2_thumbarea'] ) ? htmlspecialchars(stripslashes($input['SG2_thumbarea']), ENT_QUOTES, 'UTF-8') : "thumbarea"); $input['SG2_imagearea'] = (string) (isset( $input['SG2_imagearea'] ) ? htmlspecialchars(stripslashes($input['SG2_imagearea']), ENT_QUOTES, 'UTF-8') : "imagearea"); $input['SG2_speed'] = (string) (isset( $input['SG2_speed'] ) ? htmlspecialchars(stripslashes($input['SG2_speed']), ENT_QUOTES, 'UTF-8') : "0.1"); if(isset( $input['SG2_clickable'] ) && is_array( $input['SG2_clickable'] )){ $input['SG2_clickable']['clickable'] = (bool) (isset( $input['SG2_clickable']['clickable'] ) ? 1 : 0); $input['SG2_clickable']['next_button'] = (bool) (isset( $input['SG2_clickable']['next_button'] ) ? 1 : 0); $input['SG2_clickable']['prev_button'] = (bool) (isset( $input['SG2_clickable']['prev_button'] ) ? 1 : 0); $input['SG2_clickable']['button_opacity'] = (int) is_numeric( $input['SG2_clickable']['button_opacity'] ) ? $input['SG2_clickable']['button_opacity'] : 100; }else{ $input['SG2_clickable']=array('clickable'=>true,'next_button'=>false,'prev_button'=>false, 'button_opacity'=>100); } if(isset( $input['SG2_thumbArrows'] ) && is_array( $input['SG2_thumbArrows'] )){ $input['SG2_thumbArrows']['thumbArrows'] = (bool) (isset( $input['SG2_thumbArrows']['thumbArrows'] ) ? 1 : 0); $input['SG2_thumbArrows']['button_opacity'] = (int) is_numeric( $input['SG2_thumbArrows']['button_opacity'] ) ? $input['SG2_thumbArrows']['button_opacity'] : 100; }else{ $input['SG2_thumbArrows']=array('thumbArrows'=>false,'button_opacity'=>100); } $input['SG2_autoScroll'] = (bool) (isset( $input['SG2_autoScroll'] ) ? 1 : 0); $input['SG2_enableSwipeMode'] = (bool) (isset( $input['SG2_enableSwipeMode'] ) ? 1 : 0); $input['SG2_followImages'] = (bool) (isset( $input['SG2_followImages'] ) ? 1 : 0); $input['SG2_useCaptions'] = (bool) (isset( $input['SG2_useCaptions'] ) ? 1 : 0); $input['SG2_useDesc'] = (bool) (isset( $input['SG2_useDesc'] ) ? 1 : 0); $input['SG2_thumbsdown'] = (bool) (isset( $input['SG2_thumbsdown'] ) ? 1 : 0); $input['SG2_diashow'] = (bool) (isset( $input['SG2_diashow'] ) ? 1 : 0); $input['SG2_diashowDelay'] = (int) is_numeric( $input['SG2_diashowDelay'] ) ? $input['SG2_diashowDelay'] : 4; $input['SG2_thumbOpacity'] = (int) is_numeric( $input['SG2_thumbOpacity'] ) ? $input['SG2_thumbOpacity'] : 100; $input['SG2_width'] = (int) (is_numeric( $input['SG2_width'] ) ? $input['SG2_width'] : 640); $input['SG2_height'] = (int) (is_numeric( $input['SG2_height'] ) ? $input['SG2_height'] : 480); //save margins $act_cssfile = $input['SG2_design']; $csslist = $this->SG2_get_cssfiles(); foreach ($csslist as $key =>$a_cssfile) { if ($key == $act_cssfile) { $input['SG2_design_margin'] = (string) ((isset( $a_cssfile['ImgMargins'] )&&$a_cssfile['ImgMargins']!='') ? htmlspecialchars(stripslashes($a_cssfile['ImgMargins'])) : "0px 0px 0px 0px");//needed margins around the img $input['SG2_design_thumbmargin'] = (string) ((isset( $a_cssfile['ThumbMargins'] )&&$a_cssfile['ThumbMargins']!='') ? htmlspecialchars(stripslashes($a_cssfile['ThumbMargins'])) : "0px 0px 0px 0px");//needed margins around the img } } return $input; } public function admin_notices() { if ( !defined('NGGALLERY_ABSPATH') ) {//check if NextGEN is activated $this->show_message("In order to use Scroll Gallery 2, you have to install and activate the plugin NextGEN Gallery!"); } if ( defined('SCROLLGALLERY_URL') ) {//check if NextGEN Scroll Gallery is activated $this->show_message("In order to use Scroll Gallery 2, you have to deactivate my plugin NextGEN Scroll Gallery!"); } } public function show_error($message) { echo '' . $message . '
' . $message . '
This plugin is developed by
Benedikt Morschheuser.
Any kind of contribution would be highly appreciated. Thank you!
* get the pro version to use this features.
With the pro version you get an extended JavaScript file with lots of great functionalitys:
If you are interested, write me a message. The price to get the extended plugin files is 8 € + 19% Mwst (VAT).
First, I send you my bank details. After payment I will send you the extended plugin files via email.
Support is not included.
I recommend making a backup of all your data befor you install the plugin.
YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT THE USE OF THE SCROLL GALLERY SOFTWARE IS AT YOUR OWN RISK AND THAT RISK IS ACCEPTABLE TO YOU. THE SOFTWARE IS PROVIDED "AS IT IS," WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND. BENEDIKT MORSCHHEUSER DOES NOT WARRANT THAT THE SCROLL GALLERY SOFTWARE WILL MEET YOUR REQUIREMENTS, WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT THE SOFTWARE WILL BE COMPATIBLE WITH OTHER THIRD PARTY SOFTWARE, SERVERS OR PLATFORMS.
'; } public function SG2_demo_MetaBox(){#todo /*echo ''; echo '
'; echo '
';*/ } public function SG2_help_MetaBox(){ ?>
To add a gallery to your post/page
enter the tag
| [scrollGallery id=xxx] |
The options can be overridden in the post/page tag. For example:
| [scrollGallery id=1 start=5 autoScroll=false thumbsdown=true imagearea="imgarea"] |
That's it ... Have fun