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

PHP wpmu_enable_function函数代码示例

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

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



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

示例1: add_menu

 function add_menu()
 {
     add_menu_page(_n('Gallery', 'Galleries', 1, 'nggallery'), _n('Gallery', 'Galleries', 1, 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'), 'div');
     add_submenu_page(NGGFOLDER, __('Overview', 'nggallery'), __('Overview', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Add Gallery / Images', 'nggallery'), __('Add Gallery / Images', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, _n('Album', 'Albums', 1, 'nggallery'), _n('Album', 'Albums', 1, 'nggallery'), 'NextGEN Edit album', 'nggallery-manage-album', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Tags', 'nggallery'), __('Tags', 'nggallery'), 'NextGEN Manage tags', 'nggallery-tags', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', array(&$this, 'show_menu'));
     if (wpmu_enable_function('wpmuStyle')) {
         add_submenu_page(NGGFOLDER, __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', array(&$this, 'show_menu'));
     }
     if (wpmu_enable_function('wpmuRoles') || wpmu_site_admin()) {
         add_submenu_page(NGGFOLDER, __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', array(&$this, 'show_menu'));
     }
     add_submenu_page(NGGFOLDER, __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', array(&$this, 'show_menu'));
     //TODO: Remove after WP 3.1 release, not longer needed
     if (is_multisite() && wpmu_site_admin()) {
         add_submenu_page('ms-admin.php', __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', array(&$this, 'show_menu'));
     }
     if (!is_multisite() || wpmu_site_admin()) {
         add_submenu_page(NGGFOLDER, __('Reset / Uninstall', 'nggallery'), __('Reset / Uninstall', 'nggallery'), 'activate_plugins', 'nggallery-setup', array(&$this, 'show_menu'));
     }
     //register the column fields
     $this->register_columns();
 }
开发者ID:rtgibbons,项目名称:bya.org,代码行数:26,代码来源:admin.php


示例2: ngg_overview_server

/**
 * Show the server settings
 * 
 * @return void
 */
function ngg_overview_server()
{
    ?>
<div id="dashboard_server_settings" class="dashboard-widget-holder wp_dashboard_empty">
	<div class="ngg-dashboard-widget">
	  <?php 
    if (IS_WPMU) {
        if (wpmu_enable_function('wpmuQuotaCheck')) {
            echo ngg_SpaceManager::details();
        } else {
            //TODO:WPMU message in WP2.5 style
            echo ngg_SpaceManager::details();
        }
    } else {
        ?>
	  	<div class="dashboard-widget-content">
      		<ul class="settings">
      		<?php 
        ngg_get_serverinfo();
        ?>
	   		</ul>
		</div>
	  <?php 
    }
    ?>
    </div>
</div>
<?php 
}
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:34,代码来源:overview.php


示例3: add_menu

 function add_menu()
 {
     add_menu_page(__ngettext('Gallery', 'Galleries', 1, 'nggallery'), __ngettext('Gallery', 'Galleries', 1, 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'), NGGALLERY_URLPATH . 'admin/images/nextgen.png');
     add_submenu_page(NGGFOLDER, __('Overview', 'nggallery'), __('Overview', 'nggallery'), 'NextGEN Gallery overview', NGGFOLDER, array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Add Gallery / Images', 'nggallery'), __('Add Gallery / Images', 'nggallery'), 'NextGEN Upload images', 'nggallery-add-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __ngettext('Album', 'Albums', 1, 'nggallery'), __ngettext('Album', 'Albums', 1, 'nggallery'), 'NextGEN Edit album', 'nggallery-manage-album', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Tags', 'nggallery'), __('Tags', 'nggallery'), 'NextGEN Manage tags', 'nggallery-tags', array(&$this, 'show_menu'));
     add_submenu_page(NGGFOLDER, __('Options', 'nggallery'), __('Options', 'nggallery'), 'NextGEN Change options', 'nggallery-options', array(&$this, 'show_menu'));
     if (wpmu_enable_function('wpmuStyle')) {
         add_submenu_page(NGGFOLDER, __('Style', 'nggallery'), __('Style', 'nggallery'), 'NextGEN Change style', 'nggallery-style', array(&$this, 'show_menu'));
     }
     add_submenu_page(NGGFOLDER, __('Setup Gallery', 'nggallery'), __('Setup', 'nggallery'), 'activate_plugins', 'nggallery-setup', array(&$this, 'show_menu'));
     if (wpmu_enable_function('wpmuRoles')) {
         add_submenu_page(NGGFOLDER, __('Roles', 'nggallery'), __('Roles', 'nggallery'), 'activate_plugins', 'nggallery-roles', array(&$this, 'show_menu'));
     }
     add_submenu_page(NGGFOLDER, __('About this Gallery', 'nggallery'), __('About', 'nggallery'), 'NextGEN Gallery overview', 'nggallery-about', array(&$this, 'show_menu'));
     if (wpmu_site_admin()) {
         add_submenu_page('wpmu-admin.php', __('NextGEN Gallery', 'nggallery'), __('NextGEN Gallery', 'nggallery'), 'activate_plugins', 'nggallery-wpmu', array(&$this, 'show_menu'));
     }
 }
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:21,代码来源:admin.php


示例4: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        // check the cookie for the current setting
        $checked = get_user_setting('ngg_upload_resize') ? ' checked="true"' : '';
        ?>
    	<!-- upload images -->
    	<h2><?php 
        _e('Upload Images', 'nggallery');
        ?>
</h2>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table">
            
			<tr valign="top">
				<th scope="row"><?php 
        _e('Upload image', 'nggallery');
        ?>
</th>
                <?php 
        if ($ngg->options['swfUpload'] && defined('IS_WP_3_3')) {
            ?>
				<td>
                <div id="plupload-upload-ui">
                	<div>
                    	<?php 
            _e('Choose files to upload');
            ?>
                    	<input id="plupload-browse-button" type="button" value="<?php 
            esc_attr_e('Select Files');
            ?>
" class="button" />
                	</div>
                	<p class="ngg-dragdrop-info howto" style="display:none;" ><?php 
            _e('Or you can drop the files into this window.');
            ?>
</p>
                    <div id='uploadQueue'></div>
                    <p><label><input name="image_resize" type="checkbox" id="image_resize" value="true"<?php 
            echo $checked;
            ?>
 />
                        <?php 
            printf(__('Scale images to max width %1$dpx or max height %2$dpx', 'nggallery'), (int) $ngg->options['imgWidth'], (int) $ngg->options['imgHeight']);
            ?>
                        <div id='image_resize_pointer'>&nbsp;</div>
                        </label>
                    </p>
                    
                 </div>
                </td>
                <?php 
        } else {
            ?>
				<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
                <?php 
        }
        ?>
            </tr> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('in to', 'nggallery');
        ?>
</th> 
				<td><select name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . esc_attr($name) . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td> 
			</tr> 
			</table>
			<div class="submit">
//.........这里部分代码省略.........
开发者ID:popovdenis,项目名称:kmst,代码行数:101,代码来源:addgallery.php


示例5: nggallery_picturelist


//.........这里部分代码省略.........
                ?>
</option>
						<?php 
                foreach (get_pages() as $page) {
                    ?>
                        <option value="<?php 
                    echo esc_attr($page->ID);
                    ?>
"><?php 
                    echo esc_html($page->post_title);
                    ?>
</option>
                        <?php 
                }
                ?>
					</select>
					<input class="button-secondary action" type="submit" name="addnewpage" value="<?php 
                _e('Add page', 'nggallery');
                ?>
" id="group"/>
					</th>
				</tr>
				<?php 
            }
            ?>
                <?php 
            do_action('ngg_manage_gallery_settings', $act_gid);
            ?>

			</table>

			<div class="submit">
				<?php 
            if (wpmu_enable_function('wpmuScanFolder') && nggGallery::current_user_can('NextGEN Scan folder')) {
                ?>
				<input type="submit" class="button-secondary" name="scanfolder" value="<?php 
                _e("Scan Folder for new images", 'nggallery');
                ?>
 " />
				<?php 
            }
            ?>
				<input type="submit" class="button-primary action" name="updatepictures" value="<?php 
            _e("Save Changes", 'nggallery');
            ?>
" />
			</div>

		</div>
	</div>
</div> <!-- poststuff -->
<?php 
        }
        ?>

<?php 
    }
    ?>

<div class="tablenav top ngg-tablenav">
    <?php 
    $ngg->manage_page->pagination('top', $_GET['paged'], $nggdb->paged['total_objects'], $nggdb->paged['objects_per_page']);
    ?>
	<div class="alignleft actions">
	<select id="bulkaction" name="bulkaction">
		<option value="no_action" ><?php 
开发者ID:jeanpage,项目名称:ca_learn,代码行数:67,代码来源:manage-images.php


示例6: nggallery_picturelist


//.........这里部分代码省略.........
        echo $ngg->manage_page->base_page . '&amp;mode=edit&amp;gid=' . $act_gid . '&amp;paged=' . esc_attr($_GET['paged']);
        ?>
" accept-charset="utf-8">
<?php 
        wp_nonce_field('ngg_updategallery');
        ?>
<input type="hidden" name="page" value="manage-images" />

<?php 
        if (nggGallery::current_user_can('NextGEN Edit gallery options')) {
            ?>
<div id="poststuff">
	<?php 
            wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false);
            ?>
	<div id="gallerydiv" class="postbox <?php 
            echo postbox_classes('gallerydiv', 'ngg-manage-gallery');
            ?>
" >
		<h3><?php 
            _e('Gallery settings', 'nggallery');
            ?>
<small> (<?php 
            _e('Click here for more settings', 'nggallery');
            ?>
)</small></h3>
		<div class="inside">
			<?php 
            $controller->render_gallery_fields();
            ?>

			<div class="submit">
				<?php 
            if (wpmu_enable_function('wpmuImportFolder') && nggGallery::current_user_can('NextGEN Import image folder')) {
                ?>
				<input type="submit" class="button-secondary" name="scanfolder" value="<?php 
                _e("Scan Folder for new images", 'nggallery');
                ?>
 " />
				<?php 
            }
            ?>
				<input type="submit" class="button-primary action" name="updatepictures" value="<?php 
            _e("Save Changes", 'nggallery');
            ?>
" />
			</div>

		</div>
	</div>
</div> <!-- poststuff -->
<?php 
        }
        ?>

<?php 
    }
    ?>

<div class="tablenav top ngg-tablenav">
    <?php 
    $ngg->manage_page->pagination('top', $_GET['paged'], $total_number_of_images, $items_per_page);
    ?>
	<div class="alignleft actions">
	<select id="bulkaction" name="bulkaction">
		<option value="no_action" ><?php 
开发者ID:bensethro,项目名称:runcyb,代码行数:67,代码来源:manage-images.php


示例7: ngg_dashboard_quota

function ngg_dashboard_quota()
{
    if (get_site_option('upload_space_check_disabled')) {
        return;
    }
    if (!wpmu_enable_function('wpmuQuotaCheck')) {
        return;
    }
    $quota = get_space_allowed();
    $used = get_dirsize(BLOGUPLOADDIR) / 1024 / 1024;
    if ($used > $quota) {
        $percentused = '100';
    } else {
        $percentused = $used / $quota * 100;
    }
    $used_color = $percentused < 70 ? $percentused >= 40 ? 'waiting' : 'approved' : 'spam';
    $used = round($used, 2);
    $percentused = number_format($percentused);
    ?>
	<p class="sub musub" style="position:static" ><?php 
    _e('Storage Space');
    ?>
</p>
	<div class="table table_content musubtable">
	<table>
		<tr class="first">
			<td class="first b b-posts"><?php 
    printf(__('<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>'), esc_url(admin_url('admin.php?page=nggallery-manage-gallery')), $quota);
    ?>
</td>
			<td class="t posts"><?php 
    _e('Space Allowed');
    ?>
</td>
		</tr>
	</table>
	</div>
	<div class="table table_discussion musubtable">
	<table>
		<tr class="first">
			<td class="b b-comments"><?php 
    printf(__('<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>'), esc_url(admin_url('admin.php?page=nggallery-manage-gallery')), $used, $percentused);
    ?>
</td>
			<td class="last t comments <?php 
    echo $used_color;
    ?>
"><?php 
    _e('Space Used');
    ?>
</td>
		</tr>
	</table>
	</div>
	<br class="clear" />
	<?php 
}
开发者ID:ahsaeldin,项目名称:projects,代码行数:57,代码来源:overview.php


示例8: edit_current_screen

 /**
  * Add help and options to the correct screens
  *
  * @since 1.9.24
  *
  * @param object $screen The current screen.
  *
  * @return object $screen The current screen.
  */
 function edit_current_screen($screen)
 {
     // menu title is localized, so we need to change the toplevel name
     $i18n = strtolower(__('Galleries', 'nggallery'));
     switch ($screen->id) {
         case 'toplevel_page_' . NGGFOLDER:
             //The tab content
             $help = '<p>' . __('Welcome to your NextCellent Dashboard! This screen gives you all kinds of information about NextCellent at glance. You can get help for any screen by clicking the Help tab in the upper corner.') . '</p>';
             //Add the tab
             $screen->add_help_tab(array('id' => $screen->id . '-welcome', 'title' => 'Overview', 'content' => $help));
             //The tab content
             $help = '<p>' . __('The boxes on your overview screen are:', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('At a Glance', 'nggallery') . '</strong> - ' . __('Shows some general information about your site, such as the number of pictures, albums and galleries.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Latest News', 'nggallery') . '</strong> - ' . __('The latest NextCellent news.', 'nggallery') . '</p>';
             if (!is_multisite() || is_super_admin()) {
                 $help .= '<p><strong>' . __('Related plugins', 'nggallery') . '</strong> - ' . __('Shows plugins that extend NextCellent.', 'nggallery') . ' <strong>' . __('Pay attention', 'nggallery') . '</strong>: ' . __('third parties plugins that are compatible with NGG may not be 100% compatible with NextCellent Gallery!', 'nggallery') . '</p>';
             }
             $help .= '<p><strong>' . __('Help me help YOU!', 'nggallery') . '</strong> - ' . __('Shows general information about he plugin and some links.', 'nggallery') . '</p>';
             if (!(get_locale() == 'en_US')) {
                 $help .= '<p><strong>' . __('Translation', 'nggallery') . '</strong> - ' . __('View information about the current translation.') . '</p>';
             }
             if (!is_multisite() || is_super_admin()) {
                 $help .= '<p><strong>' . __('Server Settings', 'nggallery') . '</strong> - ' . __('Show all the server settings!.', 'nggallery') . '</p>';
                 $help .= '<p><strong>' . __('Plugin Check', 'nggallery') . '</strong> - ' . __('Check if there are known errors in your installation.', 'nggallery') . '</p>';
             }
             //Add the tab
             $screen->add_help_tab(array('id' => $screen->id . '-content', 'title' => 'Content', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-add-gallery":
             global $nggdb;
             $gallerylist = $nggdb->find_all_galleries('gid', 'DESC');
             //look for galleries
             $help = '<p>' . __('On this page you can add galleries and pictures to those galleries.', 'nggallery') . '</p>';
             if (nggGallery::current_user_can('NextGEN Add new gallery')) {
                 $help .= '<p><strong>' . __('New gallery', 'nggallery') . '</strong> - ' . __('Add new galleries to NextCellent.', 'nggallery') . '</p>';
             }
             if (empty($gallerylist)) {
                 $help .= '<p><strong>' . __('You must add a gallery before adding images!', 'nggallery') . '</strong>';
             } else {
                 $help .= '<p><strong>' . __('Images', 'nggallery') . '</strong> - ' . __('Add new images to a gallery.', 'nggallery') . '</p>';
             }
             if (wpmu_enable_function('wpmuZipUpload') && nggGallery::current_user_can('NextGEN Upload a zip') && !empty($gallerylist)) {
                 $help .= '<p><strong>' . __('ZIP file', 'nggallery') . '</strong> - ' . __('Add images from a ZIP file.', 'nggallery') . '</p>';
             }
             if (wpmu_enable_function('wpmuImportFolder') && nggGallery::current_user_can('NextGEN Import image folder')) {
                 $help .= '<p><strong>' . __('Import folder', 'nggallery') . '</strong> - ' . __('Import a folder from the server as a new gallery.', 'nggallery') . '</p>';
             }
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Add things', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-manage-gallery":
             // we would like to have screen option only at the manage images / gallery page
             if (isset($_GET['mode']) && $_GET['mode'] == 'edit' || isset($_POST['backToGallery'])) {
                 $screen->base = $screen->id = 'nggallery-manage-images';
             } else {
                 $screen->base = $screen->id = 'nggallery-manage-gallery';
             }
             $help = '<p>' . __('Manage your images and galleries.', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Manage everything', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-manage-album":
             $help = '<p>' . __('Organize your galleries into albums.', 'nggallery') . '</p><p>' . __('First select an album from the dropdown and then drag the galleries you want to add or remove from the selected album.', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Organize everything', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-tags":
             $help = '<p>' . __('Organize your pictures with tags.', 'nggallery') . '</p><p>' . __('Rename, delete and edit tags. Use the rename function to merge tags.', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Organize pictures', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-options":
             $help = '<p>' . __('Edit all of NextCellent\'s options. The options are sorted in multiple categories.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('General', 'nggallery') . '</strong> - ' . __('General NextCellent options. Contains options for permalinks and related images.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Images', 'nggallery') . '</strong> - ' . __('All image-related options. Also contains options for thumbnails.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Gallery', 'nggallery') . '</strong> - ' . __('Everything about galleries. From sorting options to the number of images, it\'s all in here.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Effects', 'nggallery') . '</strong> - ' . __('Make your gallery look beautiful.', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Watermark', 'nggallery') . '</strong> - ' . __('Who doesn\'t want theft-proof images?', 'nggallery') . '</p>';
             $help .= '<p><strong>' . __('Slideshow', 'nggallery') . '</strong> - ' . __('Edit options for the slideshow.', 'nggallery') . '</p>';
             $help .= '<p>' . __('Don\'t forget to press save!', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Edit options', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-style":
             $help = '<p>' . __('You can edit the css file to adjust how your gallery looks.', 'nggallery') . '</p>';
             $help .= '<p>' . __('When you save an edited file, NextCellent automatically saves it as a copy in the folder ngg_styles. This protects your changes from upgrades.', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Style your gallery', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-roles":
             $help = '<p>' . __('You can assign the lowest user role that has access to a certain feature. Needless to say, all greater user roles will also have access to that feature.', 'nggallery') . '</p>';
             $help .= '<p>' . __('NextCellent also works with various plugins that extend the default roles capabilities.', 'nggallery') . '</p>';
             $screen->add_help_tab(array('id' => $screen->id . '-general', 'title' => 'Grant permissions', 'content' => $help));
             break;
         case "{$i18n}_page_nggallery-setup":
             $help = '<p>' . __('If \'someone\' messed with your settings (yeah, definitely not you), you can reset them here.', 'nggallery') . '</p>';
             $help .= '<p><b>' . __('Attention!', 'nggallery') . '</b> ' . __('You should not use the Uninstall Plugin button, unless you know what you\'re doing! It should never be necessary to press it.', 'nggallery') . '</p>';
//.........这里部分代码省略.........
开发者ID:valerol,项目名称:korpus,代码行数:101,代码来源:admin.php


示例9: admin_bar_menu

 /**
  * Adding NextGEN Gallery to the Admin bar
  * 
  * @since 1.9.0
  * 
  * @return void
  */
 function admin_bar_menu()
 {
     // If the current user can't write posts, this is all of no use, so let's not output an admin menu
     if (!current_user_can('NextGEN Gallery overview')) {
         return;
     }
     global $wp_admin_bar;
     $wp_admin_bar->add_menu(array('id' => 'ngg-menu', 'title' => __('Gallery'), 'href' => admin_url('admin.php?page=' . NGGFOLDER)));
     $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-overview', 'title' => __('Overview', 'nggallery'), 'href' => admin_url('admin.php?page=' . NGGFOLDER)));
     if (current_user_can('NextGEN Upload images')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-add-gallery', 'title' => __('Add Gallery / Images', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-add-gallery')));
     }
     if (current_user_can('NextGEN Manage gallery')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-manage-gallery', 'title' => __('Manage Gallery', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-manage-gallery')));
     }
     if (current_user_can('NextGEN Edit album')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-manage-album', 'title' => _n('Album', 'Albums', 1, 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-manage-album')));
     }
     if (current_user_can('NextGEN Manage tags')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-tags', 'title' => __('Tags', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-tags')));
     }
     if (current_user_can('NextGEN Change options')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-options', 'title' => __('Options', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-options')));
     }
     if (wpmu_enable_function('wpmuStyle') && current_user_can('NextGEN Change style')) {
         $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-style', 'title' => __('Style', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-style')));
     }
     $wp_admin_bar->add_menu(array('parent' => 'ngg-menu', 'id' => 'ngg-menu-about', 'title' => __('About', 'nggallery'), 'href' => admin_url('admin.php?page=nggallery-about')));
 }
开发者ID:ralf-rojahn,项目名称:badalexandersbad,代码行数:36,代码来源:admin.php


示例10: nggallery_admin_add_gallery


//.........这里部分代码省略.........
    } else {
        ?>
	<!-- MultiFile script -->
	<script type="text/javascript">	
		jQuery(function(){
			jQuery('#imagefiles').MultiFile({
				STRING: {
			    	remove:'<?php 
        _e('remove', 'nggallery');
        ?>
'
  				}
		 	});
		});
	</script>
	<?php 
    }
    ?>
	<!-- jQuery Tabs script -->
	<script type="text/javascript">
		jQuery(function() {
			jQuery('#slider > ul').tabs({ fxFade: true, fxSpeed: 'fast' });	
		});
	</script>
		
	<div id="slider" class="wrap">
	
		<ul id="tabs">
			<li><a href="#addgallery"><?php 
    _e('Add new gallery', 'nggallery');
    ?>
</a></li>
			<?php 
    if (wpmu_enable_function('wpmuZipUpload')) {
        ?>
			<li><a href="#zipupload"><?php 
        _e('Upload a Zip-File', 'nggallery');
        ?>
</a></li>
			<?php 
    }
    if (!IS_WPMU) {
        ?>
			<li><a href="#importfolder"><?php 
        _e('Import image folder', 'nggallery');
        ?>
</a></li>
			<?php 
    }
    ?>
			<li><a href="#uploadimage"><?php 
    _e('Upload Images', 'nggallery');
    ?>
</a></li>
		</ul>

		<!-- create gallery -->
		<div id="addgallery">
		<h2><?php 
    _e('Add new gallery', 'nggallery');
    ?>
</h2>
			<form name="addgallery" id="addgallery_form" method="POST" action="<?php 
    echo $filepath;
    ?>
" accept-charset="utf-8" >
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:67,代码来源:addgallery.php


示例11: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        ?>
    	<!-- upload images -->
    	<h2><?php 
        _e('Upload Images', 'nggallery');
        ?>
</h2>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table"> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('Upload image', 'nggallery');
        ?>
</th>
				<td><span id='spanButtonPlaceholder'></span><input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles"/></td>
			</tr> 
			<tr valign="top"> 
				<th scope="row"><?php 
        _e('in to', 'nggallery');
        ?>
</th> 
				<td><select name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . $name . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td> 
			</tr> 
			</table>
			<div class="submit">
				<?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<input type="submit" name="disable_flash" id="disable_flash" title="<?php 
            _e('The batch upload requires Adobe Flash 10, disable it if you have problems', 'nggallery');
            ?>
" value="<?php 
            _e('Disable flash upload', 'nggallery');
            ?>
" />
				<?php 
        } else {
            ?>
				<input type="submit" name="enable_flash" id="enable_flash" title="<?php 
            _e('Upload multiple files at once by ctrl/shift-selecting in dialog', 'nggallery');
            ?>
" value="<?php 
            _e('Enable flash based upload', 'nggallery');
            ?>
" />
				<?php 
        }
        ?>
				<input class="button-primary" type="submit" name="uploadimage" id="uploadimage_btn" value="<?php 
        _e('Upload images', 'nggallery');
        ?>
" />
			</div>
		</form>
    <?php 
    }
开发者ID:besimhu,项目名称:legacy,代码行数:90,代码来源:addgallery.php


示例12: check_quota

 function check_quota()
 {
     // Only for WPMU
     if (IS_WPMU && wpmu_enable_function('wpmuQuotaCheck')) {
         if ($error = upload_is_user_over_quota(false)) {
             nggGallery::show_error(__('Sorry, you have used your space allocation. Please delete some files to upload more files.', 'nggallery'));
             return true;
         }
     }
     return false;
 }
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:11,代码来源:functions.php


示例13: dashboard_quota

    function dashboard_quota()
    {
        if (get_site_option('upload_space_check_disabled')) {
            return;
        }
        if (!wpmu_enable_function('wpmuQuotaCheck')) {
            return;
        }
        $settings = C_NextGen_Settings::get_instance();
        $fs = C_Fs::get_instance();
        $dir = $fs->join_paths($fs->get_document_root('content'), $settings->gallerypath);
        $quota = get_space_allowed();
        $used = get_dirsize($dir) / 1024 / 1024;
        if ($used > $quota) {
            $percentused = '100';
        } else {
            $percentused = $used / $quota * 100;
        }
        $used_color = $percentused < 70 ? $percentused >= 40 ? 'yellow' : 'green' : 'red';
        $used = round($used, 2);
        $percentused = number_format($percentused);
        ?>
        <p><?php 
        print __('Storage Space');
        ?>
</p>
        <ul>
            <li><?php 
        printf(__('%1$sMB Allowed', 'nggallery'), $quota);
        ?>
</li>
            <li class="<?php 
        print $used_color;
        ?>
"><?php 
        printf(__('%1$sMB (%2$s%%) Used', 'nggallery'), $used, $percentused);
        ?>
</li>
        </ul>
        <?php 
    }
开发者ID:kixortillan,项目名称:dfosashworks,代码行数:41,代码来源:overview.php


示例14: tab_uploadimage

    function tab_uploadimage()
    {
        global $ngg;
        // check the cookie for the current setting
        //$checked = get_user_setting('ngg_upload_resize') ? ' checked="true"' : '';
        ?>
    	<!-- upload images -->
    	<h3><?php 
        _e('Upload images', 'nggallery');
        ?>
</h3>
		<form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" action="<?php 
        echo $this->filepath . '#uploadimage';
        ?>
" accept-charset="utf-8" >
		<?php 
        wp_nonce_field('ngg_addgallery');
        ?>
			<table class="form-table">
			<tr valign="top">
				<td scope="row" style="padding: 0;" colspan="2"><?php 
        _e('in to', 'nggallery');
        ?>
<select style="margin-left:10px;" name="galleryselect" id="galleryselect">
				<option value="0" ><?php 
        _e('Choose gallery', 'nggallery');
        ?>
</option>
				<?php 
        foreach ($this->gallerylist as $gallery) {
            //special case : we check if a user has this cap, then we override the second cap check
            if (!current_user_can('NextGEN Upload in all galleries')) {
                if (!nggAdmin::can_manage_this_gallery($gallery->author)) {
                    continue;
                }
            }
            $name = empty($gallery->title) ? $gallery->name : $gallery->title;
            echo '<option value="' . $gallery->gid . '" >' . $gallery->gid . ' - ' . esc_attr($name) . '</option>' . "\n";
        }
        ?>
				</select>
				<br /><?php 
        echo $this->maxsize;
        ?>
				<br /><?php 
        if (is_multisite() && wpmu_enable_function('wpmuQuotaCheck')) {
            display_space_usage();
        }
        ?>
</td>
			</tr>
			<tr valign="top">
                <?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<td colspan="2" style="padding: 0;">
                <div id="plupload-upload-ui">
				<div id="drag-drop-area" style="border: 4px dashed #bbb;height: 150px; padding:20px;">
				<div class="drag-drop-inside" style="margin:auto; text-align:center; width: 250px;">
					<p class="ngg-dragdrop-info drag-drop-info" style="font-size:20px;" >
					<?php 
            _e('Drop your files in this window', 'nggallery');
            ?>
<br/><span style="font-size:14px;"><?php 
            _e('Or', 'nggallery');
            ?>
</p>
                    <input style="margin:auto; text-align:center;" id="plupload-browse-button" type="button" value="<?php 
            esc_attr_e('Select Files', 'nggallery');
            ?>
" class="button" />
					</div>
					</div>
					</div>
                </td>
                <?php 
        } else {
            ?>
				<td><span id='spanButtonPlaceholder'></span>
				<input type="file" name="imagefiles[]" id="imagefiles" size="35" class="imagefiles" multiple/></td>
                <?php 
        }
        ?>
				</tr>
				<tr><td><div id='uploadQueue' style="margin-top: 10px;"><td></div>
            </tr>
			</table>
			<div class="submit">
				<?php 
        if ($ngg->options['swfUpload']) {
            ?>
				<input class="button action" type="submit" name="disable_flash" id="disable_flash" title="<?php 
            _e('Click here to use the browser upload instead', 'nggallery');
            ?>
" value="<?php 
            _e('Use basic uploader', 'nggallery');
            ?>
" />
				<?php 
        } else {
//.........这里部分代码省略.........
开发者ID:valerol,项目名称:korpus,代码行数:101,代码来源:addgallery.php



注:本文中的wpmu_enable_function函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpmu_signup_blog函数代码示例发布时间:2022-05-23
下一篇:
PHP wpmu_delete_user函数代码示例发布时间: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