|
Changing Registration Screen:As an example, lets say that we want to re-word some of the text in the registration screen as shown.
And replace the link with the text "You must be over 13 years of age to register." phpBB tries to isolate English content text in a central location so that it is not spread all over the code. After searching the language\lang_english folder, we found the registration agreement text in the file lang_main.php. By adding the blue highlighted text below...
was all it took to alter the registration text. Note that this text is stored in the PHP variable $lang['Reg_agreement']. To be precise, lang is actually an array and Reg_agreement is an index key of the array. And the registration text is stored in that element of the array. In the same file, we found the "under-13" link text assigned to the $lang['Agree_under_13'] array element and had alter the text to be as shown...
If you perform a search for a reference to $lang['Agree_under_13'] throughout the PHP source code, you will find that the file usercp_register.php in the includes folder uses that variable as shown below...
That PHP code is passing the value of $lang['Agree_under_13'] to another array variable element under the key AGREE_UNDER_13. Many portions of the forum screens are laid out using templates. You will find the template files in the templates\subSilver folder. The registration screen layout is controlled by the agreement.tpl template. Viewing agreement.tpl in Dreamweaver's design view ...
you can see how the table structure corresponds to what you see in the registration screen. If we look at its code, we see that tpl files are nothing more than text file containing HTML code fragments. Embedded within the code fragments are placeholder variables in curly braces.
The highlighted text is the under-13 link. We remove the <a> tags so that it becomes ...
in order to remove the link. So you seen the process of altering a screen. Extensive knowledge of PHP is not necessary. We found the text in language folder, determined where this text is referenced in the PHP files (often in the includes folder), and then found the template in the corresponding to the screen in the templates folder. Many other screens can be altered by following a similar methodology. Next Lesson:Learn how to create a new style. |








