TAILIEUCHUNG - Mastering Joomla! 1.5 Extension and Framework Development phần 5

trừ khi chúng ta lưu các thay đổi, thay đổi sẽ kéo dài cho đến khi phiên làm việc hết hạn. Các thông số sử dụng này không được sử dụng như một cửa hàng tạm thời. Để lưu trữ dữ liệu tạm thời, chúng ta nên sử dụng các phiên họp và người sử dụng nhà nước, chúng ta sẽ thấy cả hai trong phần tiếp theo. | Chapter 7 When we perform any modifications to the user s session unless we save the changes the modifications will last only until the session expires. User parameters are not used as a temporary store. To store temporary data we should use the session and the user state we will see both in the next section. ị ợL If we store temporary data in user parameters we run the risk Ị ị ị of saving the data accidently to the user s database record. Ị A common design issue is the extension of the user beyond their predefined attributes. There are three common ways of dealing with this Add additional fields to the _ _users table. Create a new table that maintains a one-to-one relationship with the __users table. Use the user s parameters to store additional data. The first option can cause some major problems. If several extensions choose this method there is a chance that there will be a naming conflict between fields. The second option is a good choice if the extra data is searchable ordered or used to modify results returned from the queries. To maintain the table successfully we would have to create a plugin to deal with the events onAfterstoreUser and onAfterDeleteUser explained in Chapter 6. The final option is ideal if the extra data is not subject to searches ordered or used to restrict query results. We might implement these parameters in one of the three ways Manually edit the parameters using the setParam method. This is suitable if there are not many parameters or the user never modifies the parameters using a form. Use JParameter as the basis to create a form in which users can modify the parameters. Allow the user to modify the parameters via the user s component. To do this we need to modify the file for more information about editing XML see Chapter 10 . Before we begin there is something we need to understand. A JUser object essentially has two sets of parameters a RAW parameters string or array params and a JParameter object _params . Both of .

TỪ KHÓA LIÊN QUAN
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.