function wp_rss_multi_importer_options_page() { delete_db_transients(); ?> <div id="icon-themes" class="icon32 icon32-posts-rssmi_feed"></div> <?php settings_errors(); ?> <div class="wrap"> <h2><?php _e("Shortcode Settings", 'wp-rss-multi-importer'); ?> </h2> <div id="poststuff"> <?php screen_icon(); //do_settings_sections( 'wprssimport' ); ?> <div id="options"> <form action="options.php" method="post" > <?php $siteurl = get_site_url(); $images_url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/images'; settings_fields('wp_rss_multi_importer_item_options'); $options = get_option('rss_import_options'); ?> <div class="postbox"><h3><label for="title"><?php _e("Options Settings for Displaying the Shortcode Feed Items", 'wp-rss-multi-importer'); ?> </label></h3> <p style="margin-left:20px">These are settings for the option to display the feed items on your site using shortcode. If you want the settings for the AutoPost option, use that tab instead.</p> <div class="inside"> <h3><?php _e("Template", 'wp-rss-multi-importer'); ?> </h3> <?php $thistemplate = $options['template']; get_template_function($thistemplate); ?> <?php if ($options['maxperPage'] == '' || $options['maxperPage'] == 'NULL') { ?> <H2 class="save_warning"><?php _e("You must choose and then click Save Settings for the plugin to function correctly. If not sure which options to choose right now, don't worry - the most common settings have been set for you - just click Save Settings.", 'wp-rss-multi-importer'); ?> </H2> <?php } ?> <h3><?php _e("Sorting and Separating Posts", 'wp-rss-multi-importer'); ?> </h3> <p><label class='o_textinput' for='sortbydate'><?php _e("Sort Output by Date (Descending = Closest Date First <span class='vtip' title='Choose whether and how the items will be sorted by date.'>?</span>", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[sortbydate]"> <OPTION VALUE="1" <?php if ($options['sortbydate'] == 1) { echo 'selected'; } ?> ><?php _e("Ascending", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="0" <?php if ($options['sortbydate'] == 0) { echo 'selected'; } ?> ><?php _e("Descending", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="2" <?php if ($options['sortbydate'] == 2) { echo 'selected'; } ?> ><?php _e("No Sorting", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT></p> <p><label class='o_textinput' for='todaybefore'><?php _e("Separate Today and Earlier Posts", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[todaybefore]"> <OPTION VALUE="1" <?php if ($options['todaybefore'] == 1) { echo 'selected'; } ?> ><?php _e("Yes", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="0" <?php if ($options['todaybefore'] == 0) { echo 'selected'; } ?> ><?php _e("No", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT></p> <h3><?php _e("Number of Posts, Pagination and Load More", 'wp-rss-multi-importer'); ?> </h3> <p><label class='o_textinput' for='maxfeed'><?php _e("Number of Posts per Feed<span class='vtip' title='Bring in this number of the latest posts from each feed.'>?</span>", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[maxfeed]"> <OPTION VALUE="1" <?php if ($options['maxfeed'] == 1) { echo 'selected'; } ?> >1</OPTION> <OPTION VALUE="2" <?php if ($options['maxfeed'] == 2) { echo 'selected'; } ?> >2</OPTION> <OPTION VALUE="3" <?php if ($options['maxfeed'] == 3) { echo 'selected'; } ?> >3</OPTION> <OPTION VALUE="4" <?php if ($options['maxfeed'] == 4) { echo 'selected'; } ?> >4</OPTION> <OPTION VALUE="5" <?php if ($options['maxfeed'] == 5) { echo 'selected'; } ?> >5</OPTION> <OPTION VALUE="10" <?php if ($options['maxfeed'] == 10) { echo 'selected'; } ?> >10</OPTION> <OPTION VALUE="15" <?php if ($options['maxfeed'] == 15) { echo 'selected'; } ?> >15</OPTION> <OPTION VALUE="20" <?php if ($options['maxfeed'] == 20) { echo 'selected'; } ?> >20</OPTION> <OPTION VALUE="30" <?php if ($options['maxfeed'] == 30) { echo 'selected'; } ?> >30</OPTION> <OPTION VALUE="40" <?php if ($options['maxfeed'] == 40) { echo 'selected'; } ?> >40</OPTION> <OPTION VALUE="50" <?php if ($options['maxfeed'] == 50) { echo 'selected'; } ?> >50</OPTION> <OPTION VALUE="60" <?php if ($options['maxfeed'] == 60) { echo 'selected'; } ?> >60</OPTION> <OPTION VALUE="70" <?php if ($options['maxfeed'] == 70) { echo 'selected'; } ?> >70</OPTION> <OPTION VALUE="80" <?php if ($options['maxfeed'] == 80) { echo 'selected'; } ?> >80</OPTION> </SELECT></p> <span id="posts_per_pag_options" <?php if ($options['pag'] == 1 || $options['pag'] == 2 || $options['pag'] == 3) { echo 'style="display:none"'; } ?> > <p><label class='o_textinput' for='maxperPage'><?php _e("Number of Posts Shown per Page of Output (<a href=\"http://www.wprssimporter.com/faqs/how-does-the-number-of-entries-per-feed-and-page-or-fetch-work//\" target=\"_blank\">GO HERE TO SEE HOW TO SET THIS OPTION</a>)", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[maxperPage]"> <OPTION VALUE="5" <?php if ($options['maxperPage'] == 5) { echo 'selected'; } ?> >5</OPTION> <OPTION VALUE="10" <?php if ($options['maxperPage'] == 10) { echo 'selected'; } ?> >10</OPTION> <OPTION VALUE="20" <?php if ($options['maxperPage'] == 20) { echo 'selected'; } ?> >20</OPTION> <OPTION VALUE="30" <?php if ($options['maxperPage'] == 30) { echo 'selected'; } ?> >30</OPTION> <OPTION VALUE="40" <?php if ($options['maxperPage'] == 40) { echo 'selected'; } ?> >40</OPTION> <OPTION VALUE="50" <?php if ($options['maxperPage'] == 50) { echo 'selected'; } ?> >50</OPTION> <OPTION VALUE="100" <?php if ($options['maxperPage'] == 100) { echo 'selected'; } ?> >100</OPTION> </SELECT></p> </span> <p><label class='o_textinput' for='pag'><?php _e("Do you want to use Pagination or Load More to show the results?", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[pag]" id="pagination"> <OPTION VALUE="0" <?php if ($options['pag'] == 0) { echo 'selected'; } ?> ><?php _e("None", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="1" <?php if ($options['pag'] == 1) { echo 'selected'; } ?> ><?php _e("Pagination", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="2" <?php if ($options['pag'] == 2) { echo 'selected'; } ?> ><?php _e("Load More with Click", 'wp-rss-multi-importer'); ?> </OPTION> <!-- <OPTION VALUE="3" <?php if ($options['pag'] == 3) { echo 'selected'; } ?> ><?php _e("Load More with Scroll", 'wp-rss-multi-importer'); ?> </OPTION>--> </SELECT> </p> <span id="pag_options" <?php if ($options['pag'] == 0) { echo 'style="display:none"'; } ?> > <p style="padding-left:15px"><label class='o_textinput' for='perPage'><?php _e("Number of Posts per Page for Pagination or per click on Load More", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[perPage]"> <OPTION VALUE="3" <?php if ($options['perPage'] == 3) { echo 'selected'; } ?> >3</OPTION> <OPTION VALUE="6" <?php if ($options['perPage'] == 6) { echo 'selected'; } ?> >6</OPTION> <OPTION VALUE="12" <?php if ($options['perPage'] == 12) { echo 'selected'; } ?> >12</OPTION> <OPTION VALUE="15" <?php if ($options['perPage'] == 15) { echo 'selected'; } ?> >15</OPTION> <OPTION VALUE="20" <?php if ($options['perPage'] == 20) { echo 'selected'; } ?> >20</OPTION> <OPTION VALUE="25" <?php if ($options['perPage'] == 25) { echo 'selected'; } ?> >25</OPTION> <OPTION VALUE="30" <?php if ($options['perPage'] == 30) { echo 'selected'; } ?> >30</OPTION> </SELECT></p> </span> <h3><?php _e("How Links Open and No Follow Option", 'wp-rss-multi-importer'); ?> </h3> <p><label class='o_textinput' for='targetWindow'><?php _e("Target Window (when link clicked, where should it open?)", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[targetWindow]" id="targetWindow"> <OPTION VALUE="0" <?php if ($options['targetWindow'] == 0) { echo 'selected'; } ?> ><?php _e("Use LightBox", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="1" <?php if ($options['targetWindow'] == 1) { echo 'selected'; } ?> ><?php _e("Open in Same Window", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="2" <?php if ($options['targetWindow'] == 2) { echo 'selected'; } ?> ><?php _e("Open in New Window", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT> </p> <p style="padding-left:15px"><label class='o_textinput' for='noFollow'>Set links as No Follow. <input type="checkbox" Name="rss_import_options[noFollow]" Value="1" <?php if ($options['noFollow'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <h3><?php _e("What Shows - Attribution", 'wp-rss-multi-importer'); ?> </h3> <p><label class='o_textinput' for='sourcename'><?php _e("Feed Source Attribution Label", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[sourcename]"> <OPTION VALUE="Source:" <?php if ($options['sourcename'] == 'Source') { echo 'selected'; } ?> ><?php _e("Source", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="Via:" <?php if ($options['sourcename'] == 'Via') { echo 'selected'; } ?> ><?php _e("Via", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="Club:" <?php if ($options['sourcename'] == 'Club') { echo 'selected'; } ?> ><?php _e("Club", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="Sponsor:" <?php if ($options['sourcename'] == 'Sponsor') { echo 'selected'; } ?> ><?php _e("Sponsor", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="" <?php if ($options['sourcename'] == '') { echo 'selected'; } ?> ><?php _e("No Attribution", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT></p> <p ><label class='o_textinput' for='addAuthor'><?php _e("Show Feed or Author Name (if available)", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[addAuthor]" Value="1" <?php if (isset($options['addAuthor']) && $options['addAuthor'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <h3><?php _e("What Shows - EXCERPTS", 'wp-rss-multi-importer'); ?> </h3> <p><label class='o_textinput' for='showdesc'><?php _e("<b>Show Excerpt</b>", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[showdesc]" id="showdesc"> <OPTION VALUE="1" <?php if ($options['showdesc'] == 1) { echo 'selected'; } ?> ><?php _e("Yes", 'wp-rss-multi-importer'); ?> </OPTION> <OPTION VALUE="0" <?php if ($options['showdesc'] == 0) { echo 'selected'; } ?> ><?php _e("No", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT></p> <p style="padding-left:15px"><label class='o_textinput' for='showcategory'><?php _e("Show Category Name", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[showcategory]" Value="1" <?php if (isset($options['showcategory']) && $options['showcategory'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <span id="secret" <?php if ($options['showdesc'] == 0) { echo 'style="display:none"'; } ?> > <p style="padding-left:15px"><label class='o_textinput' for='stripSome'><?php _e("Keep limited html in the excerpt (<a>,<br>,<p>) ", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[stripSome]" Value="1" <?php if (isset($options['stripSome']) && $options['stripSome'] == 1) { echo 'checked="checked"'; } ?> ></label> </p> <p style="padding-left:15px"><label class='o_textinput' for='showmore'><?php _e("Let your readers determine if they want to see the excerpt with a show-hide option. ", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[showmore]" Value="1" <?php if (isset($options['showmore']) && $options['showmore'] == 1) { echo 'checked="checked"'; } ?> ></label> </p> <p style="padding-left:15px"><label class='o_textinput' for='descnum'><?php _e("Excerpt length (number of words)", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[descnum]" id="descnum"> <OPTION VALUE="0" <?php if ($options['descnum'] == 0) { echo 'selected'; } ?> >0</OPTION> <OPTION VALUE="20" <?php if ($options['descnum'] == 20) { echo 'selected'; } ?> >20</OPTION> <OPTION VALUE="30" <?php if ($options['descnum'] == 30) { echo 'selected'; } ?> >30</OPTION> <OPTION VALUE="50" <?php if ($options['descnum'] == 50) { echo 'selected'; } ?> >50</OPTION> <OPTION VALUE="75" <?php if ($options['descnum'] == 75) { echo 'selected'; } ?> >75</OPTION> <OPTION VALUE="100" <?php if ($options['descnum'] == 100) { echo 'selected'; } ?> >100</OPTION> <OPTION VALUE="200" <?php if ($options['descnum'] == 200) { echo 'selected'; } ?> >200</OPTION> <OPTION VALUE="300" <?php if ($options['descnum'] == 300) { echo 'selected'; } ?> >300</OPTION> <OPTION VALUE="400" <?php if ($options['descnum'] == 400) { echo 'selected'; } ?> >400</OPTION> <OPTION VALUE="500" <?php if ($options['descnum'] == 500) { echo 'selected'; } ?> >500</OPTION> <OPTION VALUE="1000" <?php if ($options['descnum'] == 1000) { echo 'selected'; } ?> >1000</OPTION> <OPTION VALUE="99" <?php if ($options['descnum'] == 99) { echo 'selected'; } ?> ><?php _e("Give me everything", 'wp-rss-multi-importer'); ?> </OPTION> </SELECT><?php _e(" Note: Choosing Give me everything will just be a pure extract of the content without any image processsing, etc.", 'wp-rss-multi-importer'); ?> </p> <h3><?php _e("Image Handling", 'wp-rss-multi-importer'); ?> </h3> <?php if (ini_get('allow_url_fopen') == 0) { echo 'You server is not configured to accept images from outside sources. Please contact your web host to set allow_url_fopen to ON. You might be able to do this for yourself if your host gives you a way to edit the php.ini file.'; } ?> <p><?php _e("An attempt will be made to select an image for your post. Usually this is the first image in the content or in a feed enclosure, but you have the option - if those are not available - to get the first image in the content.", 'wp-rss-multi-importer'); ?> <p><label class='o_textinput' for='stripAll'><?php _e("Check to get rid of all images in the excerpt.", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[stripAll]" Value="1" <?php if (isset($options['stripAll']) && $options['stripAll'] == 1) { echo 'checked="checked"'; } ?> ></label> </p> <p><?php _e("You can adjust the image, if it exists. The default image size is 150px width, but you can override this using the shortcode. Note: If the image in the RSS feed is small, this may result in rendering a fuzzy image.", 'wp-rss-multi-importer'); ?> </p> <p style="padding-left:15px"><label class='o_textinput' for='adjustImageSize'><?php _e("If you want excerpt images, check to fix their width at 150 (can be over-written in shortcode).", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[adjustImageSize]" Value="1" <?php if ($options['adjustImageSize'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <p style="padding-left:15px"><label class='o_textinput' for='floatType'><?php _e("Float images to the left (can be over-written in shortcode).", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[floatType]" Value="1" <?php if ($options['floatType'] == 1) { echo 'checked="checked"'; } ?> ></label></p> </span> <p style="padding-left:15px"><label class='o_textinput' for='RSSdefaultImage'><?php _e("Default category image setting", 'wp-rss-multi-importer'); ?> </label> <SELECT NAME="rss_import_options[RSSdefaultImage]" id="RSSdefaultImage"> <OPTION VALUE="0" <?php if ($options['RSSdefaultImage'] == 0) { echo 'selected'; } ?> >Process normally</OPTION> <OPTION VALUE="1" <?php if ($options['RSSdefaultImage'] == 1) { echo 'selected'; } ?> >Use default image for category</OPTION> <OPTION VALUE="2" <?php if ($options['RSSdefaultImage'] == 2) { echo 'selected'; } ?> >Replace articles with no image with default category image</OPTION> </SELECT></p> <h3><?php _e("Get Social", 'wp-rss-multi-importer'); ?> </h3> <p ><label class='o_textinput' for='showsocial'><?php _e("Add social icons (Twitter, Facebook, and Google+) to each post. ", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[showsocial]" Value="1" <?php if ($options['showsocial'] == 1) { echo 'checked="checked"'; } ?> ></label> </p> <h3><?php _e("Warning and Conflict Handling", 'wp-rss-multi-importer'); ?> </h3> <p ><label class='o_textinput' for='cb'><?php _e("Check if you are having colorbox conflict problems.", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[cb]" Value="1" <?php if (isset($options['cb']) && $options['cb'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <p ><label class='o_textinput' for='warnmsg'><?php _e("If you want to suppress warning messages, do this on the Global Settings Page.", 'wp-rss-multi-importer'); ?> </label></p> <p ><label class='o_textinput' for='directFetch'><?php _e("Check if you are having simplepie conflict problems.", 'wp-rss-multi-importer'); ?> <input type="checkbox" Name="rss_import_options[directFetch]" Value="1" <?php if (isset($options['directFetch']) && $options['directFetch'] == 1) { echo 'checked="checked"'; } ?> ></label></p> <input size='10' name='rss_import_options[plugin_version]' type='hidden' value='<?php echo WP_RSS_MULTI_VERSION; ?> ' /> </div></div> <p class="submit"><input type="submit" value="Save Settings" name="submit" class="button-primary"></p> <!-- <div style="margin-bottom:20px"> <button type="button" name="getFeedsNow" id="getFeeds-Now" value=""><?php _e("CLICK TO FETCH FEED ITEMS NOW", 'wp-rss-multi-importer'); ?> </button> <div id="gfnote"></div> --> <?php echo rssmi_show_last_feed_update(); ?> <!--</div>--> <br> </form> <div class="postbox"></div> </div> </div> </div> <?php }
function wp_rss_multi_importer_items_page() { delete_db_transients(); ?> <div class="wrap"> <h2>RSS Feeds Admin</h2> <div id="poststuff"> <?php screen_icon(); do_settings_sections('wprssimport'); ?> <div id="options"> <form action="options.php" method="post" > <?php $removeurl = WP_RSS_MULTI_IMAGES . "remove.png"; settings_fields('wp_rss_multi_importer_options'); $options = get_option('rss_import_items'); $catOptions_exist = get_option('rss_import_categories'); //this included for backward compatibility if (!empty($options)) { $cat_array = preg_grep("^feed_cat_^", array_keys($options)); if (count($cat_array) == 0) { //echo "category was not found\n"; $catExists = 0; $modnumber = 2; } else { $catExists = 1; $modnumber = 3; } } if (!empty($options)) { $size = count($options); for ($i = 1; $i <= $size; $i++) { //if( $i % $modnumber == 0 ) continue; $key = key($options); if (!strpos($key, '_') > 0) { continue; } //this makes sure only feeds are included here...everything else are options $j = wprss_get_id_number($key); echo "<div class='wprss-input' id='{$j}'>"; echo "<p><label class='textinput' for='{$key}'>" . wprssmi_convert_key($key) . "</label>\n\n <input class='wprss-input' size='75' name='rss_import_items[{$key}]' type='text' value='{$options[$key]}' /> <a href='javascript:void(0)' class='btnDelete' id='{$j}'><img src='{$removeurl}'/></a></p>"; next($options); $key = key($options); $url_esc = esc_url($options[$key]); echo "<p><label class='textinput' for='{$key}'>" . wprssmi_convert_key($key) . "</label>\n\n <input id='{$j}' class='wprss-input' size='75' name='rss_import_items[{$key}]' type='text' value='{$url_esc}' />"; if (empty($catOptions_exist)) { echo " <input id='{$j}' class='wprss-input' size='10' name='rss_import_items[feed_cat_{$j}]' type='hidden' value='0' />"; } if ($catExists == 1) { next($options); $key = key($options); $selectName = "rss_import_items[feed_cat_{$j}]"; } else { $selectName = "rss_import_items[feed_cat_{$j}]"; } $catOptions = get_option('rss_import_categories'); if (!empty($catOptions)) { echo "<span class=category_list>Category "; echo "<SELECT NAME=" . $selectName . " id='feed_cat'>"; echo "<OPTION VALUE='0'>NONE</OPTION>"; $catsize = count($catOptions); //echo $options[$key]; for ($k = 1; $k <= $catsize; $k++) { if ($k % 2 == 0) { continue; } $catkey = key($catOptions); $nameValue = $catOptions[$catkey]; next($catOptions); $catkey = key($catOptions); $IDValue = $catOptions[$catkey]; if ($options[$key] == $IDValue) { $sel = 'selected '; } else { $sel = ''; } echo "<OPTION " . $sel . "VALUE=" . $IDValue . ">" . $nameValue . "</OPTION>"; next($catOptions); } echo "</SELECT></span>"; } //echo check_feed($url_esc); // needs style echo " </p>"; next($options); echo "</div>"; } } ?> <div id="buttons"><a href="javascript:void(0)" id="add" class="addbutton"><img src="<?php echo WP_RSS_MULTI_IMAGES; ?> add.png"></a> <p class="submit"><input type="submit" value="Save Settings" name="submit" class="button-primary"></p> </form> <div class="postbox"><h3><label for="title"> <?php _e("Help Others", 'wp-rss-multi-importer'); ?> </label></h3><div class="inside"><?php _e("If you find this plugin helpful, let others know by <a href=\"http://wordpress.org/extend/plugins/wp-rss-multi-importer/\" target=\"_blank\">rating it here</a>. That way, it will help others determine whether or not they should try out the plugin. Thank you.", 'wp-rss-multi-importer'); ?> </div></div> </div> </div> </div> <?php }