TAILIEUCHUNG - Thiết kế mạng xã hội với PHP - 17

Mặc dù người sử dụng thông tin là có được chia thành các khu vực khác nhau, được truy cập thông qua liên kết khác nhau cho thấy các trang khác nhau, sẽ có một số thông tin cần được phổ biến khắp tất cả các khía cạnh, chẳng hạn như: • • • Tên của người sử dụng có hồ sơ chúng tôi đang xem bức ảnh của họ Một mẫu của bạn bè | Profiles and Statuses require_once FRAMEWORK_PATH . controllers profile sc new Profilestatusescontroller this- registry true user If the user tried to access a sub-controller that doesn t exist we would display an error. Display an error - you cannot access profiles simply by visiting profile return void private function profileError this- registry- errorPage Sorry an error has occured The link you followed was invalid please try again Core shared information Although the user s profile is going to be broken down into different areas which are accessed through different links showing different pages there will be some information that should be common throughout all of these aspects such as The name of the user whose profile we are viewing Their photograph A sample of their friends This core shared information is something we can generate from within the profile controller which is called regardless of which sub controller control is subsequently delegated to. This information can be generated and sent to the template handler ready for when the page is outputted to the user s browser. Name ID and photograph To get the name ID and photograph of a user we are going to require a profile model to access and manage the data from a user s profile. We are also going to need to add a new field to our profile table one for a user s profile picture as we didn t consider that when the user signed up to Dino Space . While we are creating this model we should also create a field in the database for the users biography information for them to tell everyone about themselves. ----------------------------------- 142 ----------------------------------- Download from Wow eBook Chapter 5 Profile model We need to create a profile model models which we will need to do the following things Populate its fields based on a user s profile in the database Update its fields based on changes to a user s profile Update the corresponding

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.