...

View Full Version : PHPBB... confusing code!



martynball
01-29-2010, 04:34 PM
PHPBB forums reference code by using {}. I am guessing the pages include a file with all of these "variables?".

I don't know, its so confusing, here:


<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
<div id="search-box">
<form action="{U_SEARCH}" method="post" id="search">
<fieldset>
<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
<input class="button2" value="{L_SEARCH}" type="submit" /><br />
<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
</fieldset>
</form>
</div>
<!-- ENDIF -->


Where does "<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->" get the value from to see if it is true/false?

<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a>
Where does the data for {U_SEARCH} come from? I want to do soemthing simular to this so that I can shorten my code, and so that I can you the
<!-- IF !P_EDITABLE --> on my pages instead of typing:

<?php if (P_EDITABLE) == false) {
code
}
?>

Eh, I am so confused to as how this code works...

angst
01-29-2010, 04:39 PM
these are likely constants that are defined some where in the forum software.
your best bet would be to ask this question on the PHPBB support forums: http://www.phpbb.com/community/viewforum.php?f=46

kbluhm
01-30-2010, 04:11 AM
PHPBB uses a proprietary template parser.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum