Info
- 8 posts
- 3 voices
- Started 2 years ago by johnnydoe
- Latest reply from johnnydoe
- This topic is resolved
call register form via php tag
-
- Posted 2 years ago #
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 :) -
- Posted 2 years ago #
There isn't exactly as counterpart to
login_form()for registering because it's not expected to be embedded I guess. If you look underregister.phpthough, you can see the internal function template call isbb_load_template( 'register.php', $_globals );where$_globalsare set earlier in the page before some code that handles the form output (ignore them at your own peril).The
register.phptemplate 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.
-
- Posted 2 years ago #
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
-
- Posted 2 years ago #
ah alright i see,
thank's for the clear explanation kawauso, sounds plausible, thank's olaf.see you around :)
-
- Posted 2 years ago #
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:
in header.php (inside head).<script> function bb_get_sidebar() { bb_load_template( 'sidebar.php' ); } </script>2.
<?php bb_get_sidebar(); ?>(inside body).but no success, what am I doing wrong? :(
-
- Posted 2 years ago #
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 infunctions.php. You might have to register template files though, but I'm not sure. -
- Posted 2 years ago #
I think a sitewide form is easier to integrate using the full code inside the functions.php file (like comment list on wordpress)
-
- Posted 2 years ago #
i see i see! i have a lot to learn.
ok thank's kawauso and olaf, it's been a pleasure... as always :)
-
You must log in to post.