• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP WDWLibrary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中WDWLibrary的典型用法代码示例。如果您正苦于以下问题:PHP WDWLibrary类的具体用法?PHP WDWLibrary怎么用?PHP WDWLibrary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了WDWLibrary类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute()
 {
     $task = WDWLibrary::get('task');
     if (method_exists($this, $task)) {
         $this->{$task}();
     }
     $this->display();
 }
开发者ID:marleexoxo,项目名称:FWC,代码行数:8,代码来源:BWGControllerBWGShortcode.php


示例2: execute

 public function execute()
 {
     $task = WDWLibrary::get('task');
     $from_menu = isset($_GET['page']) && esc_html($_GET['page']) == 'BWGShortcode' ? TRUE : FALSE;
     if ($task != '' && $from_menu) {
         if (!WDWLibrary::verify_nonce('BWGShortcode')) {
             die('Sorry, your nonce did not verify.');
         }
     }
     if (method_exists($this, $task)) {
         $this->{$task}();
     }
     $this->display();
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:14,代码来源:BWGControllerBWGShortcode.php


示例3: execute

 public function execute()
 {
     $task = isset($_POST['task']) ? esc_html(stripslashes($_POST['task'])) : '';
     if ($task != '') {
         if (!WDWLibrary::verify_nonce('uninstall_bwg')) {
             die('Sorry, your nonce did not verify.');
         }
     }
     if (method_exists($this, $task)) {
         $this->{$task}();
     } else {
         $this->display();
     }
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:14,代码来源:BWGControllerUninstall_bwg.php


示例4: edit

    public function edit($id, $reset)
    {
        $row = $this->model->get_row_data($id, $reset);
        $page_title = $id != 0 ? 'Edit theme ' . $row->name : 'Create new theme';
        $current_type = WDWLibrary::get('current_type', 'Thumbnail');
        $border_styles = array('none' => 'None', 'solid' => 'Solid', 'dotted' => 'Dotted', 'dashed' => 'Dashed', 'double' => 'Double', 'groove' => 'Groove', 'ridge' => 'Ridge', 'inset' => 'Inset', 'outset' => 'Outset');
        $font_families = array('arial' => 'Arial', 'lucida grande' => 'Lucida grande', 'segoe ui' => 'Segoe ui', 'tahoma' => 'Tahoma', 'trebuchet ms' => 'Trebuchet ms', 'verdana' => 'Verdana', 'cursive' => 'Cursive', 'fantasy' => 'Fantasy', 'monospace' => 'Monospace', 'serif' => 'Serif');
        $aligns = array('left' => 'Left', 'center' => 'Center', 'right' => 'Right');
        $font_weights = array('lighter' => 'Lighter', 'normal' => 'Normal', 'bold' => 'Bold');
        $hover_effects = array('none' => 'None', 'rotate' => 'Rotate', 'scale' => 'Scale', 'skew' => 'Skew');
        $button_styles = array('fa-chevron' => 'Chevron', 'fa-angle' => 'Angle', 'fa-angle-double' => 'Double');
        $rate_icons = array('star' => 'Star', 'bell' => 'Bell', 'circle' => 'Circle', 'flag' => 'Flag', 'heart' => 'Heart', 'square' => 'Square');
        ?>
    <div style="clear: both; float: left; width: 99%;">
      <div style="float:left; font-size: 14px; font-weight: bold;">
        This section allows you to add/edit theme.
        <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
      </div>
      <div style="float: right; text-align: right;">
        <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
          <img width="215" border="0" alt="web-dorado.com" src="<?php 
        echo WD_BWG_URL . '/images/logo.png';
        ?>
" />
        </a>
      </div>
    </div>
    <form class="wrap" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 99%;">
      <?php 
        wp_nonce_field('themes_bwg', 'bwg_nonce');
        ?>
      <span class="theme_icon"></span>
      <h2><?php 
        echo $page_title;
        ?>
</h2>
      <div style="float: right; margin: 0 5px 0 0;">
        <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save')" value="Save"/>
        <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'apply')" value="Apply"/>
        <input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel"/>
        <input title="Reset to default theme" class="button-primary" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
                                                                 spider_set_input_value('task', 'reset');
                                                               } else {
                                                                 return false;
                                                               }" value="Reset"/>
      </div>
      <div style="float: left; margin: 10px 0 0; display: none;" id="type_menu">
        <div id="type_Thumbnail" class="theme_type" onclick="bwg_change_theme_type('Thumbnail')">Thumbnails</div>
        <div id="type_Masonry" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Masonry</div>
        <div id="type_Mosaic" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Mosaic</div>
        <div id="type_Slideshow" class="theme_type" onclick="bwg_change_theme_type('Slideshow')">Slideshow</div>
        <div id="type_Image_browser" class="theme_type" onclick="bwg_change_theme_type('Image_browser')">Image Browser</div>
        <div id="type_Compact_album" class="theme_type" onclick="bwg_change_theme_type('Compact_album')">Compact Album</div>
        <div id="type_Masonry_album" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Masonry Album</div>
        <div id="type_Extended_album" class="theme_type" onclick="bwg_change_theme_type('Extended_album')">Extended Album</div>
        <div id="type_Blog_style" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Blog Style</div>
        <div id="type_Lightbox" class="theme_type" onclick="bwg_change_theme_type('Lightbox')">Lightbox</div>
        <div id="type_Navigation" class="theme_type" onclick="bwg_change_theme_type('Navigation')">Page Navigation</div>
        <input type="hidden" id="current_type" name="current_type" value="<?php 
        echo $current_type;
        ?>
" />
      </div>
      <fieldset class="spider_fieldset">
        <legend>Parameters</legend>
        <table style="clear:both;">
          <tbody>
          <tr>
            <td class="spider_label"><label for="name">Name: <span style="color:#FF0000;"> * </span> </label></td>
            <td><input type="text" id="name" name="name" value="<?php 
        echo $row->name;
        ?>
" class="spider_text_input"/></td>
          </tr>
          </tbody>
        </table>

        <fieldset class="spider_type_fieldset" id="Thumbnail">
          <fieldset class="spider_child_fieldset" id="Thumbnail_1">
            <table style="clear:both;">
              <tbody>
                <tr>
                  <td class="spider_label"><label for="thumb_margin">Margin: </label></td>
                  <td>
                    <input type="text" name="thumb_margin" id="thumb_margin" value="<?php 
        echo $row->thumb_margin;
        ?>
" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
                  </td>
                </tr>
                <tr>
                  <td class="spider_label"><label for="thumb_padding">Padding: </label></td>
                  <td>
                    <input type="text" name="thumb_padding" id="thumb_padding" value="<?php 
        echo $row->thumb_padding;
        ?>
" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
                  </td>
                </tr>
                <tr>
//.........这里部分代码省略.........
开发者ID:nirav90,项目名称:gharena,代码行数:101,代码来源:BWGViewThemes_bwg.php


示例5: display

    public function display($params, $from_shortcode = 0, $bwg = 0)
    {
        global $wp;
        $current_url = $wp->query_string;
        global $WD_BWG_UPLOAD_DIR;
        require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
        $options_row = $this->model->get_options_row_data();
        $play_icon = $options_row->play_icon;
        if (!isset($params['extended_album_image_title'])) {
            $params['extended_album_image_title'] = 'none';
        }
        if (!isset($params['extended_album_view_type'])) {
            $album_view_type = 'thumbnail';
        } else {
            $album_view_type = $params['extended_album_view_type'];
        }
        if (!isset($params['popup_fullscreen'])) {
            $params['popup_fullscreen'] = 0;
        }
        if (!isset($params['popup_autoplay'])) {
            $params['popup_autoplay'] = 0;
        }
        if (!isset($params['popup_enable_pinterest'])) {
            $params['popup_enable_pinterest'] = 0;
        }
        if (!isset($params['popup_enable_tumblr'])) {
            $params['popup_enable_tumblr'] = 0;
        }
        if (!isset($params['show_search_box'])) {
            $params['show_search_box'] = 0;
        }
        if (!isset($params['search_box_width'])) {
            $params['search_box_width'] = 180;
        }
        if (!isset($params['popup_enable_info'])) {
            $params['popup_enable_info'] = 1;
        }
        if (!isset($params['popup_info_always_show'])) {
            $params['popup_info_always_show'] = 0;
        }
        if (!isset($params['popup_info_full_width'])) {
            $params['popup_info_full_width'] = 0;
        }
        if (!isset($params['popup_enable_rate'])) {
            $params['popup_enable_rate'] = 0;
        }
        if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
            $params['thumb_click_action'] = 'open_lightbox';
        }
        if (!isset($params['thumb_link_target'])) {
            $params['thumb_link_target'] = 1;
        }
        if (!isset($params['popup_hit_counter'])) {
            $params['popup_hit_counter'] = 0;
        }
        if (!isset($params['order_by'])) {
            $params['order_by'] = ' ASC ';
        }
        if (!isset($params['show_sort_images'])) {
            $params['show_sort_images'] = 0;
        }
        if (!isset($params['show_tag_box'])) {
            $params['show_tag_box'] = 0;
        }
        if (!isset($params['extended_album_enable_page'])) {
            $params['extended_album_enable_page'] = 1;
        }
        $sort_direction = ' ' . $params['order_by'] . ' ';
        $theme_row = $this->model->get_theme_row_data($params['theme_id']);
        if (!$theme_row) {
            echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
            return;
        }
        $type = isset($_REQUEST['type_' . $bwg]) ? esc_html($_REQUEST['type_' . $bwg]) : 'album';
        $bwg_search = isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '' ? esc_html($_POST['bwg_search_' . $bwg]) : '';
        $album_gallery_id = isset($_REQUEST['album_gallery_id_' . $bwg]) ? esc_html($_REQUEST['album_gallery_id_' . $bwg]) : $params['album_id'];
        if (!$album_gallery_id || $type == 'album' && !$this->model->get_album_row_data($album_gallery_id)) {
            echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
            return;
        }
        if ($type == 'gallery') {
            $items_per_page = $params['extended_album_images_per_page'];
            $items_per_page_arr = array('images_per_page' => $params['extended_album_images_per_page'], 'load_more_image_count' => $params['extended_album_images_per_page']);
            $items_col_num = $params['extended_album_image_column_number'];
            if (isset($_POST['sortImagesByValue_' . $bwg])) {
                $sort_by = esc_html($_POST['sortImagesByValue_' . $bwg]);
                if ($sort_by == 'random') {
                    $params['sort_by'] = 'RAND()';
                } else {
                    if ($sort_by == 'default') {
                        $params['sort_by'] = $params['sort_by'];
                    } else {
                        $params['sort_by'] = $sort_by;
                    }
                }
            }
            $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg, $sort_direction);
            $images_count = count($image_rows);
            if (!$image_rows) {
                echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
//.........这里部分代码省略.........
开发者ID:ChibiBeckyG,项目名称:supreme-giggle,代码行数:101,代码来源:BWGViewAlbum_extended_preview.php


示例6: image_display

    public function image_display($id)
    {
        global $WD_BWG_UPLOAD_DIR;
        $rows_data = $this->model->get_image_rows_data($id);
        $page_nav = $this->model->image_page_nav($id);
        $option_row = $this->model->get_option_row_data();
        $search_value = isset($_POST['search_value']) ? esc_html(stripslashes($_POST['search_value'])) : '';
        $image_asc_or_desc = isset($_POST['image_asc_or_desc']) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : (isset($_COOKIE['bwg_image_asc_or_desc']) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc');
        $image_order_by = isset($_POST['image_order_by']) ? esc_html(stripslashes($_POST['image_order_by'])) : (isset($_COOKIE['bwg_image_order_by']) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order');
        $order_class = 'manage-column column-title sorted ' . $image_asc_or_desc;
        $page_number = isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1;
        $ids_string = '';
        $per_page = $this->model->per_page();
        $pager = 0;
        $gallery_row = $this->model->get_row_data($id);
        $gallery_type = $gallery_row->gallery_type == 'instagram' || $gallery_row->gallery_type == 'instagram_post' ? 'instagram' : '';
        $image_array = array('image_set_watermark' => __('Set Watermark', 'bwg_back'), 'image_get_resize' => __('Resize', 'bwg_back'), 'resize_image_thumb' => __('Recreate Thumbnail', 'bwg_back'), 'image_recover_all' => __('Reset', 'bwg_back'), 'image_publish_all' => __('Publish', 'bwg_back'), 'image_unpublish_all' => __('Unpublish', 'bwg_back'), 'image_desc' => __('Edit', 'bwg_back'), 'image_delete_all' => __('Delete', 'bwg_back'));
        ?>
    <div class="buttons_div_left">
      <?php 
        $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image'), admin_url('admin-ajax.php'));
        $query_url = wp_nonce_url($query_url, 'addImages', 'bwg_nonce');
        $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
        ?>
      <a href="<?php 
        echo $query_url;
        ?>
" id="add_image_bwg" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview" id="content-add_media" title="<?php 
        _e("Add Images", 'bwg_back');
        ?>
" onclick="return false;" style="margin-bottom:5px; <?php 
        if ($gallery_type != '') {
            echo 'display:none';
        }
        ?>
" >
        <?php 
        _e('Add Images', 'bwg_back');
        ?>
      </a>
      <?php 
        $query_url = wp_nonce_url(admin_url('admin-ajax.php'), '', 'bwg_nonce');
        /*(re?)define ajax_url to add nonce only in admin*/
        ?>
      <script>
        var ajax_url = "<?php 
        echo $query_url;
        ?>
"
      </script>
        <input id="show_add_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-media"  type="button" title="<?php 
        _e("Embed Media", 'bwg_back');
        ?>
" onclick="jQuery('.opacity_add_embed').show(); jQuery('#add_embed_help').hide(); return false;" value="<?php 
        _e("Embed Media", 'bwg_back');
        ?>
" />
        <input id="show_bulk_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-bulk_media spider_free_version_button" type="button" title="<?php 
        _e("Social Bulk Embed", 'bwg_back');
        ?>
" onclick="jQuery('.opacity_bulk_embed').show(); return false;" value="<?php 
        _e("Social Bulk Embed", 'bwg_back');
        ?>
" />
        <?php 
        WDWLibrary::ajax_search(__('Filename', 'bwg_back'), $search_value, 'galleries_form');
        ?>
    </div>
    <div class="tablenav top buttons_div_left bwg_buttons_div">
      <span class="wd-btn wd-btn-primary-gray bwg_check_all  non_selectable " onclick="spider_check_all_items()">
        <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
        <span style="vertical-align: middle;"><?php 
        echo __('Select All', 'bwg_back');
        ?>
</span>
      </span>
      <select class="select_icon bulk_action_img">
        <option value=""><?php 
        _e('Bulk Actions', 'bwg_back');
        ?>
</option>
        <?php 
        foreach ($image_array as $key => $value) {
            ?>
        <option value="<?php 
            echo $key;
            ?>
"><?php 
            echo $value;
            ?>
</option>
          <?php 
        }
        ?>
      </select>
      <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php 
        _e("Apply", "bwg_back");
        ?>
" onclick="if (!bwg_bulk_actions('.bulk_action_img', '')) {return false;}" value="<?php 
        _e("Apply", "bwg_back");
//.........这里部分代码省略.........
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:101,代码来源:BWGViewGalleries_bwg.php


示例7: display

    public function display($params, $from_shortcode = 0, $bwg = 0)
    {
        global $wp;
        $current_url = $wp->query_string;
        global $WD_BWG_UPLOAD_DIR;
        require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
        require_once WD_BWG_DIR . '/framework/WDWLibraryEmbed.php';
        $theme_row = $this->model->get_theme_row_data($params['theme_id']);
        if (!isset($params['order_by'])) {
            $order_by = 'asc';
        } else {
            $order_by = $params['order_by'];
        }
        if (!isset($params['popup_enable_pinterest'])) {
            $params['popup_enable_pinterest'] = 0;
        }
        if (!isset($params['popup_enable_tumblr'])) {
            $params['popup_enable_tumblr'] = 0;
        }
        if (!isset($params['show_search_box'])) {
            $params['show_search_box'] = 0;
        }
        if (!isset($params['search_box_width'])) {
            $params['search_box_width'] = 180;
        }
        if (!isset($params['popup_enable_info'])) {
            $params['popup_enable_info'] = 1;
        }
        if (!isset($params['popup_info_always_show'])) {
            $params['popup_info_always_show'] = 0;
        }
        if (!isset($params['popup_info_full_width'])) {
            $params['popup_info_full_width'] = 0;
        }
        if (!isset($params['popup_enable_rate'])) {
            $params['popup_enable_rate'] = 0;
        }
        if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
            $params['thumb_click_action'] = 'open_lightbox';
        }
        if (!isset($params['thumb_link_target'])) {
            $params['thumb_link_target'] = 1;
        }
        if (!isset($params['popup_hit_counter'])) {
            $params['popup_hit_counter'] = 0;
        }
        if (!$theme_row) {
            echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
            return;
        }
        $gallery_row = $this->model->get_gallery_row_data($params['gallery_id']);
        if (!$gallery_row) {
            echo WDWLibrary::message(__('There is no gallery selected or the gallery was deleted.', 'bwg'), 'error');
            return;
        }
        $image_rows = $this->model->get_image_rows_data($params['gallery_id'], 1, $params['sort_by'], $order_by, $bwg);
        $images_count = count($image_rows);
        if (!$image_rows) {
            echo WDWLibrary::message(__('There are no images in this gallery.', 'bwg'), 'error');
        }
        $page_nav = $this->model->page_nav($params['gallery_id'], 1, $bwg);
        $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
        $image_browser_images_conteiner = WDWLibrary::spider_hex2rgb($theme_row->image_browser_full_bg_color);
        $bwg_image_browser_image = WDWLibrary::spider_hex2rgb($theme_row->image_browser_bg_color);
        $image_title = $params['image_browser_title_enable'];
        $enable_image_description = $params['image_browser_description_enable'];
        $option_row = $this->model->get_option_row_data();
        $image_right_click = $option_row->image_right_click;
        if (!isset($params['popup_fullscreen'])) {
            $params['popup_fullscreen'] = 0;
        }
        if (!isset($params['popup_autoplay'])) {
            $params['popup_autoplay'] = 0;
        }
        $params_array = array('action' => 'GalleryBox', 'current_view' => $bwg, 'gallery_id' => $params['gallery_id'], 'theme_id' => $params['theme_id'], 'open_with_fullscreen' => $params['popup_fullscreen'], 'open_with_autoplay' => $params['popup_autoplay'], 'image_width' => $params['popup_width'], 'image_height' => $params['popup_height'], 'image_effect' => $params['popup_effect'], 'wd_sor' => $params['sort_by'], 'wd_ord' => $order_by, 'enable_image_filmstrip' => $params['popup_enable_filmstrip'], 'image_filmstrip_height' => $params['popup_filmstrip_height'], 'enable_image_ctrl_btn' => $params['popup_enable_ctrl_btn'], 'enable_image_fullscreen' => $params['popup_enable_fullscreen'], 'popup_enable_info' => $params['popup_enable_info'], 'popup_info_always_show' => $params['popup_info_always_show'], 'popup_info_full_width' => $params['popup_info_full_width'], 'popup_hit_counter' => $params['popup_hit_counter'], 'popup_enable_rate' => $params['popup_enable_rate'], 'slideshow_interval' => $params['popup_interval'], 'enable_comment_social' => $params['popup_enable_comment'], 'enable_image_facebook' => $params['popup_enable_facebook'], 'enable_image_twitter' => $params['popup_enable_twitter'], 'enable_image_google' => $params['popup_enable_google'], 'enable_image_pinterest' => $params['popup_enable_pinterest'], 'enable_image_tumblr' => $params['popup_enable_tumblr'], 'watermark_type' => $params['watermark_type'], 'current_url' => $current_url);
        $items_per_page = array('images_per_page' => 1, 'load_more_image_count' => 1);
        if ($params['watermark_type'] == 'none') {
            $params_array['watermark_font'] = '';
            $params_array['watermark_color'] = '';
            $params_array['watermark_font_size'] = '';
            $params_array['watermark_opacity'] = '';
            $text_align = '';
            $vertical_align = '';
            $params_array['watermark_width'] = '';
            $show_watermark = FALSE;
        }
        if ($params['watermark_type'] != 'none') {
            $params_array['watermark_link'] = urlencode($params['watermark_link']);
            $params_array['watermark_opacity'] = $params['watermark_opacity'];
            $params_array['watermark_position'] = $params['watermark_position'] != 'undefined' ? $params['watermark_position'] : 'top-center';
            $position = explode('-', $params_array['watermark_position']);
            $vertical_align = $position[0];
            $text_align = $position[1];
        }
        if ($params['watermark_type'] == 'text') {
            $show_watermark = TRUE;
            $watermark_text_image = TRUE;
            $params_array['watermark_text'] = $params['watermark_text'];
            $params_array['watermark_font_size'] = $params['watermark_font_size'];
            $params_array['watermark_font'] = $params['watermark_font'];
//.........这里部分代码省略.........
开发者ID:ahmadnaufal,项目名称:iit-webhimpunan,代码行数:101,代码来源:BWGViewImage_browser.php


示例8: resize_image_thumb

 public function resize_image_thumb()
 {
     global $WD_BWG_UPLOAD_DIR;
     global $wpdb;
     $flag = FALSE;
     $img_ids = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'bwg_image');
     foreach ($img_ids as $img_id) {
         if (isset($_POST['check_' . $img_id->id]) || isset($_POST['check_all_items'])) {
             $flag = TRUE;
             $file_path = str_replace("thumb", ".original", htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES));
             $new_file_path = htmlspecialchars_decode(ABSPATH . $WD_BWG_UPLOAD_DIR . $img_id->thumb_url, ENT_COMPAT | ENT_QUOTES);
             $options = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'bwg_option');
             list($img_width, $img_height, $type) = @getimagesize(htmlspecialchars_decode($file_path, ENT_COMPAT | ENT_QUOTES));
             if (!$img_width || !$img_height) {
                 return FALSE;
             }
             $max_width = $options->upload_thumb_width;
             $max_height = $options->upload_thumb_height;
             $scale = min($max_width / $img_width, $max_height / $img_height);
             @ini_set('memory_limit', '-1');
             if (!function_exists('imagecreatetruecolor')) {
                 error_log('Function not found: imagecreatetruecolor');
                 return FALSE;
             }
             $new_width = $img_width * $scale;
             $new_height = $img_height * $scale;
             $dst_x = 0;
             $dst_y = 0;
             $new_img = @imagecreatetruecolor($new_width, $new_height);
             switch ($type) {
                 case 2:
                     $src_img = @imagecreatefromjpeg($file_path);
                     $write_image = 'imagejpeg';
                     $image_quality = isset($options->jpeg_quality) ? $options->jpeg_quality : 75;
                     break;
                 case 1:
                     @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
                     $src_img = @imagecreatefromgif($file_path);
                     $write_image = 'imagegif';
                     $image_quality = null;
                     break;
                 case 3:
                     @imagecolortransparent($new_img, @imagecolorallocate($new_img, 0, 0, 0));
                     @imagealphablending($new_img, false);
                     @imagesavealpha($new_img, true);
                     $src_img = @imagecreatefrompng($file_path);
                     $write_image = 'imagepng';
                     $image_quality = isset($options->png_quality) ? $options->png_quality : 9;
                     break;
                 default:
                     $src_img = null;
                     break;
             }
             $success = $src_img && @imagecopyresampled($new_img, $src_img, $dst_x, $dst_y, 0, 0, $new_width, $new_height, $img_width, $img_height) && $write_image($new_img, $new_file_path, $image_quality);
             // Free up memory (imagedestroy does not delete files):
             @imagedestroy($src_img);
             @imagedestroy($new_img);
             @ini_restore('memory_limit');
         }
     }
     if ($flag == false) {
         echo WDWLibrary::message('You must select at least one item.', 'error');
     } else {
         echo WDWLibrary::message('Thumb Succesfully Resized', 'updated');
     }
 }
开发者ID:pbhanu1994,项目名称:bhanuprakash,代码行数:66,代码来源:BWGControllerGalleries_bwg.php


示例9: display

    public function display($reset = FALSE)
    {
        if (isset($_GET['bwg_start_tour']) && $_GET['bwg_start_tour'] == '1') {
            update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
            WDWLibrary::spider_redirect('admin.php?page=options_bwg');
        }
        global $WD_BWG_UPLOAD_DIR;
        ?>
    <div style="clear: both; float: left; width: 99%;">
      <div style="float:left; font-size: 14px; font-weight: bold;">
        <?php 
        _e("This section allows you to change settings for different views and general options.", 'bwg_back');
        ?>
        <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/editing-options/global-options.html"><?php 
        _e("Read More in User Manual", 'bwg_back');
        ?>
</a>
      </div>
      <div style="float: right; text-align: right;">
        <a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
          <img width="215" border="0" alt="web-dorado.com" src="<?php 
        echo WD_BWG_URL . '/images/logo.png';
        ?>
" />
        </a>
      </div>
    </div>
    <script>
      function bwg_add_music(files) {
        document.getElementById("slideshow_audio_url").value = files[0]['url'];
      }
      function bwg_add_built_in_watermark_image(files) {
        document.getElementById("built_in_watermark_url").value = '<?php 
        echo site_url() . '/' . $WD_BWG_UPLOAD_DIR;
        ?>
' + files[0]['url'];
      }
      function bwg_add_watermark_image(files) {
        document.getElementById("watermark_url").value = '<?php 
        echo site_url() . '/' . $WD_BWG_UPLOAD_DIR;
        ?>
' + files[0]['url'];
      }
    </script>
    <?php 
        $row = $this->model->get_row_data($reset);
        $built_in_watermark_fonts = array();
        foreach (scandir(path_join(WD_BWG_DIR, 'fonts')) as $filename) {
            if (strpos($filename, '.') === 0) {
                continue;
            } else {
                $built_in_watermark_fonts[] = $filename;
            }
        }
        $watermark_fonts = array('arial' => 'Arial', 'Lucida grande' => 'Lucida grande', 'segoe ui' => 'Segoe ui', 'tahoma' => 'Tahoma', 'trebuchet ms' => 'Trebuchet ms', 'verdana' => 'Verdana', 'cursive' => 'Cursive', 'fantasy' => 'Fantasy', 'monospace' => 'Monospace', 'serif' => 'Serif');
        $effects = array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blind Vertical', 'random' => 'Random');
        ?>
    <form method="post" class="wrap bwg_form" action="admin.php?page=options_bwg" style="float: left; width: 99%;">      
      <?php 
        wp_nonce_field('options_bwg', 'bwg_nonce');
        ?>
      <span class="option-icon"></span>
      <h2 id="ed_options"><?php 
        _e("Edit options", 'bwg_back');
        ?>
</h2>
      <div style="display: inline-block; width: 100%;">
        <div style="float: right;">
          <input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Title')) {return false;}; spider_set_input_value('task', 'save')" value="<?php 
        _e("Save", 'bwg_back');
        ?>
" />
          <input class="button-secondary" type="submit" onclick="if (confirm('<?php 
        echo addslashes(__("Do you want to reset to default?", 'bwg_back'));
        ?>
')) {
                                                                 spider_set_input_value('task', 'reset');
                                                               } else {
                                                                 return false;
                                                               }" value="<?php 
        _e("Reset all options", 'bwg_back');
        ?>
" />
        </div>
      </div>
      <div style="display: none; width: 100%;" id="display_panel">
        <div style="float:left;">
          <div id="div_1" class="gallery_type" onclick="bwg_change_option_type('1')"> <?php 
        _e("Global options", 'bwg_back');
        ?>
</div><br/>
          <div id="div_8" class="gallery_type" onclick="bwg_change_option_type('8')"> <?php 
        _e("Watermark", 'bwg_back');
        ?>
</div><br/>
          <div id="div_2" class="gallery_type" onclick="bwg_change_option_type('2')"> <?php 
        _e("Advertisement", 'bwg_back');
        ?>
</div><br/>
          <div id="div_3" class="gallery_type" onclick="bwg_change_option_type('3')"> <?php 
//.........这里部分代码省略.........
开发者ID:jun200,项目名称:wordpress,代码行数:101,代码来源:BWGViewOptions_bwg.php


示例10: display

    public function display($params, $from_shortcode = 0, $bwg = 0)
    {
        global $wp;
        $current_url = $wp->query_string;
        global $WD_BWG_UPLOAD_DIR;
        require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
        if (!isset($params['extended_album_image_title'])) {
            $params['extended_album_image_title'] = 'none';
        }
        $theme_row = $this->model->get_theme_row_data($params['theme_id']);
        if (!$theme_row) {
            echo WDWLibrary::message(__('There is no theme selected or the theme was deleted.', 'bwg'), 'error');
            return;
        }
        $type = isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : 'album';
        $album_gallery_id = isset($_POST['album_gallery_id_' . $bwg]) ? esc_html($_POST['album_gallery_id_' . $bwg]) : $params['album_id'];
        if (!$album_gallery_id) {
            echo WDWLibrary::message(__('There is no album selected or the album was deleted.', 'bwg'), 'error');
            return;
        }
        if ($type == 'gallery') {
            $items_per_page = $params['extended_album_images_per_page'];
            $items_col_num = $params['extended_album_image_column_number'];
            $image_rows = $this->model->get_image_rows_data($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
            $page_nav = $this->model->gallery_page_nav($album_gallery_id, $items_per_page, $bwg);
            $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
            $album_gallery_div_class = 'bwg_standart_thumbnails_' . $bwg;
        } else {
            $items_per_page = $params['extended_albums_per_page'];
            $items_col_num = 1;
            $album_galleries_row = $this->model->get_alb_gals_row($album_gallery_id, $items_per_page, $params['sort_by'], $bwg);
            $page_nav = $this->model->album_page_nav($album_gallery_id, $items_per_page, $bwg);
            $album_gallery_div_id = 'bwg_album_extended_' . $bwg;
            $album_gallery_div_class = 'bwg_album_extended_thumbnails_' . $bwg;
        }
        $bwg_previous_album_id = isset($_POST['bwg_previous_album_id_' . $bwg]) ? esc_html($_POST['bwg_previous_album_id_' . $bwg]) : 0;
        $bwg_previous_album_page_number = isset($_POST['bwg_previous_album_page_number_' . $bwg]) ? esc_html($_POST['bwg_previous_album_page_number_' . $bwg]) : 0;
        $rgb_page_nav_font_color = WDWLibrary::spider_hex2rgb($theme_row->page_nav_font_color);
        $rgb_album_extended_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_thumbs_bg_color);
        $rgb_album_extended_div_bg_color = WDWLibrary::spider_hex2rgb($theme_row->album_extended_div_bg_color);
        $rgb_thumbs_bg_color = WDWLibrary::spider_hex2rgb($theme_row->thumbs_bg_color);
        ?>
    <style>
      #bwg_container1_<?php 
        echo $bwg;
        ?>
 #bwg_container2_<?php 
        echo $bwg;
        ?>
 .bwg_album_extended_thumbnails_<?php 
        echo $bwg;
        ?>
 * {
       -moz-box-sizing: border-box;
       box-sizing: border-box;
      }
      #bwg_container1_<?php 
        echo $bwg;
        ?>
 #bwg_container2_<?php 
        echo $bwg;
        ?>
 .bwg_album_extended_thumbnails_<?php 
        echo $bwg;
        ?>
 {
        display: block;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        background-color: rgba(<?php 
        echo $rgb_album_extended_thumbs_bg_color['red'];
        ?>
, <?php 
        echo $rgb_album_extended_thumbs_bg_color['green'];
        ?>
, <?php 
        echo $rgb_album_extended_thumbs_bg_color['blue'];
        ?>
, <?php 
        echo $theme_row->album_extended_thumb_bg_transparent / 100;
        ?>
);
        font-size: 0;
        text-align: <?php 
        echo $theme_row->album_extended_thumb_align;
        ?>
;
        max-width: inherit;
      }
      #bwg_container1_<?php 
        echo $bwg;
        ?>
 #bwg_container2_<?php 
        echo $bwg;
        ?>
 .bwg_album_extended_thumbnails_<?php 
        echo $bwg;
        ?>
 a {
        cursor: pointer;
//.........这里部分代码省略.........
开发者ID:phuluang,项目名称:rosewellmusic,代码行数:101,代码来源:BWGViewAlbum_extended_preview.php


示例11: save_order

 public function save_order($flag = TRUE)
 {
     global $wpdb;
     $album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
     if ($album_ids_col) {
         foreach ($album_ids_col as $album_id) {
             if (isset($_POST['order_input_' . $album_id])) {
                 $order_values[$album_id] = (int) $_POST['order_input_' . $album_id];
             } else {
                 $order_values[$album_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id`="%d"', $album_id));
             }
         }
         asort($order_values);
         $i = 1;
         foreach ($order_values as $key => $order_value) {
             $wpdb->update($wpdb->prefix . 'bwg_album', array('order' => $i), array('id' => $key));
             $i++;
         }
         if ($flag) {
             echo WDWLibrary::message('Ordering Succesfully Saved.', 'updated');
         }
     }
     $this->display();
 }
开发者ID:phuluang,项目名称:rosewellmusic,代码行数:24,代码来源:BWGControllerAlbums_bwg.php


示例12: display

    public function display($params, $from_shortcode = 0, $bwg = 0)
    {
        global $wp;
        $current_url = $wp->query_string;
        global $WD_BWG_UPLOAD_DIR;
        require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
        if (!isset($params['compuct_album_image_title'])) {
            $params['compuct_album_image_title'] = 'none';
        }
        if (!isset($params['compuct_album_view_type'])) {
            $album_view_type = 'thumbnail';
        } else {
            $album_view_type = $params['compuct_album_view_type'];
        }
        if (!isset($params['popup_fullscreen'])) {
            $params['popup_fullscreen'] = 0;
        }
        if (!isset($params['popup_autoplay'])) {
            $params['popup_autoplay'] = 0;
        }
        if (!isset($params['popup_enable_pinterest'])) {
            $params['popup_enable_pinterest'] = 0;
        }
        if (!isset($params['popup_enable_tumblr'])) {
            $params['popup_enable_tumblr'] = 0;
        }
        if (!isset($params['show_search_box'])) {
            $params['show_search_box'] = 0;
        }
        if (!isset($params['search_box_width'])) {
            $params['search_box_width'] = 180;
        }
        if (!isset($params['popup_enable_info'])) {
            $params['popup_enable_info'] = 1;
        }
        if (!isset($params['popup_info_always_show'])) {
            $params['popup_info_always_show'] = 0;
        }
        if (!isset($params['popup_info_full_width'])) {
            $params['popup_info_full_width'] = 0;
        }
        if (!isset($params['popup_enable_rate'])) {
            $params['popup_enable_rate'] = 0;
        }
        if (!isset($params['thumb_click_action']) || $params['thumb_click_action'] == 'undefined') {
            $params['thumb_click_action'] = 'open_lightbox';
        }
        if (!isset($params['thumb_link_target'])) {
            $params['thumb_link_target'] = 1;
        }
        if (!isset($params['popup_hit_counter'])) {
            $params['popup_hit_counter'] = 0;
        }
        if (!isset($params['order_by'])) {
            $params['order_by'] = ' ASC ';
        }
        if (!isset($params['show_sort_images'])) {
            $params['show_sort_images'] = 0;
        }
        $options_row = $this->model->get_options_row_data();
        if (!isset($params['show_album_name'])) {
            $params['show_album_name'] = $options_row->show_album_name;
        }
        $from = isset($params['from']) ? esc_html($params['from']) : 0;
        $type = isset($_POST['type_' . $bwg]) ? esc_html($_POST['type_' . $bwg]) : (isset($params['type']) ? $params['type'] : 'album');
        $bwg_search = isset($_POST['bwg_search_' . $bwg]) && esc_html($_POST['bwg_search_' . $bwg]) != '' ? esc_html($_POST['bwg_search_' . $bwg]) : '';
        $sort_direction = ' ' . $params['order_by'] . ' ';
        $play_icon = $options_row->play_icon;
        if ($from === "widget") {
            $params['album_id'] = $params['id'];
            $params['sort_by'] = $params['show'] == 'random' ? 'RAND()' : 'order';
            if ($params['show'] == 'last') {
                $sort_direction = ' DESC ';
            }
            $params['compuct_albums_per_page'] = $params['count'];
            $params['compuct_album_column_number'] = $options_row->album_column_number;
            $params['compuct_album_image_column_number'] = $options_row->image_column_number;
            $params['compuct_album_thumb_width'] = $params['width'];
            $params['compuct_album_thumb_height'] = $params['height'];
            $params['compuct_album_image_thumb_width'] = $params['width'];
            $params['compuct_album_image_thumb_height'] = $params['height'];
            $params['compuct_album_title'] = $options_row->album_title_show_hover;
            $params['compuct_album_enable_page'] = 0;
            $params['compuct_album_image_title'] = $options_row->image_title_show_hover;
            $params['popup_width'] = $options_row->popup_width;
            $params['popup_height'] = $options_row->popup_height;
            $params['popup_effect'] = $options_row->popup_type;
            $params['popup_enable_filmstrip'] = $options_row->popup_enable_filmstrip;
            $params['popup_filmstrip_height'] = $options_row->popup_filmstrip_height;
            $params['popup_enable_ctrl_btn'] = $options_row->popup_enable_ctrl_btn;
            $params['popup_enable_fullscreen'] = $options_row->popup_enable_fullscreen;
            $params['popup_enable_info'] = $options_row->popup_enable_info;
            $params['popup_info_always_show'] = $options_row->popup_info_always_show;
            $params['popup_info_full_width'] = $options_row->popup_info_full_width;
            $params['popup_hit_counter'] = $options_row->popup_hit_counter;
            $params['popup_enable_rate'] = $options_row->popup_enable_rate;
            $params['popup_interval'] = $options_row->popup_interval;
            $params['popup_enable_comment'] = $options_row->popup_enable_comment;
            $params['popup_enable_facebook'] = $options_row->popup_enable_facebook;
            $params['popup_enable_twitter'] = $options_row->popup_enable_twitter;
//.........这里部分代码省略.........
开发者ID:nirav90,项目名称:gharena,代码行数:101,代码来源:BWGViewAlbum_compact_preview.php


示例13: delete_all

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WFController类代码示例发布时间:2022-05-23
下一篇:
PHP WC_Widget类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap