Changeset 8388
- Timestamp:
- 03/17/2007 10:26:18 AM (19 years ago)
- Location:
- subscribe2/trunk/wp-content/plugins
- Files:
-
- 1 deleted
- 1 edited
-
ReadMe.txt (deleted)
-
subscribe2/subscribe2.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
subscribe2/trunk/wp-content/plugins/subscribe2/subscribe2.php
r8045 r8388 30 30 */ 31 31 32 // If you are on a host that limits the num ner of recipients32 // If you are on a host that limits the numer of recipients 33 33 // permitted on each outgoing email message 34 // change th is valueto your hosts limit34 // change th to your hosts limit 35 35 define('BCCLIMIT', '0'); 36 36 37 37 // by default, subscribe2 grabs the first page from your database for use 38 38 // when displaying the confirmation screen to public subscribers. 39 // You can override this by specifying a page ID below.39 // You can override this by specifying a page ID below. 40 40 define('S2PAGE', '0'); 41 41 42 // change th is to TRUE if you want a daily digest of the day's posts43 // sendto your subscribers42 // change th 43 // to your subscribers 44 44 define('S2DIGEST', false); 45 45 46 // our version number. Don't touch. 46 // our version number. Don't touch this or any line below 47 // unless you know exacly what you are doing 47 48 define('S2VERSION', '2.2.15'); 48 49 … … 209 210 210 211 // let's take the time to check process registered users 211 // existing public subscribers are subscribed to all categories212 // existing public subscribers are subscribed to all categories 212 213 $users = $wpdb->get_col("SELECT ID FROM $wpdb->users"); 213 214 if (!empty($users)) { … … 551 552 $admin = get_userdata(1); 552 553 $this->myname = $admin->display_name; 553 554 554 555 if ($is_remind == TRUE) { 555 556 $body = $this->substitute(stripslashes($this->subscribe2_options['remind_email'])); … … 1310 1311 $exclude_cats = ''; 1311 1312 } 1312 $this->subscribe2_options['exclude'] = $exclude_cats;1313 $this->subscribe2_options['exclude'] = $exclude_cats; 1313 1314 // allow override? 1314 1315 (isset($_POST['reg_override'])) ? $override = '1' : $override = '0'; … … 1324 1325 $sender = 'admin'; 1325 1326 } 1326 $this->subscribe2_options['sender'] = $sender;1327 $this->subscribe2_options['sender'] = $sender; 1327 1328 1328 1329 // email templates 1329 1330 $mailtext = $_POST['mailtext']; 1330 $this->subscribe2_options['mailtext'] = $mailtext;1331 $this->subscribe2_options['mailtext'] = $mailtext; 1331 1332 $confirm_email = $_POST['confirm_email']; 1332 $this->subscribe2_options['confirm_email'] = $confirm_email;1333 $this->subscribe2_options['confirm_email'] = $confirm_email; 1333 1334 $remind_email = $_POST['remind_email']; 1334 $this->subscribe2_options['remind_email'] = $remind_email;1335 $this->subscribe2_options['remind_email'] = $remind_email; 1335 1336 1336 1337 //automatic subscription 1337 1338 $autosub_option = $_POST['autosub']; 1338 $this->subscribe2_options['autosub']= $autosub_option;1339 $this->subscribe2_options['autosub']= $autosub_option; 1339 1340 $autosub_format_option = $_POST['autoformat']; 1340 $this->subscribe2_options['autoformat']= $autosub_format_option;1341 $this->subscribe2_options['autoformat']= $autosub_format_option; 1341 1342 1342 1343 //barred domains 1343 1344 $barred_option = $_POST['barred']; 1344 $this->subscribe2_options['barred'] = $barred_option;1345 $this->subscribe2_options['barred'] = $barred_option; 1345 1346 echo "<div id=\"message\" class=\"updated fade\"><strong><p>$this->options_saved</p></strong></div>"; 1346 update_option('subscribe2_options', $this->subscribe2_options);1347 update_option('subscribe2_options', $this->subscribe2_options); 1347 1348 } 1348 1349 } 1349 1350 // show our form 1350 1351 echo "<div class=\"wrap\">"; 1351 echo "<form method=\"post\" action=\"\"> ";1352 echo "<form method=\"post\" action=\"\">"; 1352 1353 if (function_exists('wp_nonce_field')) { 1353 1354 wp_nonce_field('subscribe2-options_subscribers' . $s2nonce); 1354 1355 } 1355 echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" /> ";1356 echo "<h2>" . __('Delivery Options', 'subscribe2') . ":</h2> ";1356 echo "<input type=\"hidden\" name=\"s2_admin\" value=\"options\" />"; 1357 echo "<h2>" . __('Delivery Options', 'subscribe2') . ":</h2>"; 1357 1358 echo __('Send Email From', 'subscribe2') . ': '; 1358 echo "<input type=\"radio\" name=\"sender\" value=\"author\" ";1359 echo "<input type=\"radio\" name=\"sender\" value=\"author\""; 1359 1360 if ('author' == $this->subscribe2_options['sender']) { 1360 1361 echo "checked=\"checked\" "; 1361 1362 } 1362 1363 echo " /> " . __('Author of the post', 'subscribe2') . " "; 1363 echo "<input type=\"radio\" name=\"sender\" value=\"admin\" ";1364 echo "<input type=\"radio\" name=\"sender\" value=\"admin\""; 1364 1365 if ('admin' == $this->subscribe2_options['sender']) { 1365 1366 echo "checked=\"checked\" "; … … 1367 1368 echo " /> " . __('Blog Admin', 'subscribe2') . "<br />\r\n"; 1368 1369 echo "<h2>" . __('Email Templates', 'subscribe2') . "</h2>\r\n"; 1369 echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\"> ";1370 echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"1\" class=\"editform\">"; 1370 1371 echo "<tr><td>"; 1371 1372 echo __('New Post email (must not be empty)', 'subscribe2') . ":"; 1372 1373 echo "<br />\r\n"; 1373 echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea>< p>\r\n";1374 echo "<textarea rows=\"9\" cols=\"60\" name=\"mailtext\">" . stripslashes($this->subscribe2_options['mailtext']) . "</textarea><>\r\n"; 1374 1375 echo "</td><td valign=\"top\" rowspan=\"3\">"; 1375 1376 echo "<h3>" . __('Message substitions', 'subscribe2') . "</h3>\r\n"; … … 1387 1388 echo "</dl></td></tr><tr><td>"; 1388 1389 echo __('Subscribe / Unsubscribe confirmation email', 'subscribe2') . ":<br />\r\n"; 1389 echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea>< p>";1390 echo "</td></tr><tr ><td>";1390 echo "<textarea rows=\"9\" cols=\"60\" name=\"confirm_email\">" . stripslashes($this->subscribe2_options['confirm_email']) . "</textarea><"; 1391 echo "</td></tr><tr><td>"; 1391 1392 echo __('Reminder email to Unconfirmed Subscribers', 'subscribe2') . ":<br />\r\n"; 1392 echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea>< p>";1393 echo "</td></tr></table> \r\n";1393 echo "<textarea rows=\"9\" cols=\"60\" name=\"remind_email\">" . stripslashes($this->subscribe2_options['remind_email']) . "</textarea><"; 1394 echo "</td></tr></table>\r\n"; 1394 1395 1395 1396 // excluded categories 1396 1397 echo "<h2>" . __('Excluded Categories', 'subscribe2') . "</h2>\r\n"; 1397 1398 $this->display_category_form(explode(',', $this->get_excluded_cats())); 1398 echo "< p align=\"center\"><input type=\"checkbox\" name=\"reg_override\" value=\"1\"";1399 echo "<><input type=\"checkbox\" name=\"reg_override\" value=\"1\""; 1399 1400 if ('1' == $this->subscribe2_options['reg_override']) { 1400 echo " checked=\"checked\"";1401 } 1402 echo " /> " . __('Allow registered users to subscribe to excluded categories?', 'subscribe2') . "</p>";1401 echo "checked=\"checked\""; 1402 } 1403 echo ""; 1403 1404 echo "<h2>" . __('Writing Options', 'subscribe2') . "</h2>\r\n"; 1404 echo "< p align=\"center\"><input type=\"checkbox\" name=\"show_button\" value=\"1\"";1405 echo "<input type=\"checkbox\" name=\"show_button\" value=\"1\""; 1405 1406 if ('1' == $this->subscribe2_options['show_button']) { 1406 echo " checked=\"checked\"";1407 } 1408 echo " /> " . __('Show the Subscribe2 button on the Write toolbar?', 'subscribe2') . "</p>";1407 echo "checked=\"checked\""; 1408 } 1409 echo ""; 1409 1410 1410 1411 //Auto Subscription for new registrations 1411 1412 echo "<h2>" . __('Auto Subscribe', 'subscribe2') . "</h2>\r\n"; 1412 1413 echo __('Automatically subscribe new users registering with your blog.', 'subscribe2') . "<br />\r\n"; 1413 echo "<input type=\"radio\" name=\"autosub\" value=\"yes\" ";1414 echo "<input type=\"radio\" name=\"autosub\" value=\"yes\""; 1414 1415 if ('yes' == $this->subscribe2_options['autosub']) { 1415 echo " checked=\"checked\"";1416 echo ""; 1416 1417 } 1417 1418 echo " /> " . __('Yes', 'subscribe2') . " "; 1418 echo "<input type=\"radio\" name=\"autosub\" value=\"no\" ";1419 echo "<input type=\"radio\" name=\"autosub\" value=\"no\""; 1419 1420 if ('no' == $this->subscribe2_options['autosub']) { 1420 echo " checked=\"checked\"";1421 echo ""; 1421 1422 } 1422 1423 echo " /> " . __('No', 'subscribe2') . "<br /><br />\r\n"; … … 1436 1437 echo "checked=\"checked\" "; 1437 1438 } 1438 echo "/> " . __('Plain Text - Excerpt', 'subscribe2') . " ";1439 echo "/> " . __('Plain Text - Excerpt', 'subscribe2') . " "; 1439 1440 1440 1441 //barred domains … … 1828 1829 /** 1829 1830 Overrides the default query when handling a (un)subscription confirmation 1830 This is basically a trick: if the s2 variable is in the query string , just grab the first static page1831 and override it's contents later with title_filter() and template_filter()1831 This is basically a trick: if the s2 variable is in the query stringe 1832 e_filter() 1832 1833 */ 1833 1834 function query_filter() { … … 1837 1838 global $wpdb; 1838 1839 1839 if ( (defined('S2PAGE')) && (0 != =S2PAGE) ) {1840 if ( (defined('S2PAGE')) && (0 != S2PAGE) ) { 1840 1841 return "page_id=" . S2PAGE; 1841 1842 } else { … … 1857 1858 return __('Subscription Confirmation', 'subscribe2'); 1858 1859 } // end title_filter() 1859 1860 /**1861 Override the template filter to make sure a special template is not used1862 */1863 function template_filter() {1864 // don't interfere if we've already done our thing1865 if (1 == $this->filtered) { return; }1866 return;1867 } // end template_filter()1868 1860 1869 1861 /* ===== wp-cron functions ===== */ … … 2018 2010 //do we need to upgrade anything? 2019 2011 if ($this->subscribe2_options['version'] !== S2VERSION) { 2020 $this->upgrade();2021 }2012 $this->upgrade(); 2013 } 2022 2014 2023 2015 if (isset($_GET['s2'])) {
Note: See TracChangeset
for help on using the changeset viewer.