If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
Self-register on a Textpattern site
This will simply add a bit of text and a link on the login page to let people know to register if they don’t already have a login.
(You can see it here on this site; if you are already logged in, you’ll need to log out to see the login page..)
If you’ve used Mod Self Register to make it possible for visitors to register themselves to add articles/edit your Textpattern site, you may find you’d like to add a bit of text on the login page, to let people know they can register on the site (and link them to the registration page). This is how I’ve been did mine:
- in your /textpattern directory, open up lang/en-gb.txt (or your other language files)
- add the following line (you may customize the text after the
=>
):need_a_login => Need a login? <a href="?event=register">Register</a>.
- open include\txp_auth.php and find
function doLoginForm($message)
and addtr( td().td(graf(gTxt('need_a_login'))) ).
in the proper spot so that the whole function turns out like so:// ------------------------------------------------------------- function doLoginForm($message) { global $txpcfg; include $txpcfg['txpath'].'/lib/txplib_head.php'; pagetop('log in'); echo form( startTable('edit'). tr( td().td(graf($message)) ). tr( fLabelCell('name').fInputCell('p_userid') ). tr( fLabelCell('password'). td(fInput('password','p_password','','edit')) ). tr( td().td(graf(checkbox('stay',1,1).gTxt('stay_logged_in'). popHelp('remember_login'))) ). tr( td().td(graf(gTxt('need_a_login'))) ). tr( fLabelCell('').td(fInput('submit','',gTxt('log_in_button'),'publish')) ). endTable() ); exit("</div></body></html>");
- all done
Note: These instructions are in regard to Textpattern RC1 / RC2.. and though they’ll probably work with earlier versions of Textpattern, I expect they will not work for RC3.