2 yabba Aug 03, 2008 10:05

Thanks for your info, but...
¥åßßå wrote:
2 solutions :
1) hack the core files to display your TOC and check for "I agree"
a) skins_adm/login_reg_form.main.php
b) htsrv/register.php2) Create a plugin that hooks into DisplayRegisterFormFieldset() && RegisterFormSent()
¥
Okay, 1) Where in files a) and b) do I do this? These files do no separate form from function. Where do I find the place to put my TOC and how do I add an "I agree" link, etc? [also the a) link is: skins_adm/login/login_reg_form.main.php]
2) Create a plugin? I'm not a programmer. How do I do this? What do I do? Where do I start?
I wouldn't be asking this question if I were able to do those kind of things... I need some real help here.
Thanks
1) ... urm, you'd pretty much want to be hacking those files around the area that the plugin hooks are .... hmmmm, not helpful .... ok, for your TOS ++ checkbox ( don't forget it's login/ :p ) ... find this and play with the changes to reflect what you need
$Plugins->trigger_event( 'DisplayRegisterFormFieldset', array( 'Form' => & $Form ) );
/* start hacking */
?><p>Tick the box to say you agree with me or I'll fry your cpu :|
( don't forget that should be in a 'label' tag )
<input type="checkbox" name="the_fool_agreed" id="summat_that_matches 'label'" /></p>
<?php
/* whatever you do, don't touch anything after here or your server will be fried by lil' green men in 60's suits :| */
$Form->buttons_input( array( array('name'=>'submit', 'value'=>T_('Register!'), 'class'=>'ActionInput') ) );
Then you'd need to check for your checkbox in the file I got the right location of ;)
switch( $action )
{
case 'register':
/*
* Do the registration:
*/
param( 'pass1', 'string', '' );
param( 'pass2', 'string', '' );
// Call plugin event to allow catching input in general and validating own things from DisplayRegisterFormFieldset event
$Plugins->trigger_event( 'RegisterFormSent', array(
'login' => & $login,
'email' => & $email,
'locale' => & $locale,
'pass1' => & $pass1,
'pass2' => & $pass2,
) );
/* start hack */
if( !param('urm_the_same_name_as_the_checkbox', 'boolean' ) )
{ // the heathens don't agree with us !!!! banish their tarnished hides!
$Messages->add( T_('You arse :|' ), 'error' );
}
/* you can stop now, they've gone */
if( $Messages->count( 'error' ) )
{ // a Plugin has added an error
break;
}
2) Urm ... that'd be the long and complicated answer that would be faster for me to code than answer ;)
¥
2 solutions :
1) hack the core files to display your TOC and check for "I agree"
a) skins_adm/login_reg_form.main.php
b) htsrv/register.php
2) Create a plugin that hooks into DisplayRegisterFormFieldset() && RegisterFormSent()
¥