Skip to:
Content
Pages
Categories
Search
Top
Bottom

call register form via php tag

  • hello bb’ans,

    if <?php login_form(); ?> calls the login form template, what calls the register form?

    i’ve tried as a php hardcore ultra mega pro the <?php register_form(); ?> idea, but that’s somehow not the way how it should be :)

Viewing 7 replies - 1 through 7 (of 7 total)
  • There isn’t exactly as counterpart to login_form() for registering because it’s not expected to be embedded I guess. If you look under register.php though, you can see the internal function template call is bb_load_template( 'register.php', $_globals ); where $_globals are set earlier in the page before some code that handles the form output (ignore them at your own peril).

    The register.php template is also set up to be a full page though with calls to the header and footer functions, as well as a safety check for logged in users, so you’d probably need to cut it down and save it as a separate template to call.

    I’m pretty sure there’s been some discussion of embedding a register page in a template before in the forums, so you might want to look for that too.


    Olaf Lederer
    Participant

    @finalwebsites

    right login form is a function and the register form is a complete page.

    there is also a login page. The function login form is used inside the header template

    ah alright i see,

    thank’s for the clear explanation kawauso, sounds plausible, thank’s olaf.

    see you around :)

    just a another one quick…

    i’d like to create a sidebar.php , and i’d like to add <?php bb_get_sidebar(); ?> to a particular page (so not a global call to all pages).

    my experiment was:

    <script>
    function bb_get_sidebar() {
    bb_load_template( 'sidebar.php' );
    }
    </script>

    in header.php (inside head).

    2. <?php bb_get_sidebar(); ?> (inside body).

    but no success, what am I doing wrong? :(

    For a start… <script> is for JavaScript code, not PHP :P You could avoid using a separate template for that one call anyway and use the function directly instead, or put it in functions.php. You might have to register template files though, but I’m not sure.


    Olaf Lederer
    Participant

    @finalwebsites

    I think a sitewide form is easier to integrate using the full code inside the functions.php file (like comment list on wordpress)

    i see i see! i have a lot to learn.

    ok thank’s kawauso and olaf, it’s been a pleasure… as always :)

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar