* @version 1.0.3 * @since 1.0.0 */ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } add_meta_box('dashboard_right_now', __('Status', 'snipi'), 'wp_snipi_overview_right_now', 'snipi_overview', 'left', 'core'); add_meta_box('dashboard_quick_press', __('Plugin mode', 'snipi'), 'wp_snipi_settings', 'snipi_overview', 'right', 'core'); //add_meta_box('dashboard_primary', __('Latest News', 'snipi'), 'wp_snipi_overview_news', 'snipi_overview', 'left', 'core'); /** * */ function wp_snipi_overview() { ?>
For more information on how to use the toolbar with Snipi for Wordpress Plugin, read the About section of the Snipi for Wordpress plugin
Please enter your Snipi username and password. If you do not yet have an account, Sign Up here.
Signed in as '.$snipi_username.'.
'; ?> You can either use the default WordPress Media Library (WordPress Mode), or for some extra power, download the NextGen Gallery plugin. As soon as its installed and activated, you can switch to NextGen Mode right here in the settings."; echo "Remember, you'll need the Snipi Toolbar to drag and drop images and have them automagically appear in WordPress.
"; echo "Enjoy. And visit us at Snipi.com for all the other Snipi features.
"; echo ''; } /** * Print HTML code to switch mode in Snipi Plugin * */ function wp_snipi_settings(){ global $snipi; if (isset($_GET['mode'])&&strlen($_GET['mode'])){ //echo $snipi->options['mode']; switch($_GET['mode']){ case 'ngg': if (class_exists('nggLoader')){ $snipi->options['mode']='ngg'; update_option('snipi_options',$snipi->options); }else{ echo 'install NextGen'; } break; case 'wp': default: $snipi->options['mode']='wp'; update_option('snipi_options',$snipi->options); break; } } echo '';
switch($snipi->options['mode']){
case 'ngg':
echo 'Snipi for WordPress is currently in NextGen mode
';
echo ' Switch to WordPress Mode';
break;
case 'wp':
default:
echo 'Snipi for WordPress is currently in WordPress mode
';
if (class_exists('nggLoader')){
echo ' Switch to NextGen Mode';
}
break;
}
echo '