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

Kể từ khi tất cả các loại phương tiện truyền thông, chúng tôi sẽ hỗ trợ cần ít nhất một trường cơ sở dữ liệu bổ sung trong một bảng mở rộng bảng trạng thái, chúng ta sẽ cần phải hiển thị bất kỳ trường bổ sung về hình thức tình trạng bài. | Statuses Other Media Changes to the view Since all of the media types we are going to support require at least one additional database field in a table that extends the statuses table we are going to need to display any additional fields on the post status form. The standard type of status doesn t require additional fields and new media types that we haven t discussed which we may wish to support in the future may require more than one additional field. To support a varying number of additional fields depending on the type we could use some JavaScript in this case we will use the jQuery framework to change the form depending on the context of the status. Beneath the main status box we can add radio buttons for each of the status types and depending on the one the user selects the JavaScript can show or hide the additional fields making the form more relevant. Template Our update status template needs a few changes We need to set the enctype on the form so that we can upload files for posting images We need radio buttons for the new types of statuses We need additional fields for those statuses The changes are highlighted in the following code segment p Tell your network what you are up to p form action profile statuses profile_user_id method post enctype multipart form-data textarea id status name status textarea br input type radio name status_type id status_checker_update class status_checker value update Update input type radio name status_type id status_checker_video class status_checker value video Video input type radio name status_type id status_checker_image class status_checker value image Image input type radio name status_type id status_checker_link class status_checker value link Link br div class video_input extra_field label for video_url class YouTube URL label input type text id name video_url class br div div class image_input extra_field ---------------------------------- 232 ----------------------------- Download from Wow eBook .

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.