Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
PHP and MySQL Web Development - P143: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 682 Chapter 29 Building Web Forums What we see here are all the initiating articles. None of these are replies they are all the first article on a particular topic. You will see that we have a number of options.There is a menu bar that will let us add a new post and expand or collapse the view that we have of the articles. To understand what this means look at the posts. Some of them have plus symbols next to them. This means that these articles have been replied to. To see the replies to a particular article you can click the plus symbol. The result of clicking one of these symbols is shown in Figure 29.5. Figure 29.5 The thread of discussion about persistence has been expanded. As you can see clicking the plus symbol has displayed the replies to that first article. The plus symbol has now turned to a minus symbol. If we click this all the articles in this thread will be collapsed returning us to the initial view. You might also notice that one of the replies has a plus symbol next to it. This means that there are replies to this reply. This can continue to an arbitrary depth and you can view each reply set by clicking on the appropriate plus symbol. The two menu bar options Expand and Collapse will expand all possible threads and collapse all possible threads respectively. The result of clicking the Expand button is shown in Figure 29.6. Viewing the Tree of Articles 683 Figure 29.6 AU the threads have now been expanded. If you look closely at Figures 29.5 and 29.6 you can see that we are passing some parameters back to index.php in the command line. In Figure 29.5 the URL looks as follows http webserver chapter29 index.php expand 6 6 The script reads this as Expand the item with postid 6 .The is just an HTML anchor that will scroll the page down to the part that has just been expanded. In Figure 29.6 the URL reads http webserver chapter29 index.php expand all Clicking the Expand button has passed the parameter expand with the value all. Expanding and Collapsing .