Tham khảo tài liệu 'tạo mạng xã hội với php - part 2', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Table of Contents Chapter 2 Planning and Developing the Core Framework 21 Designing the framework 22 Patterns making life easier 22 MVC Model-View-Controller 22 The Front Controller pattern 24 Registry 24 Folder structure 26 Building the framework 28 Registry 28 The registry object 28 Registry objects 31 Front Controller single point of access 56 56 .htaccess 58 Summary 59 Chapter 3 Users Registration and Authentication 61 Privacy policies 62 Users 63 Our user object 63 Our authentication registry object 65 POST authentication 67 SESSION authentication 68 Structuring the database 69 Registration 70 Standard details 70 Hooking additional fields on 76 Processing the registration 80 Creating the profile 80 Putting it all together registration constructor 81 CAPTCHA 82 General CAPTCHA 83 reCAPTCHA 83 Where do I sign up 83 E-mail verification 86 Sending e-mails 86 Sending the e-mail verification e-mail 90 Authentication with our authentication object 90 Logging in 90 Are we logged in 91 Logging out 91 Remember me 92 Help I ve forgotten 92 Username 92 -------------------------------------- ii ------------------------------------ Download from Table of Contents Password 94 Let them reset the password 96 Summary 98 Chapter 4 Friends and Relationships__99 Inviting friends 99 Manually inviting friends 100 Invitation controller 101 Automatically inviting friends 101 Google Friend Connect 101 Windows Live contacts 102 Yahoo 102 Gmail contacts 102 Automatically connecting with friends 102 Members 102 Listing users 103 Pagination 103 Paginated members 110 Paginated users by letter 113 Searching for users 117 Custom relationships 121 Relationship types 121 Relationships 122 Adding friends 122 Forming a relationship 122 Relationship model 125 Relationship controller 129 Mutual relationships accepting or rejecting a request 131 Pending requests 131 Accepting a pending request 133 Rejecting a pending request 134 .