コード例 #1
0
ファイル: panel_messages.php プロジェクト: scottnkerr/eeco
function rssmi_ratePlugin()
{
    $dismiss_link_joiner = count($_GET) > 0 ? '&' : '?';
    if (current_user_can('activate_plugins')) {
        if (rssmi_check_didUpgrade() == 1) {
            //restrict this users you have upgraded and only to the plugin pages!!!
            //		if ((isset( $_GET['post_type'] )) && (strpos("rssmi_feed",$_GET['post_type'] ,0)!==false) || ( isset( $_GET['page'] )) && ((strpos("wprssmi",$_GET['page'] ,0)!==false) || (strpos('wprssmi',$_GET['page'] )!==false ) || (strpos('wprssmi_options',$_GET['page'] )!==false ) || (strpos('wprssmi_options2',$_GET['page'] )!==false ) || (strpos('wprssmi_options3',$_GET['page'] )!==false ) || (strpos('wprssmi_options4',$_GET['page'] )!==false ) || (strpos('wprssmi_options9',$_GET['page'] )!==false )  || (strpos('wprssmi_options5',$_GET['page'] )!==false ) || (strpos('wprssmi_options8',$_GET['page'] )!==false )|| (strpos('wprssmi_options7',$_GET['page'] )!==false ))) {
            if (rssmi_is_plugin_page() == 1) {
                if (!empty($_GET['rssmi_dismiss_rating'])) {
                    update_option('rssmi_dismiss_rating', 1);
                } else {
                    if (get_option('rssmi_dismiss_rating') == false) {
                        ?>
				<div id="rating_message" class="updated">
					<p><?php 
                        echo sprintf(__('I hope you\'re enjoying this free Multi-Importer plugin.  Please consider <a href="%s" target="_blank">saying thanks with a good rating</a>.  You can dismiss this message forever by <a href="%s">clicking here</a>.'), 'http://wordpress.org/support/view/plugin-reviews/wp-rss-multi-importer', $_SERVER['REQUEST_URI'] . $dismiss_link_joiner . 'rssmi_dismiss_rating=1');
                        ?>
</p>
				</div>
				<?php 
                    }
                }
            }
        }
    }
}
コード例 #2
0
ファイル: options.php プロジェクト: scottnkerr/eeco
function wp_rss_multi_importer_intro_page()
{
    $feed = fetch_feed("http://rss.marketingprofs.com/marketingprofs");
    $options = get_option('rss_import_options');
    $post_options = get_option('rss_post_options');
    ?>
		<div id="icon-themes" class="icon32 icon32-posts-rssmi_feed"></div>
		<h2><?php 
    _e("Multi-Importer", 'wp-rss-multi-importer');
    ?>
</h2>
	<div class="wrap">
	
				
			
	                           <div class="postbox-container" style="min-width:400px; max-width:600px; padding: 0 20px 0 0;">	<?php 
    _e("<h2>Instructions: Get Up and Running Quickly</h2>", 'wp-rss-multi-importer');
    ?>
					<div class="metabox-holder">	
						<div class="postbox-container">
							<H3 class="info_titles"><?php 
    _e("Add the RSS feeds and optionally assign them to categories", 'wp-rss-multi-importer');
    ?>
</H3>
							<p class="info_text"><?php 
    _e("Start by adding feeds (Add a Feed or Upload RSS Feeds tabs).  Then, if you want, you can add Categories (Settings->Categories tab).  If you add categories, you can then go back and assign each feed to a category.", 'wp-rss-multi-importer');
    ?>
</p>
							<H3 class="info_titles"><?php 
    _e("Decide how you want to present the items from the RSS feeds on your web site", 'wp-rss-multi-importer');
    ?>
</H3>
							<p class="info_text"><?php 
    _e("You can present them on any page using Shortcode, which looks like this - [wp_rss_multi_importer], and display them using one of the several templates provided.  Or, you can have the items from RSS feeds become blog posts, and then let the settings of your Wordpress theme determine how they will look.  Finally, you might simply want the feeds in the side bar - and here a widget would work best.<br><br>You don't have to choose one way or another to present the feeds.  You can do all 3 at the same time.", 'wp-rss-multi-importer');
    ?>
</p>	
		
							<H3 class="info_titles"><?php 
    _e("1. Using the shortcode to display the feed items", 'wp-rss-multi-importer');
    ?>
</H3>
							<p class="info_text"><?php 
    _e("Go to the Shortcode Settings tab and select the template you want to use and set the settings. Add the shortcode to your Wordpress page. Use shortcode parameters (Shortcode->Shortcode Parameters tab) to put more customization onto your feed presentation.  If you put your feeds into categories, you can restrict which shows on a page to whatever categories you want.", 'wp-rss-multi-importer');
    if (!isset($options['active']) || $options['active'] == 0) {
        echo 'This has not been activated.';
    }
    ?>
</p>
							<H3 class="info_titles"><?php 
    _e("2. Create blog posts from the feed items (AutoPost)", 'wp-rss-multi-importer');
    ?>
</H3>
							<p class="info_text"><?php 
    if (!isset($post_options['active']) || $post_options['active'] == 0) {
        echo '<span style="color:red;font-size:14px">This has not been activated.  Go to the AutoPost tab to activate this feature.</span><br>';
    } else {
        echo '<span style="color:green;font-size:14px">The AutoPost has been activated.</span><br>';
    }
    _e("Click on the AutoPost Settings tab and set the options.  Make sure this feature is activated. At the bottom of that page you can assign the plugin categories to your WP blog categories", 'wp-rss-multi-importer');
    ?>
</p>
							<H3 class="info_titles"><?php 
    _e("3. Display the aggregated feed items in a widget", 'wp-rss-multi-importer');
    ?>
</H3>
							<p class="info_text"><?php 
    _e("If your theme supports widgets, go to Appearance->Widgets, add the RSS Multi-Importer widget, configure the options and then click Save.", 'wp-rss-multi-importer');
    ?>
</p>
							
							<H2  ><?php 
    _e("Understanding the menus", 'wp-rss-multi-importer');
    ?>
</H2>
							<p><?php 
    _e("On the left are the menu selections for this plugin:", 'wp-rss-multi-importer');
    ?>
</p>
							<ul>
								<li style="margin:8px;"><?php 
    _e("<b>Feed List</b> - this is your list of RSS feeds.", 'wp-rss-multi-importer');
    ?>
</li>
					
							<li style="margin:8px;"><?php 
    _e("<b>Add a Feed</b> - this is where you add another RSS feed.", 'wp-rss-multi-importer');
    ?>
</li>
							<li style="margin:8px;"><?php 
    _e("<b>Upload RSS Feeds</b> - this is where you add a large number of RSS feeds at the same time.", 'wp-rss-multi-importer');
    ?>
</li>
							<li style="margin:8px;"><?php 
    _e("<b>Categories</b> - this is where you add categories, including add default category images and filters.", 'wp-rss-multi-importer');
    ?>
</li>
								<li style="margin:8px;"><?php 
    _e("<b>Feed Items</b> - this is where you can manage the feed items.", 'wp-rss-multi-importer');
    ?>
</li>
									<li style="margin:8px;"><?php 
    _e("<b>Global Settings</b> - the date format for the shortcode is set here.", 'wp-rss-multi-importer');
    ?>
</li>
							<li style="margin:8px;"><?php 
    _e("<b>AutoPost</b> - this is where you set the settings for the AutoPosts and manage these posts.", 'wp-rss-multi-importer');
    ?>
</li>
							<li style="margin:8px;"><?php 
    _e("<b>Shortcode</b> - this is where you set the settings for the Shortcode, the parameters and saving shortcode tempates.", 'wp-rss-multi-importer');
    ?>
</li>
						
					<li style="margin:8px;"><?php 
    _e("<b>Export Feeds</b> - this is where you can export the aggregated feed you create or export a file of your feeds.", 'wp-rss-multi-importer');
    ?>
</li>
				
						<li style="margin:8px;"><?php 
    _e("<b>Diagnostics</b> - go here first if you are running into any problems.", 'wp-rss-multi-importer');
    ?>
</li>
					
							</ul>
							<hr>
							
						</div>
					</div>
				</div>
				
		
				
					<div class="postbox-container" style="width:25%;min-width:200px;max-width:350px;">
						
						<!--  MarketingProfs
						
			<div id="sidebar" class="MP_box">
					<div >
			<h2 class="MP_title">Cutting Edge Marketing Know-How</h2>
		</div>
		
		
											
												
													<div class="txtorange">Join MarketingProfs.com</div>
														<div class="txtwhite">Over 600,000 have already</div>
													<div class="txtorange">Your Free Membership Includes:</div>
													<ul class="padding_nomargin txtleft" style="margin-left:30px;padding-top:5px;padding-bottom:5px;margin-top:0px;">
														<li style="margin:3px;"><b>FREE</b> access to all marketing articles</li>
														<li style="margin:3px;"><b>FREE</b> community forum use</li>
													</ul>
													<form style="padding-bottom:4px;" onsubmit="validateEmail(document.getElementById('e'));" action="https://www.marketingprofs.com/login/signup.asp" method="POST">
																				<div class="center width_full"><input type="text" onfocus="this.value=''" value="*****@*****.**" style="width:225px;color:#444;" id="e" name="e"></div>
																				<div class="center width_full"><input type="image" style="margin-top:4px;" src="http://www.mpdailyfix.com/wp-content/themes/mpdailyfix/images/signup_blue.gif" id="btnsignup" name="btnsignup"></div>
																				<input type="hidden" value="amwplugin" name="adref">
																				<script type="text/javascript">
																					function validateEmail(emailField){
																							var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
																							if (re.test(emailField.value) == false) 
																							{
																								alert('Oops! That email address doesn\'t look quite right.\n\nPlease make sure it was typed correctly and try again.');
																								return false;
																							}
																							return true;
																					}				
																				</script>
																			</form>
																		<span class="MP_title">	<a class="button-primary" style="text-align:center" href="https://www.marketingprofs.com/login/join?adref=amwplugin" target="_blank">Learn more »</a></span>
																
							
			
			
			
			</div>
			
			
			<?php 
    if (!is_wp_error($feed)) {
        ?>
			
			<h3 style="text-align:center;"><?php 
        print 'Latest ' . $feed->get_title();
        ?>
</h3>
			<ul>
			<?php 
        foreach ($feed->get_items(0, 5) as $item) {
            ?>
			    <li>
			        <a href="<?php 
            print $item->get_permalink();
            ?>
" target="_blank">
			        <?php 
            print $item->get_title();
            ?>
</a>
			    </li>
			<?php 
        }
        ?>
			</ul>
			<?php 
    }
    ?>
			
	-->
			
		<?php 
    if (rssmi_check_didUpgrade() == 1) {
        ?>
	
			<div id="sidebar" class="MP_box">
				<div >
		<h2 class="MP_title">Need Plugin Help?</h2>
	</div>
	<p><a href="http://www.wprssimporter.com/faqs/" target="_blank" style="color:white">Go here to find FAQs.</a></p>
	<p><a href="http://www.wprssimporter.com/faqs/im-told-the-feed-isnt-valid-or-working/" target="_blank" style="color:white">Go here if you have a feed that isn't working</a><p>	
<p><a href="http://www.wprssimporter.com/faqs/the-cron-scheduler-isnt-working-whats-happening/" target="_blank" style="color:white">Go here if the scheduler doesn't appear to be working.</a><p>			
				<h2 class="MP_title">If you like this free plugin...</h2>				
				<p><a href="http://wordpress.org/support/view/plugin-reviews/wp-rss-multi-importer#postform" target="_blank" style="color:white">Consider saying thank you with a good rating.</a></p>
				</div>
				<!--	<hr>
					<h3 class="info_titles" style="text-align:center"><?php 
        _e("DELETE EVERYTHING !!", 'wp-rss-multi-importer');
        ?>
</H3>
					<p ><?php 
        _e("At any time you can delete all entries in the tables created by this plugin by clicking on the button below. Only do this if you want to delete all posts, feed entries, featured images, etc, that resulted from using this plugin. (This will not include custom post types you created with this plugin).  THIS IS IRREVERSIBLE.", 'wp-rss-multi-importer');
        ?>
</p>	
					<div style="margin-left:60px">
						<button  type="button" class="button-delete-red" name="restoreall" id="restore-all" value="" ><?php 
        _e("CLICK TO DELETE ALL ENTRIES NOW", 'wp-rss-multi-importer');
        ?>
</button> </p><div id="restore_note"></div>
						</div>-->
			
			
	<?php 
    } else {
        ?>
		
			
			
			
						<div id="sidebar" class="activate_box">
							<div >
					<h2 class="MP_title">You Need to Upgrade This Plugin Before It Will Work</h2>
				</div>
				<p style="color:white;font-size:16px">You have 2 options:</p>
				<p style="color:white;font-size:14px">1. If you don't have many feeds (less than, say, 100), or are on a server with lots of memory, then you can upgrade by clicking below</p>
				<div style="margin-left:60px">
					<button type="button"  name="upgradefeeds" id="upgrade-feeds" value="" ><?php 
        _e("CLICK TO UPGRADE NOW", 'wp-rss-multi-importer');
        ?>
</button></div> <p style="color:white;font-size:14px">This could take a few minutes, so click once and then be patient!</p><div id="upgradefeeds_note"></div><div id="rssmi-big-ajax-loader"></div>
	
				<p style="color:white;font-size:14px">2. If you have many feeds and are on a server without a lot of memory, then you should upgrade by clicking below to export a text file of your feeds, then going to the Upload Feeds tab and simply copy and pasting the contents of the text file into the text box and clicking Submit. 
					<div style="margin-left:90px">
					<form method="post">
					  <p class="submit">

					      <input type="submit" name="rssmi_export" value="<?php 
        _e('Export Your Feeds', 'wp-rss-multi-importer');
        ?>
"  class="button" />
					  </p>
					</form>
					</div>
					</p>		
											
							</div>
							
							
			<?php 
    }
    ?>
			
			
			
			
			
			
			
			
			
			
		</div>
				
				</div>
	
	
	<?php 
}
コード例 #3
0
ファイル: upgrade.php プロジェクト: scottnkerr/eeco
function rssmi_admin_warnings()
{
    if (current_user_can('activate_plugins')) {
        if (rssmi_check_didUpgrade() == 0) {
            //restrict this to the plugin pages!!!
            //	if ((isset( $_GET['post_type'] )) && (strpos("rssmi_feed",$_GET['post_type'] ,0)!==false) || ( isset( $_GET['page'] )) && ((strpos("wprssmi",$_GET['page'] ,0)!==false) || (strpos('wprssmi',$_GET['page'] )!==false ) || (strpos('wprssmi_options',$_GET['page'] )!==false ) || (strpos('wprssmi_options2',$_GET['page'] )!==false ) || (strpos('wprssmi_options3',$_GET['page'] )!==false ) || (strpos('wprssmi_options4',$_GET['page'] )!==false ) || (strpos('wprssmi_options9',$_GET['page'] )!==false )  || (strpos('wprssmi_options5',$_GET['page'] )!==false ) || (strpos('wprssmi_options8',$_GET['page'] )!==false )|| (strpos('wprssmi_options7',$_GET['page'] )!==false ))) {
            if (rssmi_is_plugin_page() == 1) {
                ?>
				<div id="upgrade_message" class="error">
					<p><?php 
                echo sprintf(__('Thank you for upgrading to the new version of Multi-Importer.  <br>To activate the new features you need to upgrade the database for the plugin.  <br>No problem.  Just go to the <a href="%s">Start Here page</a> and follow the simple directions. Sorry for the extra step! '), 'admin.php?page=wprssmi');
                ?>
</p>
				</div>
			<?php 
            }
        }
    }
}
コード例 #4
0
ファイル: admin_init.php プロジェクト: scottnkerr/eeco
/**
 * Setup all settings pages
 * TODO: Delete commented out pages here if not used
 * TODO: Update the menu icon to fit the new admin theme
 */
function wp_rss_multi_importer_menu()
{
    $menuColor = rssmi_check_didUpgrade() == 1 ? "#2ea2cc" : "#F00";
    $parent_slug = 'wprssmi';
    // Main menu page
    add_menu_page(__('Overview'), __('Multi Importer'), 'manage_options', $parent_slug, 'wp_rss_multi_importer_intro_page', WP_RSS_MULTI_IMAGES . "RSSadmin16.png", '150');
    // All submenu options pages
    add_submenu_page($parent_slug, 'Start Here', '<span style="color:' . $menuColor . '">' . 'Start Here' . '</span>', 'manage_options', $parent_slug, 'wp_rss_multi_importer_intro_page', '', '');
    add_submenu_page($parent_slug, 'Feed List', 'Feed List', 'manage_options', 'edit.php?post_type=rssmi_feed', '');
    add_submenu_page($parent_slug, 'Add a Feed', 'Add a Feed', 'edit_posts', 'post-new.php?post_type=rssmi_feed', '');
    add_submenu_page($parent_slug, 'Upload Feeds', 'Upload Feeds', 'manage_options', 'wprssmi_options8', 'wp_rss_multi_importer_upload_page');
    add_submenu_page($parent_slug, 'Categories', 'Categories', 'manage_options', 'wprssmi_options', 'rssmi_category_pages', '');
    add_submenu_page($parent_slug, 'Feed Items', 'Feed Items', 'edit_posts', 'edit.php?post_type=rssmi_feed_item', '');
    add_submenu_page($parent_slug, 'Global Settings', 'Global Settings', 'manage_options', 'wprssmi_options5', 'wp_rss_multi_importer_dateformat_page');
    add_submenu_page($parent_slug, 'AutoPost', 'AutoPost', 'manage_options', 'wprssmi_options3', 'wp_rss_multi_importer_display_autopost');
    add_submenu_page($parent_slug, 'Shortcode', 'Shortcode', 'manage_options', 'wprssmi_options2', 'wp_rss_multi_importer_display_shortcode');
    add_submenu_page($parent_slug, 'Export', 'Export Feeds', 'manage_options', 'wprssmi_options7', 'wp_rss_multi_importer_feed_page');
    add_submenu_page($parent_slug, 'Diagnostics', 'Diagnostics', 'manage_options', 'wprssmi_options9', 'wp_rss_multi_importer_diagnostics');
    // All submenu Feed Items pages
    //	add_submenu_page( 'wprssmi', 'Settings', '<span style="color:#2ea2cc">'.'Settings'.'</span>', 'manage_options', 'wprssmi_options2', 'wp_rss_multi_importer_display' );
    //	add_submenu_page( 'wprssmi', 'Shortcode Parameters', 'Shortcode Parameters', 'manage_options', 'wprssmi_options6', 'wp_rss_multi_importer_style_tags' );
    //	add_submenu_page( 'wprssmi', 'Shortcode Settings', 'Shortcode Settings', 'manage_options', 'wprssmi_options2', 'wp_rss_multi_importer_options_page' );
    //	add_submenu_page( 'wprssmi', 'Manage AutoPosts', 'Manage AutoPosts', 'manage_options', 'wprssmi_options4', 'rssmi_posts_list' );
    //	add_submenu_page('wprssmi', 'Start Here','<span style="color:#2ea2cc">'.'Start Here'.'</span>', 'manage_options', 'wprssmi', 'wp_rss_multi_importer_intro_page', '', '');
}