Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2007
    Posts
    682
    Thanks
    319
    Thanked 1 Time in 1 Post

    PHPBB... confusing code!

    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:
    PHP Code:
    <!-- 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...

  • #2
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    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

  • #3
    Senior Coder kbluhm's Avatar
    Join Date
    Apr 2007
    Location
    Philadelphia, PA, USA
    Posts
    1,509
    Thanks
    3
    Thanked 258 Times in 254 Posts
    PHPBB uses a proprietary template parser.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •