| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Super RSS Reader |
| 4 |
Plugin URI: http://www.aakashweb.com |
| 5 |
Description: A Flash RSS Reader for advanced and stylish publishing of RSS feeds fastly and easily with easy Setup. <a href="options-general.php?page=super-rss-reader/super-rss-reader.php">Click here</a> to go the setup page . |
| 6 |
Author: Aakash Chakravarthy |
| 7 |
Version: 0.8 |
| 8 |
Author URI: http://www.aakashweb.com/ |
| 9 |
*/ |
| 10 |
/* Copyright 2009 Aakash Chakravarthy (email : aakash.19493@gmail.com) (website : www.aakashweb.com) |
| 11 |
|
| 12 |
This program is free software; you can redistribute it and/or modify |
| 13 |
it under the terms of the GNU General Public License as published by |
| 14 |
the Free Software Foundation; either version 2 of the License, or |
| 15 |
(at your option) any later version. |
| 16 |
|
| 17 |
This program is distributed in the hope that it will be useful, |
| 18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
GNU General Public License for more details. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License |
| 23 |
along with this program; if not, write to the Free Software |
| 24 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 25 |
*/ |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 30 |
function getPluginPath_srr() { |
| 31 |
$path = strstr(realpath(dirname(__file__)), 'wp-content'); |
| 32 |
$path = str_replace('\\', '/', $path); |
| 33 |
return( get_bloginfo('url') . '/' . $path); |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
function super_rss_reader_admin_page(){ |
| 38 |
|
| 39 |
// No options? No problem! We set them here. |
| 40 |
|
| 41 |
if ($_POST['super_rss_reader_submit']) { |
| 42 |
|
| 43 |
$options['srrBgcolor'] = $_POST['srr_bgcolor']; |
| 44 |
$options['srrWidth'] = $_POST['srr_width']; |
| 45 |
$options['srrHeight'] = $_POST['srr_height']; |
| 46 |
$options['srrWmode'] = $_POST['srr_wmode']; |
| 47 |
|
| 48 |
$options['srrRssUrl'] = $_POST['srr_rssUrl']; |
| 49 |
|
| 50 |
$options['srrShowTitleAndDescription'] = $_POST['srr_showTitleAndDescription']; |
| 51 |
$options['srrTitleBgColor'] = $_POST['srr_titleBgColor']; |
| 52 |
$options['srrDescriptionBgColor'] = $_POST['srr_descriptionBgColor']; |
| 53 |
$options['srrFooterBgColor'] = $_POST['srr_footerBgColor']; |
| 54 |
$options['srrTitleColor'] = $_POST['srr_titleColor']; |
| 55 |
$options['srrDescColor'] = $_POST['srr_descColor']; |
| 56 |
$options['srrTitleBarAlpha'] = $_POST['srr_titleBarAlpha']; |
| 57 |
$options['srrTitleAndDescriptionBg'] = $_POST['srr_titleAndDescriptionBg']; |
| 58 |
$options['srrStrechTitleImage'] = $_POST['srr_strechTitleImage']; |
| 59 |
$options['srrBorderType'] = $_POST['srr_borderType']; |
| 60 |
$options['srrShineType'] = $_POST['srr_shineType']; |
| 61 |
|
| 62 |
$options['srrBackgroundImage'] = $_POST['srr_backgroundImage']; |
| 63 |
$options['srrStrechBackgroundImage'] = $_POST['srr_strechBackgroundImage']; |
| 64 |
$options['srrDisplayDate'] = $_POST['srr_displayDate']; |
| 65 |
$options['srrDisplayDescription'] = $_POST['srr_displayDescription']; |
| 66 |
$options['srrShowLogo'] = $_POST['srr_showLogo']; |
| 67 |
|
| 68 |
$options['srrTab1Name'] = $_POST['srr_tab1Name']; |
| 69 |
$options['srrTab2Name'] = $_POST['srr_tab2Name']; |
| 70 |
$options['srrTab3Name'] = $_POST['srr_tab3Name']; |
| 71 |
$options['srrTab4Name'] = $_POST['srr_tab4Name']; |
| 72 |
$options['srrTab5Name'] = $_POST['srr_tab5Name']; |
| 73 |
|
| 74 |
$options['srrTab1Url'] = $_POST['srr_tab1Url']; |
| 75 |
$options['srrTab2Url'] = $_POST['srr_tab2Url']; |
| 76 |
$options['srrTab3Url'] = $_POST['srr_tab3Url']; |
| 77 |
$options['srrTab4Url'] = $_POST['srr_tab4Url']; |
| 78 |
$options['srrTab5Url'] = $_POST['srr_tab5Url']; |
| 79 |
|
| 80 |
$options['srrTabScroll'] = $_POST['srr_tabScroll']; |
| 81 |
|
| 82 |
$options['srrShowUrlBox'] = $_POST['srr_showUrlBox']; |
| 83 |
$options['srrShowSubscribeMenu'] = $_POST['srr_showSubscribeMenu']; |
| 84 |
$options['srrScrollbarDraggerColor'] = $_POST['srr_scrollbarDraggerColor']; |
| 85 |
$options['srrScrollbarBarColor'] = $_POST['srr_scrollbarBarColor']; |
| 86 |
|
| 87 |
// And we also update the options in the Wordpress Database |
| 88 |
update_option("super_rss_reader", $options); |
| 89 |
} |
| 90 |
|
| 91 |
$options = get_option('super_rss_reader'); |
| 92 |
|
| 93 |
?> |
| 94 |
|
| 95 |
<div style="float:right; margin-top:20px; border-left:#666666; border-left-style:solid; border-left-width:1px; padding:10px; border-bottom-color:#666666; border-bottom-style:solid; border-bottom-width:1px; margin-right:-60px"> |
| 96 |
<h3>Widget Support</h3> |
| 97 |
<ul> |
| 98 |
<li><a href="http://forums.aakashweb.com/forum/super-rss-reader" target="_blank">Widget Support Forum</a></li> |
| 99 |
<li><a href="http://www.aakashweb.com/" target="_blank">Author Website</a></li> |
| 100 |
<li><a href="http://www.aakashweb.com/wordpress-plugins/super-rss-reader/index.php" target="_blank">Plugin home page</a></li> |
| 101 |
<li><a href="http://wordpress.org/extend/plugins/html-javascript-adder/" target="_blank">See Updates</a></li> |
| 102 |
<li><a href="http://forums.aakashweb.com/forum/html-javascript-adder" target="_blank">Report Bugs</a></li> |
| 103 |
<li><a href="mailto:aakash.19493@gmail.com" target="_blank">Email the Author </a></li> |
| 104 |
</ul> |
| 105 |
<h3>Donate</h3> |
| 106 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Super RSS Reader an Flash based Wordpress Plugin to develop more advanced versions&amount=&currency_code=USD" target="_blank"><img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG_global.gif" alt="Donate Super RSS Reader to develop more advanced versions and serve you" border="0" align="absmiddle"></a> |
| 107 |
<br /> |
| 108 |
<br /> |
| 109 |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Super RSS Reader Wordpress Plugin to develop more advanced versions&amount=&currency_code=USD" title="Donate Super RSS Reader Wordpress Plugin to develop more advanced versions" target="_blank">Support this Plugin !</a> |
| 110 |
<h3>Aakash Web</h3> |
| 111 |
<ul> |
| 112 |
<li><a href="http://www.aakashweb.com/tools/" target="_blank">Free Flash Gadgets</a></li> |
| 113 |
<li><a href="http://www.aakashweb.com/flash-generators/" target="_blank">Flash Generators</a></li> |
| 114 |
<li><a href="http://www.aakashweb.com/wordpress-plugins/" target="_blank">Wordpress Plugins</a></li> |
| 115 |
<li><a href="http://www.aakashweb.com/super-rss-reader/" target="_blank">Flash RSS Reader</a></li> |
| 116 |
<li><a href="http://www.aakashweb.com/flv-player/" target="_blank">FLV Player</a></li> |
| 117 |
<li><a href="http://www.aakashweb.com/xml-slideshow/" target="_blank">XML Image Slideshow </a></li> |
| 118 |
<li><a href="http://blog.aakashweb.com/" target="_blank">Blog</a></li> |
| 119 |
<li><a href="http://forums.aakashweb.com/" target="_blank">Support Forum</a></li> |
| 120 |
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Aakash Web and Support it's Useful Products &amount=¤cy_code=USD" target="_blank">Support Aakash Web</a></li> |
| 121 |
</ul> |
| 122 |
</div> |
| 123 |
|
| 124 |
<div class="wrap"> |
| 125 |
<form method="POST"> |
| 126 |
<div class="icon32" id="icon-options-general"><br/></div> |
| 127 |
<h2><?php _e('Super RSS Reader'); ?></h2> |
| 128 |
<div style="padding:5px"> |
| 129 |
<p> |
| 130 |
Welcome to Super RSS Reader Setup Page. Just change the settings of the RSS Reader and click "Save Settings". Your options will be saved. After changing go to the Widget settings page and add the Super RSS Reader to the sidebar. That's all. Don't leave any field blank here except the tabs settings field. For any support <a href="http://forums.aakashweb.com/" target="_blank">click here</a> or use the links in sidebar . </p> |
| 131 |
<p>Change the rss-css.css stylesheet file present in the super-rss-reader plugins directory to change the font, font size etc. </p> |
| 132 |
</div> |
| 133 |
<table width="590" height="121" border="0" cellpadding="0" cellspacing="0"> |
| 134 |
<tr> |
| 135 |
<td width="224" height="33"><span style="line-height: 30px;"><strong>Basic Settings </strong></span></td> |
| 136 |
<td width="326" height="40"> </td> |
| 137 |
</tr> |
| 138 |
<tr> |
| 139 |
<td height="22"><label for="srr_bgcolor">BG Color</label></td> |
| 140 |
<td height="40"><input name="srr_bgcolor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000'} widefat" id="srr_bgcolor" value="<?php echo $options['srrBgcolor']; ?>" /></td> |
| 141 |
</tr> |
| 142 |
<tr> |
| 143 |
<td height="22"><label for="srr_width">Width</label></td> |
| 144 |
<td height="40"><input name="srr_width" type="text" style="width:200px;" class="widefat" id="srr_width" value="<?php echo $options['srrWidth']; ?>"> |
| 145 |
px<small> |
| 146 |
eg : 500 </small></td> |
| 147 |
</tr> |
| 148 |
<tr> |
| 149 |
<td height="22"><label for="srr_height">Height</label></td> |
| 150 |
<td height="40"><input name="srr_height" type="text" style="width:200px;" class="widefat" id="srr_height" value="<?php echo $options['srrHeight']; ?>"> |
| 151 |
px |
| 152 |
<small>eg : 400 </small> </td> |
| 153 |
</tr> |
| 154 |
<tr> |
| 155 |
<td height="22"><label for="srr_wmode">Window Mode</label></td> |
| 156 |
<td height="40"><select class="widefat" name="srr_wmode" id="srr_wmode" style="width:200px;"> |
| 157 |
<option <?php if ($options['srrWmode'] == "transparent"){ echo 'selected="selected"' ;} ?> value="transparent">transparent</option> |
| 158 |
<option <?php if ($options['srrWmode'] == "opaque"){ echo 'selected="selected"' ;} ?> value="opaque">opaque</option> |
| 159 |
</select> </td> |
| 160 |
</tr> |
| 161 |
</table> |
| 162 |
<br><hr noshade="noshade" size="1px" /> |
| 163 |
<table width="590" height="71" border="0" cellpadding="0" cellspacing="0"> |
| 164 |
<tr> |
| 165 |
<td width="245" height="33"><span style="line-height: 30px;"><strong>Feed URL Settings </strong></span></td> |
| 166 |
<td width="345" height="40"> </td> |
| 167 |
</tr> |
| 168 |
|
| 169 |
<tr> |
| 170 |
<td><label for="srr_rssUrl">RSS Feed URL* </label></td> |
| 171 |
<td height="40"><input name="srr_rssUrl" type="text" style="width: 300px;" class="widefat" id="srr_rssUrl" value="<?php echo $options['srrRssUrl']; ?>"><br><small>Enter the URL of the RSS Feed here</small> |
| 172 |
</td> |
| 173 |
</tr> |
| 174 |
</table><br><hr noshade="noshade" size="1px" /> |
| 175 |
<table width="564" height="402" border="0" cellpadding="0" cellspacing="0"> |
| 176 |
<tr> |
| 177 |
<td width="225"><strong>Title and Description Bar Settings </strong></td> |
| 178 |
<td width="299" height="40"> </td> |
| 179 |
</tr> |
| 180 |
<tr> |
| 181 |
<td height="28">Show Title and Description Bar </td> |
| 182 |
<td height="40"><select class="widefat" name="srr_showTitleAndDescription" id="srr_showTitleAndDescription" style="width: 200px;"><option <?php if ($options['srrShowTitleAndDescription'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option> |
| 183 |
<option <?php if ($options['srrShowTitleAndDescription'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 184 |
</select></td> |
| 185 |
</tr> |
| 186 |
<tr> |
| 187 |
<td height="28">Title Bar BG Color</td> |
| 188 |
<td height="40"><input name="srr_titleBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_titleBgColor" value="<?php echo $options['srrTitleBgColor']; ?>" /></td> |
| 189 |
</tr> |
| 190 |
<tr> |
| 191 |
<td height="28">Description Bar BG Color</td> |
| 192 |
<td height="40"><input name="srr_descriptionBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_descriptionBgColor" value="<?php echo $options['srrDescriptionBgColor']; ?>" /></td> |
| 193 |
</tr> |
| 194 |
<tr> |
| 195 |
<td height="28">Footer Bar BG Color</td> |
| 196 |
<td height="40"><input name="srr_footerBgColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_footerBgColor" value="<?php echo $options['srrFooterBgColor']; ?>" /></td> |
| 197 |
</tr> |
| 198 |
<tr> |
| 199 |
<td height="28">Title Text Color</td> |
| 200 |
<td height="40"><input name="srr_titleColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_titleColor" value="<?php echo $options['srrTitleColor']; ?>" /></td> |
| 201 |
</tr> |
| 202 |
<tr> |
| 203 |
<td height="28">Description Text Color</td> |
| 204 |
<td height="40"><input name="srr_descColor" style="width:200px" class="widefat color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false}" id="srr_descColor" value="<?php echo $options['srrDescColor']; ?>" /></td> |
| 205 |
</tr> |
| 206 |
<tr> |
| 207 |
<td height="44">Title, Description and Footer Bar Transparency </td> |
| 208 |
<td height="40"><input name="srr_titleBarAlpha" type="text" style="width:200px;" class="widefat" id="srr_titleBarAlpha" value="<?php echo $options['srrTitleBarAlpha']; ?>" /> |
| 209 |
<small> Default : 100 </small></td> |
| 210 |
</tr> |
| 211 |
<tr> |
| 212 |
<td height="44">Title and Description Bar Background Image </td> |
| 213 |
<td height="40"><input name="srr_titleAndDescriptionBg" type="text" style="width:200px;" class="widefat" id="srr_titleAndDescriptionBg" value="<?php echo $options['srrTitleAndDescriptionBg']; ?>"> |
| 214 |
<small> Default : None </small></td> |
| 215 |
</tr> |
| 216 |
<tr> |
| 217 |
<td height="44">Strech Title and Description Bar BG Image </td> |
| 218 |
<td height="40"><select class="widefat" name="srr_strechTitleImage" id="srr_strechTitleImage" style="width:200px;"> |
| 219 |
<option <?php if ($options['srrStrechTitleImage'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option> |
| 220 |
<option <?php if ($options['srrStrechTitleImage'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 221 |
</select> |
| 222 |
<small> Default : Yes </small></td> |
| 223 |
</tr> |
| 224 |
<tr> |
| 225 |
<td>Title and Footer Bar Border Type </td> |
| 226 |
<td height="40"><select class="widefat" name="srr_borderType" id="srr_borderType" style="width:200px;"> |
| 227 |
<option <?php if ($options['srrBorderType'] == "round"){ echo 'selected="selected"' ;} ?> value="round">round</option> |
| 228 |
<option <?php if ($options['srrBorderType'] == "square"){ echo 'selected="selected"' ;} ?> value="square">square</option> |
| 229 |
</select> |
| 230 |
<small> Default : Round </small></td> |
| 231 |
</tr> |
| 232 |
<tr> |
| 233 |
<td>Title and Description Bar Shine type </td> |
| 234 |
<td height="40"><select class="widefat" name="srr_shineType" id="srr_shineType" style="width:200px;"> |
| 235 |
<option <?php if ($options['srrShineType'] == "1"){ echo 'selected="selected"' ;} ?> value="1">1</option> |
| 236 |
<option <?php if ($options['srrShineType'] == "2"){ echo 'selected="selected"' ;} ?> value="2">2</option> |
| 237 |
<option <?php if ($options['srrShineType'] == "3"){ echo 'selected="selected"' ;} ?> value="3">3</option> |
| 238 |
<option <?php if ($options['srrShineType'] == "4"){ echo 'selected="selected"' ;} ?> value="4">4</option> |
| 239 |
<option <?php if ($options['srrShineType'] == "5"){ echo 'selected="selected"' ;} ?> value="5">5</option> |
| 240 |
<option <?php if ($options['srrShineType'] == "6"){ echo 'selected="selected"' ;} ?> value="6">6</option> |
| 241 |
<option <?php if ($options['srrShineType'] == "7"){ echo 'selected="selected"' ;} ?> value="7">7</option> |
| 242 |
</select><br /> |
| 243 |
<small> No Shine : 7 | Other Shines <a onclick="window.open('<?php echo getPluginPath_srr().'/shine-types.php?shineType=1'; ?>', 'popupwindow', 'scrollbars=yes,width=420,height=450');return true" style="color:#006699; cursor:pointer; text-decoration:underline">See here</a> </small></td> |
| 244 |
</tr> |
| 245 |
</table> |
| 246 |
<br><hr noshade="noshade" size="1px" /> |
| 247 |
<table width="590" height="148" border="0" cellpadding="0" cellspacing="0"> |
| 248 |
<tr> |
| 249 |
<td width="226" height="30"><strong>Feed Display Settings </strong></td> |
| 250 |
<td width="324" height="40"> </td> |
| 251 |
</tr> |
| 252 |
<tr> |
| 253 |
<td height="22">Feed Displayer Background Image </td> |
| 254 |
<td height="40"><input name="srr_backgroundImage" type="text" style="width: 200px;" class="widefat" id="srr_backgroundImage" value="<?php echo $options['srrBackgroundImage']; ?>"><small> Default : None </small></td> |
| 255 |
</tr> |
| 256 |
<tr> |
| 257 |
<td height="24">Strech Background Image </td> |
| 258 |
<td height="40"><select class="widefat" name="srr_strechBackgroundImage" id="srr_strechBackgroundImage" style="width:200px"> |
| 259 |
<option <?php if ($options['srrStrechBackgroundImage'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option> |
| 260 |
<option <?php if ($options['srrStrechBackgroundImage'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 261 |
</select> |
| 262 |
|
| 263 |
<small> Default : Yes </small></td> |
| 264 |
</tr> |
| 265 |
<tr> |
| 266 |
<td height="24">Display Date </td> |
| 267 |
<td height="40"><select class="widefat" name="srr_displayDate" id="srr_displayDate" style="width:200px"> |
| 268 |
<option value="yes" <?php if ($options['srrDisplayDate'] == "yes"){ echo 'selected="selected"' ;} ?>>yes</option> |
| 269 |
<option <?php if ($options['srrDisplayDate'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 270 |
</select> |
| 271 |
|
| 272 |
<small> Default : Yes </small></td> |
| 273 |
</tr> |
| 274 |
<tr> |
| 275 |
<td height="24">Display Description </td> |
| 276 |
<td height="40"><select class="widefat" name="srr_displayDescription" id="srr_displayDescription" style="width: 200px;"> |
| 277 |
<option <?php if ($options['srrDisplayDescription'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option> |
| 278 |
<option <?php if ($options['srrDisplayDescription'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 279 |
</select> |
| 280 |
|
| 281 |
<small> Default : Yes </small></td> |
| 282 |
</tr> |
| 283 |
<tr> |
| 284 |
<td>Show Logo in Background </td> |
| 285 |
<td height="40"><select class="widefat" name="srr_showLogo" id="srr_showLogo" style="width: 200px;"> |
| 286 |
<option <?php if ($options['srrShowLogo'] == "yes"){ echo 'selected="selected"' ;} ?> value="yes">yes</option> |
| 287 |
<option <?php if ($options['srrShowLogo'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> |
| 288 |
</select> |
| 289 |
|
| 290 |
<small> Default : Yes </small></td> |
| 291 |
</tr> |
| 292 |
</table><br><hr noshade="noshade" size="1px" /> |
| 293 |
<table width="590" height="144" border="0" cellpadding="0" cellspacing="0"> |
| 294 |
<tr> |
| 295 |
<td width="245"><strong>Tab Settings </strong></td> |
| 296 |
<td width="345" height="40"><small>Note : Don't enter anything if you don't want tabs </small></td> |
| 297 |
</tr> |
| 298 |
<tr> |
| 299 |
<td height="22">Tab 1 Name </td> |
| 300 |
<td height="40"><input name="srr_tab1Name" type="text" style="width: 200px;" class="widefat" id="srr_tab1Name" value="<?php echo $options['srrTab1Name']; ?>"></td> |
| 301 |
</tr> |
| 302 |
<tr> |
| 303 |
<td height="22">Tab 2 Name </td> |
| 304 |
<td height="40"><input name="srr_tab2Name" type="text" style="width: 200px;" class="widefat" id="srr_tab2Name" value="<?php echo $options['srrTab2Name']; ?>"></td> |
| 305 |
</tr> |
| 306 |
<tr> |
| 307 |
<td height="22">Tab 3 Name </td> |
| 308 |
<td height="40"><input name="srr_tab3Name" type="text" style="width: 200px;" class="widefat" id="srr_tab3Name" value="<?php echo $options['srrTab3Name']; ?>"></td> |
| 309 |
</tr> |
| 310 |
<tr> |
| 311 |
<td height="22">Tab 4 Name </td> |
| 312 |
<td height="40"><input name="srr_tab4Name" type="text" style="width: 200px;" class="widefat" id="srr_tab4Name" value="<?php echo $options['srrTab4Name']; ?>"></td> |
| 313 |
</tr> |
| 314 |
<tr> |
| 315 |
<td height="22">Tab 5 Name </td> |
| 316 |
<td height="40"><input name="srr_tab5Name" type="text" style="width: 200px;" class="widefat" id="srr_tab5Name" value="<?php echo $options['srrTab5Name']; ?>"></td> |
| 317 |
</tr> |
| 318 |
</table><br><hr noshade="noshade" size="1px" /> |
| 319 |
<table width="590" height="145" border="0" cellpadding="0" cellspacing="0"> |
| 320 |
<tr> |
| 321 |
<td width="247"><strong>Tab Feed URL's </strong></td> |
| 322 |
<td width="343" height="40"> </td> |
| 323 |
</tr> |
| 324 |
<tr> |
| 325 |
<td height="22">Tab 1 Feed URL </td> |
| 326 |
<td height="40"><input name="srr_tab1Url" type="text" style="width: 200px;" class="widefat" id="srr_tab1Url" value="<?php echo $options['srrTab1Url']; ?>"></td> |
| 327 |
</tr> |
| 328 |
<tr> |
| 329 |
<td height="22">Tab 2 Feed URL </td> |
| 330 |
<td height="40"><input name="srr_tab2Url" type="text" style="width: 200px;" class="widefat" id="srr_tab2Url" value="<?php echo $options['srrTab2Url']; ?>"></td> |
| 331 |
</tr> |
| 332 |
<tr> |
| 333 |
<td height="22">Tab 3 Feed URL </td> |
| 334 |
<td height="40"><input name="srr_tab3Url" type="text" style="width: 200px;" class="widefat" id="srr_tab3Url" value="<?php echo $options['srrTab3Url']; ?>"></td> |
| 335 |
</tr> |
| 336 |
<tr> |
| 337 |
<td height="22">Tab 4 Feed URL </td> |
| 338 |
<td height="40"><input name="srr_tab4Url" type="text" style="width: 200px;" class="widefat" id="srr_tab4Url" value="<?php echo $options['srrTab4Url']; ?>"></td> |
| 339 |
</tr> |
| 340 |
<tr> |
| 341 |
<td height="22">Tab 5 Feed URL </td> |
| 342 |
<td height="40"><input name="srr_tab5Url" type="text" style="width: 200px;" class="widefat" id="srr_tab5Url" value="<?php echo $options['srrTab5Url']; ?>"></td> |
| 343 |
</tr> |
| 344 |
</table><br> |
| 345 |
<table width="590" height="24" border="0" cellpadding="0" cellspacing="0"> |
| 346 |
<tr> |
| 347 |
<td width="245" height="24">Tabs Scroll Type </td> |
| 348 |
<td width="345" height="40"><select class="widefat" name="srr_tabScroll" id="srr_tabScroll" style="width: 200px;"> |
| 349 |
<option <?php if ($options['srrTabScroll'] == "mouse"){ echo 'selected="selected"' ;} ?> value="mouse">mouse</option> |
| 350 |
<option <?php if ($options['srrTabScroll'] == "button"){ echo 'selected="selected"' ;} ?> value="button">button</option> |
| 351 |
</select> |
| 352 |
<small> Default : Mouse </small></td> |
| 353 |
</tr> |
| 354 |
</table><br><hr noshade="noshade" size="1px" /> |
| 355 |
<table width="677" height="111" border="0" cellpadding="0" cellspacing="0"> |
| 356 |
<tr> |
| 357 |
<td width="224"><strong>Misc Settings </strong></td> |
| 358 |
<td width="413" height="40"> </td> |
| 359 |
</tr> |
| 360 |
<tr> |
| 361 |
<td height="24">Show URL Box </td> |
| 362 |
<td height="40"><select class="widefat" name="srr_showUrlBox" id="srr_showUrlBox" style="width:200px"> |
| 363 |
<option value="yes" <?php if ($options['srrShowUrlBox'] == "yes"){ echo 'selected="selected"' ;} ?>>yes</option> |
| 364 |
<option value="no" <?php if ($options['srrShowUrlBox'] == "no"){ echo 'selected="selected"' ;} ?> >no</option> |
| 365 |
</select> |
| 366 |
<small> Default : Yes </small></td> |
| 367 |
</tr> |
| 368 |
<tr> |
| 369 |
<td height="24">Show Subscribe Menu </td> |
| 370 |
<td height="40"><select class="widefat" name="srr_showSubscribeMenu" id="srr_showSubscribeMenu" style="width:200px"> |
| 371 |
<option value="yes" <?php if ($options['srrShowSubscribeMenu'] == "yes"){ echo 'selected="selected"' ;} ?> >yes</option> |
| 372 |
<option <?php if ($options['srrShowSubscribeMenu'] == "no"){ echo 'selected="selected"' ;} ?> value="no">no</option> </select><small> Default : Yes </small></td> |
| 373 |
</tr> |
| 374 |
<tr> |
| 375 |
<td height="22">Scroll Bar Dragger Color </td> |
| 376 |
<td height="40"><input name="srr_scrollbarDraggerColor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false} widefat" id="srr_scrollbarDraggerColor" value="<?php echo $options['srrScrollbarDraggerColor']; ?>" /> |
| 377 |
<small> Default : Black </small></td> |
| 378 |
</tr> |
| 379 |
<tr> |
| 380 |
<td>Scroll Bar Bar Color </td> |
| 381 |
<td height="40"><input name="srr_scrollbarBarColor" style="width:200px" class="color {pickerFaceColor:'transparent',pickerFace:3,pickerBorder:0,pickerInsetColor:'#000000',hash:false} widefat" id="srr_scrollbarBarColor" value="<?php echo $options['srrScrollbarBarColor']; ?>" /> |
| 382 |
<small> Default : White</small></td> |
| 383 |
</tr> |
| 384 |
</table> |
| 385 |
|
| 386 |
<p style="line-height: 30px;"> |
| 387 |
<label for="Submit"></label><span class="submit"> |
| 388 |
<input type="submit" name="super_rss_reader_submit" value="Save Settings" id="super_rss_reader_submit"></span> |
| 389 |
<label for="Submit"></label> |
| 390 |
</p> |
| 391 |
</form> |
| 392 |
|
| 393 |
<h2>Next ...</h2> |
| 394 |
<p>Go to the Widgets page and add the Super RSS Reader to the sidebar. <a href="widgets.php">Click here</a> to go the widgets page. After adding the widget, expand the widget and give some title to the RSS Reader.</p> |
| 395 |
<h2>Or ...</h2> |
| 396 |
Add the following PHP Code anywhere in the theme file . |
| 397 |
<p class="code"><?php superRSSReader (); ?> </p> |
| 398 |
<p class="code"> </p> |
| 399 |
</div> |
| 400 |
<?php $jscolorUrl= getPluginPath_srr().'/jscolor/jscolor.js' ?> |
| 401 |
<script type="text/javascript" src="<?php echo $jscolorUrl ?>"></script> |
| 402 |
<hr size="1" noshade="NOSHADE"/> |
| 403 |
|
| 404 |
<div><a href="http://www.aakashweb.com/" target="_blank"><img src="<?php echo getPluginPath_srr().'/images/aakashweb-logo.png'; ?>" alt="Aakash Web "width="97" height="37" border="0" align="right" title="Visit Aakash Web" /></a><a href="http://forums.aakashweb.com/forum/super-rss-reader/">Report Bugs</a> | <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donations@aakashweb.com&item_name=Donate Aakash Web and Support it's Useful Products &amount=&currency_code=USD" target="_blank">Quick Donate</a> | <a href="http://www.aakashweb.com/">www.aakashweb.com</a> </div> |
| 405 |
<br /> |
| 406 |
<br /> |
| 407 |
<?php |
| 408 |
} |
| 409 |
|
| 410 |
|
| 411 |
//Add the options page under the Options tab in the admin panel |
| 412 |
function super_rss_reader_addpage() { |
| 413 |
add_submenu_page('options-general.php', 'Super RSS Reader', 'Super RSS Reader', 10, __FILE__, 'super_rss_reader_admin_page'); |
| 414 |
} |
| 415 |
add_action('admin_menu', 'super_rss_reader_addpage'); |
| 416 |
/////////////////////////////////// |
| 417 |
function super_rss_reader($args) { |
| 418 |
extract($args); |
| 419 |
// Now we sniff around to see if there are |
| 420 |
// any preset options |
| 421 |
$options = get_option("super_rss_reader"); |
| 422 |
|
| 423 |
// Display the widget! |
| 424 |
echo $before_widget; |
| 425 |
echo $before_title; |
| 426 |
echo $options['srrTitle']; |
| 427 |
echo $after_title; |
| 428 |
|
| 429 |
if ($options['bfContent'] !=""){ |
| 430 |
echo $options['bfContent']; |
| 431 |
} |
| 432 |
//Our Widget Content |
| 433 |
|
| 434 |
$srrPhpUrl=getPluginPath_srr().'/loadXML.php'; |
| 435 |
$srrCssUrl=getPluginPath_srr().'/rss-css.css'; |
| 436 |
|
| 437 |
if ($options['srrTab1Name']!=""){ |
| 438 |
$srrTab1 = '&tab1Name='.$options['srrTab1Name']; |
| 439 |
} |
| 440 |
if ($options['srrTab2Name']!=""){ |
| 441 |
$srrTab2 = '&tab2Name='.$options['srrTab2Name']; |
| 442 |
} |
| 443 |
if ($options['srrTab3Name']!=""){ |
| 444 |
$srrTab3 = '&tab3Name='.$options['srrTab3Name']; |
| 445 |
} |
| 446 |
if ($options['srrTab4Name']!=""){ |
| 447 |
$srrTab4 = '&tab4Name='.$options['srrTab4Name']; |
| 448 |
} |
| 449 |
if ($options['srrTab5Name']!=""){ |
| 450 |
$srrTab5 = '&tab5Name='.$options['srrTab5Name']; |
| 451 |
} |
| 452 |
|
| 453 |
$srrFlashVars= 'phpURL='. $srrPhpUrl . '&cssUrl='.$srrCssUrl.'&rssUrl='. $options['srrRssUrl'].'&titleBgColor='. $options['srrTitleBgColor'].'&descriptionBgColor='. $options['srrDescriptionBgColor'] . '&footerBgColor='.$options['srrFooterBgColor'].'&titleColor='.$options['srrTitleColor'].'&descColor='.$options['srrDescColor'].'&showTitleAndDescription='.$options['srrShowTitleAndDescription'].'&titleBarAlpha='.$options['srrTitleBarAlpha']. '&titleAndDescriptionBg='. $options['srrTitleAndDescriptionBg'].'&strechTitleImage='.$options['srrStrechTitleImage'].'&borderType='. $options['srrBorderType'].'&shineType='.$options['srrShineType'].'&backgroundImage='.$options['srrBackgroundImage'].'&strechBackgroundImage='.$options['srrStrechBackgroundImage'].'&displayDate='.$options['srrDisplayDate'].'&displayDescription='.$options['srrDisplayDescription'].'&showLogo='.$options['srrShowLogo'].'&tabScroll='.$options['srrTabScroll'].'&showUrlBox='.$options['srrShowUrlBox'].'&showSubscribeMenu='.$options['srrShowSubscribeMenu'].'&scrollbarDraggerColor='.$options['srrScrollbarDraggerColor'].'&scrollbarBarColor='.$options['srrScrollbarBarColor'] . '&tab1Url=' .$options['srrTab1Url']. '&tab2Url=' .$options['srrTab2Url']. '&tab3Url=' .$options['srrTab3Url']. '&tab4Url=' .$options['srrTab4Url']. '&tab5Url=' .$options['srrTab5Url'].$srrTab1.$srrTab2.$srrTab3.$srrTab4.$srrTab5 ; |
| 454 |
|
| 455 |
echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'; |
| 456 |
echo $options['srrWidth']; |
| 457 |
echo '" height="'; |
| 458 |
echo $options['srrHeight']; |
| 459 |
echo '" wmode="'; |
| 460 |
echo $options['srrWmode']; |
| 461 |
echo '" ><param name="movie" value="'; |
| 462 |
echo getPluginPath_srr().'/rssreader.swf"/>'; |
| 463 |
echo '<param name="quality" value="High"/><param name="wmode" value="'; |
| 464 |
echo $options['srrWmode'].'"/>'; |
| 465 |
echo '<param name="bgcolor" value="'; |
| 466 |
echo $options['srrBgcolor']; |
| 467 |
echo '"/><param name="flashvars" value="'; |
| 468 |
echo $srrFlashVars . '"'; |
| 469 |
echo '<embed src="'. getPluginPath_srr().'/rssreader.swf" '.'wmode="'.$options['srrWmode'].'" width="'.$options['srrWidth'].'" height="'.$options['srrHeight'].'" quality="high" allowscriptaccess="always" bgcolor="'. $options['srrBgcolor'] .'" flashvars="'. $srrFlashVars.'" ></embed></object>'; |
| 470 |
|
| 471 |
if ($options['afContent'] !=""){ |
| 472 |
echo $options['afContent']; |
| 473 |
} |
| 474 |
echo '<!-- Super RSS Reader Powered by Aakash Web | Aakash Chakravarthy ( www.aakashweb.com ) -->'; |
| 475 |
echo $after_widget; |
| 476 |
} |
| 477 |
|
| 478 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 479 |
function super_rss_reader_control() { |
| 480 |
|
| 481 |
// We need to grab any preset options |
| 482 |
$options = get_option("super_rss_reader"); |
| 483 |
|
| 484 |
// No options? No problem! We set them here. |
| 485 |
if (!is_array( $options )) { |
| 486 |
$options = array( |
| 487 |
'title' => 'Super RSS Reader title Goes here', |
| 488 |
); |
| 489 |
} |
| 490 |
|
| 491 |
// Is the user has set the options and clicked save, |
| 492 |
// Then we grab them using the $_POST function. |
| 493 |
if ($_POST['srr_submit']) { |
| 494 |
$options['srrTitle'] = $_POST['srr_title']; |
| 495 |
$options['bfContent'] = $_POST['srr_bfContent']; |
| 496 |
$options['afContent'] = $_POST['srr_afContent']; |
| 497 |
// And we also update the options in the Wordpress Database |
| 498 |
update_option("super_rss_reader", $options); |
| 499 |
} |
| 500 |
|
| 501 |
?> |
| 502 |
|
| 503 |
<p> |
| 504 |
<label for="srr_title"> Title:</label> |
| 505 |
<input name="srr_title" class="widefat" type="text" id="srr_title" value="<?php echo $options['srrTitle'] ;?>" style="width:250px"/><br /> |
| 506 |
<label for="srr_bfContent">Some Text Before the Reader:</label> |
| 507 |
<input name="srr_bfContent" class="widefat" type="text" id="srr_bfContent" value="<?php echo $options['bfContent'] ;?>" style="width:250px"/><br /> |
| 508 |
<div class="widefat" style="background-color:#FFFFF4; width:240px; height:150px;">RSS Reader</div><br /> |
| 509 |
<label for="srr_afContent">Some Text After the Reader:</label> |
| 510 |
<input name="srr_afContent" class="widefat" type="text" id="srr_afContent" value="<?php echo $options['afContent'] ;?>" style="width:250px"/> |
| 511 |
|
| 512 |
<input type="hidden" id="srr_submit" name="srr_submit" value="1" /> |
| 513 |
</p> |
| 514 |
<?php |
| 515 |
} |
| 516 |
|
| 517 |
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 518 |
|
| 519 |
function super_rss_reader_init() { |
| 520 |
// These are the Wordpress functions which will register |
| 521 |
// the widget, and also the widget control - or |
| 522 |
// 'options', to you and me. |
| 523 |
register_sidebar_widget('Super RSS Reader', 'super_rss_reader'); |
| 524 |
register_widget_control('Super RSS Reader', 'super_rss_reader_control'); |
| 525 |
} |
| 526 |
|
| 527 |
add_action("plugins_loaded", "super_rss_reader_init"); |
| 528 |
|
| 529 |
function superRSSReader (){ |
| 530 |
// Now we sniff around to see if there are |
| 531 |
// any preset options |
| 532 |
$options = get_option("super_rss_reader"); |
| 533 |
|
| 534 |
// If no options have been set, we need to set them |
| 535 |
|
| 536 |
$srrPhpUrl=getPluginPath_srr().'/loadXML.php'; |
| 537 |
$srrCssUrl=getPluginPath_srr().'/rss-css.css'; |
| 538 |
|
| 539 |
if ($options['srrTab1Name']!=""){ |
| 540 |
$srrTab1 = '&tab1Name='.$options['srrTab1Name']; |
| 541 |
} |
| 542 |
if ($options['srrTab2Name']!=""){ |
| 543 |
$srrTab2 = '&tab2Name='.$options['srrTab2Name']; |
| 544 |
} |
| 545 |
if ($options['srrTab3Name']!=""){ |
| 546 |
$srrTab3 = '&tab3Name='.$options['srrTab3Name']; |
| 547 |
} |
| 548 |
if ($options['srrTab4Name']!=""){ |
| 549 |
$srrTab4 = '&tab4Name='.$options['srrTab4Name']; |
| 550 |
} |
| 551 |
if ($options['srrTab5Name']!=""){ |
| 552 |
$srrTab5 = '&tab5Name='.$options['srrTab5Name']; |
| 553 |
} |
| 554 |
|
| 555 |
$srrFlashVars= 'phpURL='. $srrPhpUrl . '&cssUrl='.$srrCssUrl.'&rssUrl='. $options['srrRssUrl'].'&titleBgColor='. $options['srrTitleBgColor'].'&descriptionBgColor='. $options['srrDescriptionBgColor'] . '&footerBgColor='.$options['srrFooterBgColor'].'&titleColor='.$options['srrTitleColor'].'&descColor='.$options['srrDescColor'].'&showTitleAndDescription='.$options['srrShowTitleAndDescription'].'&titleBarAlpha='.$options['srrTitleBarAlpha']. '&titleAndDescriptionBg='. $options['srrTitleAndDescriptionBg'].'&strechTitleImage='.$options['srrStrechTitleImage'].'&borderType='. $options['srrBorderType'].'&shineType='.$options['srrShineType'].'&backgroundImage='.$options['srrBackgroundImage'].'&strechBackgroundImage='.$options['srrStrechBackgroundImage'].'&displayDate='.$options['srrDisplayDate'].'&displayDescription='.$options['srrDisplayDescription'].'&showLogo='.$options['srrShowLogo'].'&tabScroll='.$options['srrTabScroll'].'&showUrlBox='.$options['srrShowUrlBox'].'&showSubscribeMenu='.$options['srrShowSubscribeMenu'].'&scrollbarDraggerColor='.$options['srrScrollbarDraggerColor'].'&scrollbarBarColor='.$options['srrScrollbarBarColor'] . '&tab1Url=' .$options['srrTab1Url']. '&tab2Url=' .$options['srrTab2Url']. '&tab3Url=' .$options['srrTab3Url']. '&tab4Url=' .$options['srrTab4Url']. '&tab5Url=' .$options['srrTab5Url'].$srrTab1.$srrTab2.$srrTab3.$srrTab4.$srrTab5 ; |
| 556 |
|
| 557 |
echo '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'; |
| 558 |
echo $options['srrWidth']; |
| 559 |
echo '" height="'; |
| 560 |
echo $options['srrHeight']; |
| 561 |
echo '" wmode="'; |
| 562 |
echo $options['srrWmode']; |
| 563 |
echo '" ><param name="movie" value="'; |
| 564 |
echo getPluginPath_srr().'/rssreader.swf"/>'; |
| 565 |
echo '<param name="quality" value="High"/><param name="wmode" value="'; |
| 566 |
echo $options['srrWmode'].'"/>'; |
| 567 |
echo '<param name="bgcolor" value="'; |
| 568 |
echo $options['srrBgcolor']; |
| 569 |
echo '"/><param name="flashvars" value="'; |
| 570 |
echo $srrFlashVars . '"'; |
| 571 |
echo '<embed src="'. getPluginPath_srr().'/rssreader.swf" '.'wmode="'.$options['srrWmode'].'" width="'.$options['srrWidth'].'" height="'.$options['srrHeight'].'" quality="high" allowscriptaccess="always" bgcolor="'. $options['srrBgcolor'] .'" flashvars="'. $srrFlashVars.'" ></embed></object>'; |
| 572 |
echo '<!--Super RSS Reader Powered by Aakash Web | Aakash Chakravarthy ( www.aakashweb.com ) -->'; |
| 573 |
|
| 574 |
} |
| 575 |
?> |