Changeset 1375 for trunk/content/plugins
- Timestamp:
- 03/21/10 12:48:36 (3 years ago)
- Location:
- trunk
- Files:
-
- 25 edited
- 39 copied
-
. (modified) (1 prop)
-
content/plugins (modified) (2 props)
-
content/plugins/comments/comments.php (modified) (6 diffs)
-
content/plugins/comments/readme.txt (modified) (1 diff)
-
content/plugins/contact_us (copied) (copied from branches/1.2/content/plugins/contact_us)
-
content/plugins/contact_us/contact_us.php (copied) (copied from branches/1.2/content/plugins/contact_us/contact_us.php)
-
content/plugins/contact_us/contact_us_settings.php (copied) (copied from branches/1.2/content/plugins/contact_us/contact_us_settings.php)
-
content/plugins/contact_us/css (copied) (copied from branches/1.2/content/plugins/contact_us/css)
-
content/plugins/contact_us/css/contact_us.css (copied) (copied from branches/1.2/content/plugins/contact_us/css/contact_us.css)
-
content/plugins/contact_us/languages (copied) (copied from branches/1.2/content/plugins/contact_us/languages)
-
content/plugins/contact_us/languages/contact_us_language.php (copied) (copied from branches/1.2/content/plugins/contact_us/languages/contact_us_language.php)
-
content/plugins/contact_us/readme.txt (copied) (copied from branches/1.2/content/plugins/contact_us/readme.txt)
-
content/plugins/contact_us/templates (copied) (copied from branches/1.2/content/plugins/contact_us/templates)
-
content/plugins/contact_us/templates/contact_form.php (copied) (copied from branches/1.2/content/plugins/contact_us/templates/contact_form.php)
-
content/plugins/cron (copied) (copied from branches/1.2/content/plugins/cron)
-
content/plugins/cron/cron.php (copied) (copied from branches/1.2/content/plugins/cron/cron.php)
-
content/plugins/cron/cron_settings.php (copied) (copied from branches/1.2/content/plugins/cron/cron_settings.php)
-
content/plugins/cron/readme.txt (copied) (copied from branches/1.2/content/plugins/cron/readme.txt)
-
content/plugins/messaging/libs/MessagingFuncs.php (modified) (1 diff)
-
content/plugins/recaptcha (copied) (copied from branches/1.2/content/plugins/recaptcha)
-
content/plugins/recaptcha/languages (copied) (copied from branches/1.2/content/plugins/recaptcha/languages)
-
content/plugins/recaptcha/languages/recaptcha_language.php (copied) (copied from branches/1.2/content/plugins/recaptcha/languages/recaptcha_language.php)
-
content/plugins/recaptcha/libs (copied) (copied from branches/1.2/content/plugins/recaptcha/libs)
-
content/plugins/recaptcha/libs/LICENSE (copied) (copied from branches/1.2/content/plugins/recaptcha/libs/LICENSE)
-
content/plugins/recaptcha/libs/recaptchalib.php (copied) (copied from branches/1.2/content/plugins/recaptcha/libs/recaptchalib.php)
-
content/plugins/recaptcha/readme.txt (copied) (copied from branches/1.2/content/plugins/recaptcha/readme.txt)
-
content/plugins/recaptcha/recaptcha.php (copied) (copied from branches/1.2/content/plugins/recaptcha/recaptcha.php)
-
content/plugins/recaptcha/recaptcha_settings.php (copied) (copied from branches/1.2/content/plugins/recaptcha/recaptcha_settings.php)
-
content/plugins/sb_base/languages/sb_base_language.php (modified) (1 diff)
-
content/plugins/sb_base/libs/SbBaseFunctions.php (modified) (2 diffs)
-
content/plugins/sb_base/readme.txt (modified) (1 diff)
-
content/plugins/sb_base/sb_base.php (modified) (3 diffs)
-
content/plugins/sb_base/sb_base_settings.php (modified) (5 diffs)
-
content/plugins/submit/libs/SubmitFunctions.php (modified) (1 diff)
-
content/plugins/updown_voting (copied) (copied from branches/1.2/content/plugins/updown_voting)
-
content/plugins/updown_voting/css (copied) (copied from branches/1.2/content/plugins/updown_voting/css)
-
content/plugins/updown_voting/css/updown_voting.css (copied) (copied from branches/1.2/content/plugins/updown_voting/css/updown_voting.css)
-
content/plugins/updown_voting/javascript (copied) (copied from branches/1.2/content/plugins/updown_voting/javascript)
-
content/plugins/updown_voting/javascript/json2.min.js (copied) (copied from branches/1.2/content/plugins/updown_voting/javascript/json2.min.js)
-
content/plugins/updown_voting/javascript/updown_voting.js (copied) (copied from branches/1.2/content/plugins/updown_voting/javascript/updown_voting.js)
-
content/plugins/updown_voting/languages (copied) (copied from branches/1.2/content/plugins/updown_voting/languages)
-
content/plugins/updown_voting/languages/updown_voting_language.php (copied) (copied from branches/1.2/content/plugins/updown_voting/languages/updown_voting_language.php)
-
content/plugins/updown_voting/readme.txt (copied) (copied from branches/1.2/content/plugins/updown_voting/readme.txt)
-
content/plugins/updown_voting/templates (copied) (copied from branches/1.2/content/plugins/updown_voting/templates)
-
content/plugins/updown_voting/templates/updown_voting_alert.php (copied) (copied from branches/1.2/content/plugins/updown_voting/templates/updown_voting_alert.php)
-
content/plugins/updown_voting/templates/updown_voting_button.php (copied) (copied from branches/1.2/content/plugins/updown_voting/templates/updown_voting_button.php)
-
content/plugins/updown_voting/updown_voting.php (copied) (copied from branches/1.2/content/plugins/updown_voting/updown_voting.php)
-
content/plugins/updown_voting/updown_voting_functions.php (copied) (copied from branches/1.2/content/plugins/updown_voting/updown_voting_functions.php)
-
content/plugins/updown_voting/updown_voting_settings.php (copied) (copied from branches/1.2/content/plugins/updown_voting/updown_voting_settings.php)
-
content/plugins/user_manager/css/user_manager.css (modified) (1 diff)
-
content/plugins/user_manager/languages/user_manager_language.php (modified) (1 diff)
-
content/plugins/user_manager/readme.txt (modified) (1 diff)
-
content/plugins/user_manager/templates/user_man_add.php (copied) (copied from branches/1.2/content/plugins/user_manager/templates/user_man_add.php)
-
content/plugins/user_manager/templates/user_man_main.php (modified) (1 diff)
-
content/plugins/user_manager/templates/user_man_perms.php (modified) (1 diff)
-
content/plugins/user_manager/templates/user_man_user_settings.php (modified) (1 diff)
-
content/plugins/user_manager/user_manager.php (modified) (1 diff)
-
content/plugins/user_manager/user_manager_settings.php (modified) (2 diffs)
-
content/plugins/user_signin/readme.txt (modified) (1 diff)
-
content/plugins/user_signin/user_signin.php (modified) (3 diffs)
-
content/plugins/users/css/users.css (modified) (1 diff)
-
content/plugins/users/libs/UserFunctions.php (modified) (1 diff)
-
content/plugins/users/readme.txt (modified) (1 diff)
-
content/plugins/users/users.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/1.2 merged: 1314-1324,1327-1373
- Property svn:mergeinfo changed
-
trunk/content/plugins
- Property svn:mergeinfo changed
/branches/1.2/content/plugins merged: 1315-1316,1319-1320,1322-1324,1329,1332,1334-1335,1337,1339,1351-1354,1357-1358,1363,1365,1370 -
Property
svn:ignore
set to
api
- Property svn:mergeinfo changed
-
trunk/content/plugins/comments/comments.php
r1305 r1375 3 3 * name: Comments 4 4 * description: Enables logged-in users to comment on posts 5 * version: 1. 75 * version: 1.8 6 6 * folder: comments 7 7 * class: Comments … … 258 258 if ($h->comment->content != '') { 259 259 $result = $h->comment->addComment($h); 260 260 261 261 // notify chosen mods of new comment by email if enabled and UserFunctions file exists 262 262 if (($comments_settings['comment_email_notify']) && (file_exists(PLUGINS . 'users/libs/UserFunctions.php'))) … … 266 266 $uf->notifyMods($h, 'comment', $h->comment->status, $h->comment->postId, $h->comment->id); 267 267 } 268 268 269 269 // email comment subscribers if this comment has 'approved' status: 270 270 if ($h->comment->status == 'approved') { … … 807 807 $subscribers = array(); 808 808 $subscriber_ids = array_unique($subscriber_ids); 809 809 810 foreach ($subscriber_ids as $subscriber_id) { 810 811 // remove the current comment author so he/she doesn't get emailed his own comment … … 833 834 $message .= $h->lang["comment_email_unsubscribe"]; 834 835 836 if (!$h->comment->email) { 837 // Get settings from database if they exist... 838 $comments_settings = $h->getSerializedSettings('comments'); 839 $h->comment->email = $comments_settings['comment_email']; 840 } 841 835 842 $from = SITE_EMAIL; 836 843 $to = $h->comment->email; // send email to address specified in Comment Settings; … … 840 847 $bcc = ""; 841 848 } 842 $headers = "From: " . $from . $bcc . "\r\nReply-To: " . $from . "\r\nX-Priority: 3\r\n"; 843 844 /* 845 echo "to: " . $to . "<br />"; 846 echo "bcc: " . $bcc . "<br />"; 847 echo "subject: " . $subject . "<br />"; 848 echo "message: " . $message . "<br />"; 849 echo "headers: " . $headers . "<br />"; 850 exit; 851 */ 852 853 $h->email($to, $subject, $message, $headers); 849 850 if (SMTP == 'true') { 851 $recipients['To'] = $to; 852 $recipients['Bcc'] = $send_to; 853 // no SMTP headers because they get overwritten in EmailFunctions anyway 854 $h->email($recipients, $subject, $message); 855 } else { 856 $recipients = $to; 857 $headers = "From: " . $from . $bcc . "\r\nReply-To: " . $from . "\r\nX-Priority: 3\r\n"; 858 $h->email($recipients, $subject, $message, $headers); 859 } 854 860 } 855 861 } -
trunk/content/plugins/comments/readme.txt
r1305 r1375 15 15 Changelog 16 16 --------- 17 v.1.8 2010/03/18 - Nick - Fix for not sending comment subscriptions when using SMTP email authentication. 17 18 v.1.7 2010/03/11 - Nick - Fix for a previous change that broke the set pending and delete links within comments. 18 19 v.1.6 2010/02/26 - Nick - Adds link to profile navigation; Email changed to go through Hotaru's "email" function -
trunk/content/plugins/messaging/libs/MessagingFuncs.php
r1256 r1375 195 195 196 196 // Hi username... 197 $email_message = "Hi ". $this->to . "," . $skip_line;197 $email_message = $h->lang['messaging_email_greeting'] . $this->to . "," . $skip_line; 198 198 199 199 // You've been sent a private message from... -
trunk/content/plugins/sb_base/languages/sb_base_language.php
r1210 r1375 53 53 /* SB Base Settings */ 54 54 $lang["sb_base_settings_header"] = "SB Base Configuration"; 55 $lang["sb_base_settings_posts_per_page"] = "posts per page <small>(default: 10)</small>"; 55 $lang["sb_base_settings_posts_per_page"] = "Posts per page <small>(default: 10)</small>"; 56 $lang["sb_base_settings_rss_redirect"] = "Automatically redirect RSS links to their original sources"; 56 57 $lang["sb_base_settings_post_archiving"] = "<b>Post Archiving</b>"; 57 58 $lang["sb_base_settings_post_archive_desc"] = "On the Maintenance page, there's a link you can use to archive old posts (or remove an existing archive). Archiving speeds up your site by excluding old posts and their comments, votes and tags from most database usage. Old posts can still be accessed via the search box or when loaded directly (e.g. from Google). <i>Note: Archiving is not automatic. You will need to update the archive periodically from the Maintenance page.</i>"; -
trunk/content/plugins/sb_base/libs/SbBaseFunctions.php
r1305 r1375 411 411 412 412 if ($results) { 413 414 // get sb base settings 415 $sb_base_settings = $h->getSerializedSettings('sb_base'); 416 413 417 foreach ($results as $result) 414 418 { … … 419 423 $title = html_entity_decode(urldecode($result->post_title), ENT_QUOTES,'UTF-8'); 420 424 $item->title = stripslashes($title); 421 $item->link = $h->url(array('page'=>$result->post_id)); 425 426 // if RSS redirecting is enabled, append forward=1 to the url 427 if (isset($sb_base_settings['rss_redirect']) && !empty($sb_base_settings['rss_redirect'])) { 428 $item->link = html_entity_decode($h->url(array('page'=>$result->post_id, 'forward'=>$result->post_id)), ENT_QUOTES,'UTF-8'); 429 } else { 430 $item->link = $h->url(array('page'=>$result->post_id)); 431 } 422 432 $item->setPubDate($result->post_date); 423 433 $item->description = "<![CDATA[ " . stripslashes(urldecode($result->post_content)) . " ]]>"; -
trunk/content/plugins/sb_base/readme.txt
r1309 r1375 14 14 Changelog 15 15 --------- 16 v.0.7 2010/03/15 - Nick - Added option to redirect RSS feeds through your site to their sources [courtesy of Gunaxin.com] 16 17 v.0.6 2010/03/13 - Nick - Lists ranked by vote are now ranked first by vote, second by recency 17 18 v.0.5 2010/02/26 - Nick - Filters hidden from user pages; Added profile navigation link -
trunk/content/plugins/sb_base/sb_base.php
r1309 r1375 3 3 * name: SB Base 4 4 * description: Social Bookmarking base - provides "list" and "post" templates. 5 * version: 0. 65 * version: 0.7 6 6 * folder: sb_base 7 7 * class: SbBase … … 43 43 $sb_base_settings = $h->getSerializedSettings(); 44 44 if (!isset($sb_base_settings['posts_per_page'])) { $sb_base_settings['posts_per_page'] = 10; } 45 if (!isset($sb_base_settings['rss_redirect'])) { $sb_base_settings['rss_redirect'] = ''; } 45 46 if (!isset($sb_base_settings['archive'])) { $sb_base_settings['archive'] = "no_archive"; } 46 47 $h->updateSetting('sb_base_settings', serialize($sb_base_settings)); … … 70 71 if ($h->cage->get->keyExists('sort')) { 71 72 $h->pageName = 'sort'; 73 } 74 75 // check if this is an RSS link forwarding to the source 76 if ($h->cage->get->keyExists('forward')) { 77 $post_id = $h->cage->get->testInt('forward'); 78 if ($post_id) { $post = $h->getPost($post_id); } 79 if (isset($post->post_orig_url)) { 80 header("Location:" . urldecode($post->post_orig_url)); 81 exit; 82 } 72 83 } 73 84 -
trunk/content/plugins/sb_base/sb_base_settings.php
r1081 r1375 45 45 46 46 $posts_per_page = $sb_base_settings['posts_per_page']; 47 $rss_redirect = $sb_base_settings['rss_redirect']; 47 48 $archive = $sb_base_settings['archive']; 48 49 … … 51 52 //...otherwise set to blank: 52 53 if (!$posts_per_page) { $posts_per_page = 10; } 54 if (!$rss_redirect) { $rss_redirect = ''; } 53 55 if (!$archive) { $archive = 'no_archive'; } 54 56 55 57 echo "<form name='sb_base_settings_form' action='" . BASEURL . "admin_index.php?page=plugin_settings&plugin=sb_base' method='post'>\n"; 56 58 59 // posts per page 57 60 echo "<p><input type='text' size=5 name='posts_per_page' value='" . $posts_per_page . "' /> "; 58 61 echo $h->lang["sb_base_settings_posts_per_page"] . "</p>\n"; 62 63 // rss redirecting? 64 echo "<p><input type='checkbox' name='rss_redirect' value='rss_redirect' " . $rss_redirect . " > " . $h->lang["sb_base_settings_rss_redirect"] . "<br />\n"; 59 65 60 66 $h->pluginHook('sb_base_settings_form'); … … 62 68 echo "<br />\n"; 63 69 70 // post archiving 64 71 echo $h->lang["sb_base_settings_post_archiving"] . "<br /><br />\n"; 65 72 echo $h->lang["sb_base_settings_post_archive_desc"] . "<br /><br />\n"; … … 95 102 $posts_per_page = $sb_base_settings['posts_per_page']; 96 103 } 104 105 106 // RSS Redirecting 107 if ($h->cage->post->keyExists('rss_redirect')) { 108 $rss_redirect = 'checked'; 109 } else { 110 $rss_redirect = ''; 111 } 97 112 98 113 // Post Archiving … … 105 120 106 121 $sb_base_settings['posts_per_page'] = $posts_per_page; 122 $sb_base_settings['rss_redirect'] = $rss_redirect; 107 123 $sb_base_settings['archive'] = $archive; 108 124 -
trunk/content/plugins/submit/libs/SubmitFunctions.php
r1210 r1375 703 703 $encoding=trim($matches[1]); 704 704 705 //you need iconv to encode to utf-8 706 if (function_exists("iconv")) 707 { 708 if (strcasecmp($encoding, 'utf-8') != 0) { 709 //convert the html code into utf-8 whatever encoding it is using 710 $string=iconv($encoding, 'UTF-8//IGNORE', $string); 711 } 705 //you need iconv to encode to utf-8 (if not, use custom iconv in funcs.strings.php) 706 if (strcasecmp($encoding, 'utf-8') != 0) { 707 //convert the html code into utf-8 whatever encoding it is using 708 $string=iconv($encoding, 'UTF-8//IGNORE', $string); 712 709 } 713 710 } -
trunk/content/plugins/user_manager/css/user_manager.css
r1307 r1375 21 21 22 22 .user_manager_name_icons { padding: 0.4em; display:none;} 23 24 #user_man_add_user form { border-bottom: 1px solid #ccc; } -
trunk/content/plugins/user_manager/languages/user_manager_language.php
r1081 r1375 126 126 $lang['user_man_no_settings'] = "There haven't been any settings installed by plugins yet"; 127 127 128 129 /* User Man Create User */ 130 131 $lang['user_man_add'] = "Add New User"; 132 $lang['user_man_add_new_user'] = "Add a new user"; 133 $lang["user_man_add_desc"] = "Use this page to add new users, send new passwords and request email validation."; 134 $lang["user_man_add_detail"] = "Enter a username and email address for the new user."; 135 $lang['user_man_add_success_password_sent'] = "User Created and Password Emailed"; 136 $lang['user_man_create_send'] = "Create User & Send Password"; 137 138 $lang["user_man_send_new_password"] = "Send a new random password"; 139 $lang["user_man_send_password_detail"] = "Enter a username for the user you wish to generate a new password for."; 140 $lang['user_man_send_password'] = "Send Password"; 141 $lang['user_man_new_password_sent'] = "New password generated and emailed."; 142 $lang['user_man_user_not_found'] = "Sorry, no user found with that name"; 143 144 $lang["user_man_send_email_validation"] = "Send an email validation request"; 145 $lang["user_man_send_email_validation_detail"] = "Enter a username for the user you wish to send an email validation message to."; 146 $lang['user_man_request_valid_email'] = "Request Email Validation"; 147 $lang['user_man_email_validation_request_sent'] = "Email validation request sent."; 148 128 149 ?> -
trunk/content/plugins/user_manager/readme.txt
r1190 r1375 15 15 Changelog 16 16 --------- 17 v.0.9 2010/03/17 - Nick - New page for creating users, sending new passwords and email validation requests 17 18 v.0.8 2010/02/18 - Nick - Fixes for changing user permissions and pagination 18 19 v.0.7 2010/02/02 - Nick - Improvements for spam management -
trunk/content/plugins/user_manager/templates/user_man_main.php
r1081 r1375 41 41 <b><u><?php echo $h->lang["user_man"]; ?></u></b> 42 42 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_perms'>" . $h->lang["user_man_default_perms"] . "</a>"; ?> 43 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_settings'>" . $h->lang["user_man_default_settings"] . "</a>"; ?> 43 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_settings'>" . $h->lang["user_man_default_settings"] . "</a>"; ?> 44 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=add_user'>" . $h->lang["user_man_add"] . "</a>"; ?> 44 45 </p> 45 46 -
trunk/content/plugins/user_manager/templates/user_man_perms.php
r1081 r1375 35 35 <a href='<?php echo BASEURL; ?>admin_index.php?plugin=user_manager&page=plugin_settings'><?php echo $h->lang["user_man"]; ?></a> 36 36 <b><u><?php echo $h->lang["user_man_default_perms"]; ?></u></b> 37 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_settings'>" . $h->lang["user_man_default_settings"] . "</a>"; ?> 37 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_settings'>" . $h->lang["user_man_default_settings"] . "</a>"; ?> 38 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=add_user'>" . $h->lang["user_man_add"] . "</a>"; ?> 38 39 </p> 39 40 -
trunk/content/plugins/user_manager/templates/user_man_user_settings.php
r1081 r1375 39 39 <a href='<?php echo BASEURL; ?>admin_index.php?plugin=user_manager&page=plugin_settings'><?php echo $h->lang["user_man"]; ?></a> 40 40 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=default_perms'>" . $h->lang["user_man_default_perms"] . "</a>"; ?> 41 <b><u><?php echo $h->lang["user_man_default_settings"]; ?></u></b> 41 <b><u><?php echo $h->lang["user_man_default_settings"]; ?></u></b> 42 <?php echo "<a href='" . BASEURL . "admin_index.php?plugin=user_manager&page=plugin_settings&subpage=add_user'>" . $h->lang["user_man_add"] . "</a>"; ?> 42 43 </p> 43 44 -
trunk/content/plugins/user_manager/user_manager.php
r1190 r1375 3 3 * name: User Manager 4 4 * description: Manage users. 5 * version: 0. 85 * version: 0.9 6 6 * folder: user_manager 7 7 * class: UserManager -
trunk/content/plugins/user_manager/user_manager_settings.php
r1304 r1375 44 44 || ($h->cage->post->testPage('subpage') == 'default_settings')) { 45 45 $this->defaultSettings($h); 46 return true; 47 } 48 49 if (($h->cage->get->testPage('subpage') == 'add_user') 50 || ($h->cage->post->testPage('subpage') == 'add_user')) { 51 $this->addUserPage($h); 46 52 return true; 47 53 } … … 610 616 $h->displayTemplate('user_man_user_settings', 'user_manager'); 611 617 } 618 619 620 /** 621 * add User Page 622 */ 623 public function addUserPage($h) 624 { 625 switch ($h->cage->post->testAlnumLines('submitted')) 626 { 627 case 'new_user': 628 $this->createUser($h); 629 break; 630 case 'new_password': 631 $this->sendPassword($h); 632 break; 633 case 'email_validation': 634 $this->sendEmailValidationRequest($h); 635 break; 636 } 637 638 // one username for each of the three forms, otherwise they all get pre-filled 639 if (!isset($h->vars['user_man_username_1'])) { $h->vars['user_man_username_1'] = ''; } 640 if (!isset($h->vars['user_man_username_2'])) { $h->vars['user_man_username_2'] = ''; } 641 if (!isset($h->vars['user_man_username_3'])) { $h->vars['user_man_username_3'] = ''; } 642 if (!isset($h->vars['user_man_email'])) { $h->vars['user_man_email'] = ''; } 643 644 $h->displayTemplate('user_man_add'); 645 } 646 647 648 /** 649 * Create a new user 650 */ 651 public function createUser($h) 652 { 653 $error = 0; 654 655 // check username 656 $username = $h->cage->post->testUsername('username'); // alphanumeric, dashes and underscores okay, case insensitive 657 if (!$username) { 658 $h->messages[$h->lang['user_signin_register_username_error']] = 'red'; 659 $error = 1; 660 } else { 661 $h->vars['user_man_username_1'] = $username; 662 } 663 664 // check email 665 $email = $h->cage->post->testEmail('email'); 666 if (!$email) { 667 $h->messages[$h->lang['user_signin_register_email_error']] = 'red'; 668 $error = 1; 669 } else { 670 $h->vars['user_man_email'] = $email; 671 } 672 673 // process new user 674 if (!$error) { 675 $us = new UserSignin(); 676 $blocked = $us->checkBlocked($h, $username, $email); // true if blocked, false if safe 677 $exists = $h->userExists(0, $username, $email); 678 if (!$blocked && ($exists == 'no')) { 679 680 // SUCCESS!!! 681 $userAuth = new UserAuth(); 682 $userAuth->name = $username; 683 $userAuth->email = $email; 684 $userAuth->emailValid = 1; 685 $userAuth->password = random_string(10); // temporary until user is created 686 $userAuth->addUserBasic($h); 687 $last_insert_id = $h->db->get_var($h->db->prepare("SELECT LAST_INSERT_ID()")); 688 689 // send password! 690 $passconf = md5(crypt(md5($userAuth->email),md5($userAuth->email))); 691 $userAuth->newRandomPassword($h, $last_insert_id, $passconf); 692 $h->messages[$h->lang['user_man_add_success_password_sent']] = 'green'; 693 694 $user = ''; $email = ''; // clear the form. 695 696 } elseif ($exists == 'id') { 697 $h->messages[$h->lang['user_signin_register_id_exists']] = 'red'; 698 699 } elseif ($exists == 'name') { 700 $h->messages[$h->lang['user_signin_register_username_exists']] = 'red'; 701 702 } elseif ($exists == 'email') { 703 $h->messages[$h->lang['user_signin_register_email_exists']] = 'red'; 704 705 } elseif ($blocked) { 706 $h->messages[$h->lang['user_signin_register_user_blocked']] = 'red'; 707 } 708 } 709 } 710 711 712 /** 713 * Send new password 714 */ 715 public function sendPassword($h) 716 { 717 // check username 718 $username = $h->cage->post->testUsername('username'); 719 720 $userAuth = new UserAuth(); 721 $userAuth->getUserBasic($h, 0, $username); 722 if ($userAuth->id) { 723 // send password! 724 $passconf = md5(crypt(md5($userAuth->email),md5($userAuth->email))); 725 $userAuth->newRandomPassword($h, $userAuth->id, $passconf); 726 $h->messages[$h->lang['user_man_new_password_sent']] = 'green'; 727 } else { 728 $h->vars['user_man_username_2'] = $username; // to fill the username field 729 $h->messages[$h->lang['user_man_user_not_found']] = 'red'; 730 } 731 } 732 733 734 /** 735 * Send email validation request 736 */ 737 public function sendEmailValidationRequest($h) 738 { 739 // check username 740 $username = $h->cage->post->testUsername('username'); 741 $userid = $h->getUserIdFromName($username); 742 743 if ($userid) { 744 // send email validation request 745 $us = new UserSignin(); 746 $us->sendConfirmationEmail($h, $userid); 747 $h->messages[$h->lang['user_man_email_validation_request_sent']] = 'green'; 748 } else { 749 $h->vars['user_man_username_3'] = $username; // to fill the username field 750 $h->messages[$h->lang['user_man_user_not_found']] = 'red'; 751 } 752 } 612 753 } 613 754 ?> -
trunk/content/plugins/user_signin/readme.txt
r1248 r1375 15 15 Changelog 16 16 --------- 17 v.0.4 2010/03/20 - Nick - Fix for emails when using SMTP email authentication 17 18 v.0.3 2010/02/26 - Nick - New plugin hook in the registration form; mail sent through Hotaru's email function 18 19 v.0.2 2010/02/23 - Nick - Throws out killspammed, banned or suspended users when checking the cookie -
trunk/content/plugins/user_signin/user_signin.php
r1248 r1375 3 3 * name: User Signin 4 4 * description: Provides user registration and login 5 * version: 0. 35 * version: 0.4 6 6 * folder: user_signin 7 7 * type: signin … … 589 589 $body .= $h->lang['user_signin_register_emailconf_body_sign']; 590 590 $to = $user->email; 591 $headers = "From: " . SITE_EMAIL . "\r\nReply-To: " . SITE_EMAIL . "\r\nX-Priority: 3\r\n";592 591 593 592 /* … … 598 597 */ 599 598 600 $h->email($to, $subject, $body , $headers);599 $h->email($to, $subject, $body); 601 600 } 602 601 -
trunk/content/plugins/users/css/users.css
r1307 r1375 18 18 19 19 #profile_avatar { float: left; margin: 0.6em 1.0em 1.0em 0; } 20 #profile_bio { float: left; margin: 0.6em 1.0em 1.0em 0; }20 #profile_bio { float: left; margin: 0.6em 0 1.0em 0; width: 80%; } 21 21 #profile_usage { margin: 0 1.0em 1.0em 0; } -
trunk/content/plugins/users/libs/UserFunctions.php
r1305 r1375 122 122 $body .= $h->lang['userfunctions_notifymods_body_sign']; 123 123 $to = $mod['email']; 124 $headers = "From: " . SITE_EMAIL . "\r\nReply-To: " . SITE_EMAIL . "\r\nX-Priority: 3\r\n"; 125 126 $h->email($to, $subject, $body, $headers); 124 125 $h->email($to, $subject, $body); 127 126 } 128 127 -
trunk/content/plugins/users/readme.txt
r1311 r1375 14 14 Changelog 15 15 --------- 16 v.1.7 2010/03/20 - Nick - Fix for moderator email notification when using SMTP email authentication 16 17 v.1.6 2010/03/13 - Nick - Fix for missing user menu when viewing a message 17 18 v.1.5 2010/02/28 - Nick - Fix for undefined $user errors -
trunk/content/plugins/users/users.php
r1311 r1375 3 3 * name: Users 4 4 * description: Provides profile, settings and permission pages 5 * version: 1. 65 * version: 1.7 6 6 * folder: users 7 7 * type: users
Note: See TracChangeset
for help on using the changeset viewer.