';
echo sprintf(__('This plugin is primarily developed, maintained, supported and documented by Alex Rabe with a lot of love & effort. Any kind of contribution would be highly appreciated. Thanks!', 'nggallery'), 'http://alexrabe.de/');
echo '';
}
/**
* Ajax Check for conflict with other plugins/themes
*
* @return void
*/
function ngg_plugin_check() {
global $ngg;
?>
' . __( 'Loading…' ) . '' . __('This widget requires JavaScript.') . '
';
}
function ngg_overview_donators() {
global $ngg;
$i = 0;
$list = '';
$supporter = nggAdminPanel::get_remote_array($ngg->donators);
// Ensure that this is a array
if ( !is_array($supporter) )
return _e('Thanks to all donators...', 'nggallery');
$supporter = array_reverse($supporter);
foreach ($supporter as $name => $url) {
$i++;
if ($url)
$list .= "$name\n";
else
$list .= "$name";
if ($i > 4)
break;
}
?>
' . __( 'Loading…' ) . '' . __('This widget requires JavaScript.') . '
';
}
function ngg_overview_news(){
?>
get_var("SELECT COUNT(*) FROM $wpdb->nggpictures") );
$galleries = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery") );
$albums = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum") );
?>
$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 );
?>
| %2$sMB' ), esc_url( admin_url( 'admin.php?page=nggallery-manage-gallery' ) ), $quota ); ?> |
|
download_locale();
if ($result == true) {
?>
' . __( 'Loading…' ) . '' . __('This widget requires JavaScript.') . '
';
}
function ngg_locale() {
global $ngg;
require_once(NGGALLERY_ABSPATH . '/lib/locale.php');
$locale = new ngg_locale();
$overview_url = admin_url() . 'admin.php?page=' . NGGFOLDER;
$result = $locale->check();
$update_url = wp_nonce_url ( $overview_url . '&locale=update', 'ngg_update_locale');
//Translators can change this text via gettext
if ($result == 'installed') {
echo $ngg->translator;
if ( !is_wp_error($locale->response) && $locale->response['response']['code'] == '200') {
?>
Download now your language file !
'. sprintf( 'Would you like to help to translate this plugin ? Download the current pot file and read here how you can translate the plugin.', NGGALLERY_URLPATH . 'lang/nggallery.pot').'';
}
/**
* Show GD Library version information
*
* @return void
*/
function ngg_gd_info() {
if(function_exists("gd_info")){
$info = gd_info();
$keys = array_keys($info);
for($i=0; $i " . $keys[$i] ." : " . ngg_gd_yesNo($info[$keys[$i]]) . "\n";
else
echo " " . $keys[$i] ." : " . $info[$keys[$i]] . "\n";
}
}
else {
echo ''.__('No GD support', 'nggallery').'!
';
}
}
/**
* Return localized Yes or no
*
* @param bool $bool
* @return return 'Yes' | 'No'
*/
function ngg_gd_yesNo( $bool ){
if($bool)
return __('Yes', 'nggallery');
else
return __('No', 'nggallery');
}
/**
* Show up some server infor's
* @author GamerZ (http://www.lesterchan.net)
*
* @return void
*/
function ngg_get_serverinfo() {
global $wpdb, $ngg;
// Get MYSQL Version
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
// GET SQL Mode
$mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'");
if (is_array($mysqlinfo)) $sql_mode = $mysqlinfo[0]->Value;
if (empty($sql_mode)) $sql_mode = __('Not set', 'nggallery');
// Get PHP Safe Mode
if(ini_get('safe_mode')) $safe_mode = __('On', 'nggallery');
else $safe_mode = __('Off', 'nggallery');
// Get PHP allow_url_fopen
if(ini_get('allow_url_fopen')) $allow_url_fopen = __('On', 'nggallery');
else $allow_url_fopen = __('Off', 'nggallery');
// Get PHP Max Upload Size
if(ini_get('upload_max_filesize')) $upload_max = ini_get('upload_max_filesize');
else $upload_max = __('N/A', 'nggallery');
// Get PHP Output buffer Size
if(ini_get('pcre.backtrack_limit')) $backtrack_limit = ini_get('pcre.backtrack_limit');
else $backtrack_limit = __('N/A', 'nggallery');
// Get PHP Max Post Size
if(ini_get('post_max_size')) $post_max = ini_get('post_max_size');
else $post_max = __('N/A', 'nggallery');
// Get PHP Max execution time
if(ini_get('max_execution_time')) $max_execute = ini_get('max_execution_time');
else $max_execute = __('N/A', 'nggallery');
// Get PHP Memory Limit
if(ini_get('memory_limit')) $memory_limit = $ngg->memory_limit;
else $memory_limit = __('N/A', 'nggallery');
// Get actual memory_get_usage
if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'nggallery');
else $memory_usage = __('N/A', 'nggallery');
// required for EXIF read
if (is_callable('exif_read_data')) $exif = __('Yes', 'nggallery'). " ( V" . substr(phpversion('exif'),0,4) . ")" ;
else $exif = __('No', 'nggallery');
// required for meta data
if (is_callable('iptcparse')) $iptc = __('Yes', 'nggallery');
else $iptc = __('No', 'nggallery');
// required for meta data
if (is_callable('xml_parser_create')) $xml = __('Yes', 'nggallery');
else $xml = __('No', 'nggallery');
?>
: ( Bit)
:
:
:
:
:
:
:
:
:
:
:
: s
:
:
:
array());
if ( preg_match_all('#(?:)|(?:(.*?)\s*(?:(.*?)\s*(?:(.*?)\s*)?)?
)#s', ob_get_clean(), $matches, PREG_SET_ORDER) )
foreach($matches as $match) {
if(strlen($match[1]))
$phpinfo[$match[1]] = array();
elseif(isset($match[3]))
$phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
else
$phpinfo[end(array_keys($phpinfo))][] = $match[2];
}
return $phpinfo;
}
/**
* Show NextGEN Gallery related plugins. Fetch plugins from wp.org which have added 'nextgen-gallery' as tag in readme.txt
*
* @return postbox output
*/
function ngg_widget_related_plugins() {
echo '' . __( 'Loading…' ) . '
' . __('This widget requires JavaScript.') . '
';
}
function ngg_related_plugins() {
include(ABSPATH . 'wp-admin/includes/plugin-install.php');
if ( false === ( $api = get_transient( 'ngg_related_plugins' ) ) ) {
// this api sucks , tags will not be used in the correct way : nextgen-gallery cannot be searched
$api = plugins_api('query_plugins', array('search' => 'nextgen') );
if ( is_wp_error($api) )
return;
set_transient( 'ngg_related_plugins', $api, 60*60*24 );
}
// don't show my own plugin :-) and some other plugins, which come up with the search result
$blacklist = array(
'nextgen-gallery',
'galleria-wp',
'photosmash-galleries',
'flash-album-gallery',
'events-calendar',
'widgets',
'side-content',
'featurific-for-wordpress',
'smooth-gallery-replacement',
'livesig',
'wordpress-gallery-slideshow',
'nkmimagefield',
'nextgen-ajax',
'projectmanager'
);
$i = 0;
while ( $i < 4 ) {
// pick them randomly
if ( 0 == count($api->plugins) )
return;
$key = array_rand($api->plugins);
$plugin = $api->plugins[$key];
// don't forget to remove them
unset($api->plugins[$key]);
if ( !isset($plugin->name) )
continue;
if ( in_array($plugin->slug , $blacklist ) )
continue;
$link = esc_url( $plugin->homepage );
$title = esc_html( $plugin->name );
$description = esc_html( strip_tags(@html_entity_decode($plugin->short_description, ENT_QUOTES, get_option('blog_charset'))) );
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin->slug, 'install-plugin_' . $plugin->slug) .
'&TB_iframe=true&width=600&height=800';
echo " (" . __( 'Install' ) . ")\n";
echo "$description " . __( 'Author' ) . " : $plugin->author
\n";
$i++;
}
}
?>