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

Tham khảo tài liệu 'thiết kế mạng xã hội với php - 22', 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ả | Status Stream stream- . data ID stream types . data type_reference . datatags elseif data poster data profile this- registry- getObject template - addTemplateBit stream- . data ID stream types . data type_reference . datatags else network updates this- registry- getObject template - addTemplateBit stream- . data ID stream types . data type_reference . . datatags else If there were no updates we display the none template. this- registry- getObject template - buildFromTemplates stream So if we had our templates in place at this stage bringing all of this together adding the controller to our database and viewing stream what would we see 192 Download from Wow eBook Chapter 6 This is the basics of our status stream. We can now look at adding comments likes and dislikes to the stream. Comments likes and dislikes The functionality behind adding comments likes and dislikes is very similar to the work we did in Chapter 5 in developing the statuses on a user s profile. The concept to adding these to the stream is fairly straightforward. Firstly we create an empty array of comments likes dislikes for each status. This way if a post has no comments likes or dislikes then by caching the empty array and sending it to the template we don t see a blank list where comments should be. If there are comments they are added to the empty array making it non-empty cached and sent to the template. Although the method is the same for the three aspects comments require one database query whereas likes and dislikes combined require another so let s add in support one at a time. Comments Take the status IDs we retrieved earlier and create empty arrays for each of them. status_ids implode IDs start array foreach IDs as id start id array Copy our new array of empty arrays to be used for comments. comments comments start Query the database for comments. sql SELECT as commenter .

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.