Example #1
0
 /**
  * LazyestAdmin::register_scripts()
  * Script used in Lazyest Gallery Admin
  * 
  * @return void
  */
 function register_scripts()
 {
     $j = defined('WP_DEBUG') && WP_DEBUG ? 'dev.js' : 'js';
     wp_register_script('tablednd', $this->plugin_url . "/js/jquery.tablednd_0_5.{$j}", array('jquery'), '0.5', false);
     wp_register_script('lg_sorttable', $this->plugin_url . "/js/lazyest-sorttable.{$j}", array(), '1.1', true);
     wp_register_script('lg_context', $this->plugin_url . "/js/jquery.contextmenu.{$j}", array('jquery'), '1.01', true);
     wp_register_script('lg_progressbar', $this->plugin_url . "/js/jquery.progressbar.{$j}", array('jquery'), '2.01', true);
     wp_register_script('lg_manager', $this->plugin_url . "/js/lazyest-manager.{$j}", array('tablednd', 'lg_context', 'lg_progressbar', 'lg_sorttable'), lg_version(), true);
     wp_register_script('lg_loader', $this->plugin_url . "/js/lazyest-loader.{$j}", array('jquery'), '1.1', true);
     add_thickbox();
 }
Example #2
0
 /**
  * LazyestFrontend::show_dirs()
  * Show the folders view
  * 
  * @param LazyestFolder $folder 
  * @param integer $perpage number of folders per page
  * @param integer $columns number of columns
  * @return void
  */
 function show_dirs($folder = null, $perpage = 0, $columns = 1)
 {
     global $lg_paged, $current_user;
     if (!$this->access_check($folder)) {
         return;
     }
     $columns = 'TRUE' == $this->get_option('table_layout') ? max(1, $columns) : max(0, $columns);
     $perpage = max(0, $perpage);
     $folders = null != $folder ? $folder->subfolders('visible') : $this->folders('root', 'visible');
     if (0 == count($folders)) {
         return;
     }
     $foldervalue = null != $folder ? urlencode($folder->curdir) : '';
     $start = 1;
     $end = count($folders);
     $query_var = 'lg_paged';
     $lg_paged = isset($lg_paged) ? (int) $lg_paged : isset($_REQUEST[$query_var]) ? absint($_REQUEST[$query_var]) : null;
     printf('<div class="folders"><!-- Lazyest Gallery %s -->%s', lg_version(), "\n");
     if (0 < $perpage) {
         $total_pages = ceil(count($folders) / $perpage);
         if (isset($lg_paged)) {
             $current = max(1, $lg_paged);
         } else {
             $current = isset($_REQUEST[$query_var]) ? absint($_REQUEST[$query_var]) : 0;
             $current = min(max(1, $current), $total_pages);
         }
         $start = ($current - 1) * $perpage + 1;
         $this->dirshows++;
         $current_user = get_currentuserinfo();
         $end = min(count($folders), $current * $perpage);
         if ($perpage < count($folders) && $perpage != 0) {
             $ajax_nonce = wp_create_nonce('show_dirs');
             printf('<form name="folders_page_%s" action="%s" method="post">', $this->dirshows, $this->uri());
             printf('<input type="hidden" name="current" value="%s" />', $current);
             printf('<input type="hidden" name="last_page" value="%s" />', ceil(count($folders) / $perpage));
             printf('<input type="hidden" name="folder" value="%s" />', $foldervalue);
             printf('<input type="hidden" name="virtual" value="%s" />', urlencode($this->virtual_root));
             printf('<input type="hidden" name="perpage" value="%s" />', $perpage);
             printf('<input type="hidden" name="columns" value="%s" />', $columns);
             printf('<input type="hidden" name="ajax_nonce" value="%s" />', $ajax_nonce);
             printf('<input type="hidden" name="request_uri" value="%s" />', remove_query_arg('lg_paged', $_SERVER['REQUEST_URI']));
             printf('<input type="hidden" name="user_id" value="%s" />', $current_user->ID);
         }
     }
     // this is where we the actually echo the folders
     echo 'TRUE' == $this->get_option('table_layout') ? $this->dir_table($folders, $start, $end, $columns) : $this->dir_view($folders, $start, $end);
     if ($perpage < count($folders) && $perpage != 0) {
         printf('<div class="folder_pagination">%s<br style="clear:both;" /></div></form>', $this->pagination('folders', $folders));
     }
     echo "</div>";
 }
Example #3
0
    function aboutbox()
    {
        ?>
    <div id="aboutbox" class="postbox <?php 
        echo $this->installstyle;
        ?>
">
      <h3 class="hndle"><span><?php 
        esc_html_e('About Lazyest Gallery', 'lazyest-gallery');
        ?>
</span></h3>
      <div class="inside">
        <div id="version" class="misc-pub-section">               
          <div class="versions">
            <p><span id="lg-version-message"><strong><?php 
        esc_html_e('Version', 'lazyest-gallery');
        ?>
</strong>: <?php 
        echo lg_version();
        ?>
</span></p>
          </div>
        </div>
        <div id="links" class="misc-pub-section">
          <p><a class="home" target="_blank" href="http://brimosoft.nl/lazyest/gallery/"><?php 
        esc_html_e('Plugin Homepage', 'lazyest-gallery');
        ?>
</a></p>
          <p><a class="notepad" target="_blank" href="http://brimosoft.nl/lazyest/gallery/user-guide/"><?php 
        esc_html_e('User Guide', 'lazyest-gallery');
        ?>
</a></p>
          <p><a class="popular" target="_blank" href="http://brimosoft.nl/lazyest/gallery/frequently-asked-questions/"><?php 
        esc_html_e('Frequently Asked Questions', 'lazyest-gallery');
        ?>
</a></p>
          <p><a class="add" target="_blank" href="http://brimosoft.nl/forums/forum/requests/"><?php 
        esc_html_e('Suggest a Feature', 'lazyest-gallery');
        ?>
</a></p>
          <p><a class="rss" target="_blank" href="http://brimosoft.nl/category/lazyest-gallery/feed/"><?php 
        esc_html_e('Lazyest Gallery News', 'lazyest-gallery');
        ?>
</a></p>
          <p><a class="user-group" target="_blank" href="http://wordpress.org/tags/lazyest-gallery?forum_id=10"><?php 
        esc_html_e('WordPress Forum', 'lazyest-gallery');
        ?>
</a></p>
        </div>        
        <div id="donate" class="misc-pub-section misc-pub-section-last">
          <p style="text-align:center"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=1257529" title="<?php 
        esc_html_e('Donate with PayPal', 'lazyest-gallery');
        ?>
"><img src="https://www.paypal.com/en_US/NL/i/btn/btn_donateCC_LG.gif" alt="" /></a></p>
        </div>
      </div>
    </div>
    <?php 
    }