332 CHAPTER 11 MODIFYING PHPBB Caution When (Virtual web hosting)

332 CHAPTER 11 MODIFYING PHPBB Caution When editing your phpBB files, make sure you use a plain text editor, and not something like Microsoft Word, which could damage your files. While Notepad is adequate for the job, for Windows users, something like EditPlus (shareware available from http://www.editplus.com, $30 registration) is better. EditPlus (and editors like it) is very handy for its color-coding abilities, which can help prevent a lot of common coding mistakes that simple editors such as Notepad can t point out to you. Making the Changes With the hack open on your desktop (in Notepad, EditPlus, or a similar text editor), start by navigating to the proper file in this case, viewtopic.php and following the instructions on where to insert code. The instructions are fairly straightforward. Look toward the end of the file to insert a large block of code. (For the sake of brevity, and acknowledging the changing nature of modifications, the code is not reprinted here.) After making the prescribed changes, save and close viewtopic.php. Next, open lang_main.php, which will reside under language/lang_english for our purposes. These language lines will contain two strings used by this hack. In this instance, you re looking for a comment marked That s All Folks at the very end of the file. Above that, you ll insert the language lines specified in the next section of the hack. In the version of the hack available at the time of this writing, two lines are specified. Note Feel free to substitute for other languages in which you have translations of phpBB. However, note that the text supplied with this particular hack is in English, so you will need to translate to your other desired language (or obtain a translation of the hack, if one is available). Finally, open the viewtopic_body.tpl template file, which will place the form on the bottom of the View Topic page. Chapter 12 will delve into the details of working with template files, but for now, you ll be editing just this one file. If you have multiple active templates, you will need to edit the viewtopic_body.tpl file for each additional template as well, in order for the feature to be properly enabled across all templates. Look for the line {S_TOPIC_ADMIN}, and insert the final line specified in the hack below it. Don t worry about the meaning of these lines right now; Chapter 12 will educate you on the available template variables. The final instruction is to save and close all files. Yes, that s right you re finished! Upload your changes to the server, open your board, and go view a topic (while logged in, of course). With any luck, you ll have a new Figure 11-2. The expected results of addition to your View Topic page, as illusinstalling the Quick Reply hack: a trated in Figure 11-2. Quick Reply box
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply