51
jilong
Re: Registration Extra fields?
  • 2007/1/18 14:09

  • jilong

  • Just popping in

  • Posts: 61

  • Since: 2007/1/10


Actually i did all this,but the registration page only show me a step title without any field for me to fill in.

Quote:
1. I go to "premission" set all field to visible to everyone.

2. I go to "Registration Step", i add in 2 step Personal information and Education information

3. I go to "Field", click into every field and set assign it to show in registration form step.

4. Create the redirect in userinfo.php
[quote]
$uid = intval($_GET['uid']);
if ($uid <= 0) {
redirect_header('index.php', 3, _US_SELECTNG);
exit();

}
redirect_header(XOOPS_URL.'/modules/smartprofile/userinfo.php?uid='.$uid, 0, 'Redirecting To Profile');
header('Location: '.XOOPS_URL.'/modules/smartprofile/userinfo.php?uid='.$uid);
exit();



5. Edit the user menu 'edit account' url in root/modules/system/templates/blocks/system_blocks_user.html
Quote:

a href="<{$xoops_url}/modules/smartprofile/edituser.php"> <{$block.lang_editaccount}></ a>



6. Edit the user menu 'edit account' url in root/modules/system/templates/blocks/system_block_login.html
Quote:

a href="<{$xoops_url}>/modules/smartprofile/register.php"><{$block.lang_registernow}></a>

52
ccdoss
Re: Registration Extra fields?
  • 2007/1/18 22:58

  • ccdoss

  • Just popping in

  • Posts: 9

  • Since: 2006/12/21


I have posted several questions, but have not gotten any responses. Am I asking the wrong questions or something? Could someone please let me know how to change the order on the forms, so that I could have First name, last name, then username, password, vpassword, etc? By default, it has uname, pass, vpass, e-mail first. Also, I'd like to add a State drop-down. How is this done?

53
jilong
Re: Registration Extra fields?
  • 2007/1/19 4:04

  • jilong

  • Just popping in

  • Posts: 61

  • Since: 2007/1/10


i think you have to assign a weight for each field.
like first name to 1, second name to 2,

54
sinablack
Re: Registration Extra fields?
  • 2007/1/19 8:51

  • sinablack

  • Just popping in

  • Posts: 41

  • Since: 2007/1/12


well dear ccdoss like jilong said you have to give a weight for each field by the admins side and field managing part!!!
and about your question jilong:
i have no idea about how to show fields on user info page but i`ll have look for you and try to find an answer for it
and the other question vaughan answered it and i have the same answer but i think there will be a new release of this module cause there is a bug for this action and on that release it will be fixed!!!
Soon we must all face the choose between what is good to US and what is the truth!!!
300 the movie

55
ccdoss
Re: Registration Extra fields?
  • 2007/1/19 17:10

  • ccdoss

  • Just popping in

  • Posts: 9

  • Since: 2006/12/21


I've assigned them a weight of 1,2 etc. However, the other things are still above them. I even gave them a weight of -1, and the username, passwd, vpasswd, e-mail were still above them. Could you show me a link to your registration page, so I could see what's possible?

56
sinablack
Re: Registration Extra fields?
  • 2007/1/19 20:58

  • sinablack

  • Just popping in

  • Posts: 41

  • Since: 2007/1/12


well these fields witch you want to change their place have a default place so it means that you can`t change their place but the other fields you can change them pretty good!!!
Soon we must all face the choose between what is good to US and what is the truth!!!
300 the movie

57
TheFinni
Re: Registration Extra fields?
  • 2007/1/22 19:44

  • TheFinni

  • Just popping in

  • Posts: 75

  • Since: 2003/11/25


I couldn't get any fields showing in the registration form either...So I had to try come up with a fix.

I'm using the PHP 4 adapted version found on xoobs.net

What I did to get the fields to work is the following:

In the modules/smartprofile/register.php assign() function it seemed like the "$tpl" var wasn't passed forward as "$xoopsTpl" (don't know the technical language).

So what I did in the function was simply to add "global $xoopsTpl;" and then change the $tpl->assign to $xoopsTpl->assign

The function now looks as following:

function assign($form$tpl) {
global 
$xoopsTpl;
    
$i 0;
    
$elements = array();
    foreach ( 
$form->getElements() as $ele ) {
        if (
is_a($ele,'XoopsFormElement')) {
            
$n = ($ele->getName() != "") ? $ele->getName() : $i;
            
$elements[$n]['name']      = $ele->getName();
            
$elements[$n]['caption']  = $ele->getCaption();
            
$elements[$n]['body']      = $ele->render();
            
$elements[$n]['hidden']      = $ele->isHidden();
            if (
$ele->getDescription() != '') {
                
$elements[$n]['description']  = $ele->getDescription();
            }
        }
        
$i++;
    }
    
$js $form->renderValidationJS();
    
$xoopsTpl->assign($form->getName(), array('title' => $form->getTitle(), 'name' => $form->getName(), 'action' => $form->getAction(),  'method' => $form->getMethod(), 'extra' => 'onsubmit="return xoopsFormValidate_'.$form->getName().'();"'.$form->getExtra(), 'javascript' => $js'elements' => $elements));
}


and now the fields are showing up properly in the registration form.

58
liture
Re: Registration Extra fields?
  • 2007/1/28 10:24

  • liture

  • Just popping in

  • Posts: 42

  • Since: 2005/8/10


your solution works like a charm, thank you all for this great effot, this part of XOOPS was a huge black hole, now at least there is a valid solution

59
theFrenchGuy
Re: Registration Extra fields?

I use smartprofile in my XOOPS site. In my website, I've 3 differents groups and I wanna create one registration form for each one. How I can do that ?

I would like, if an user click on group A link (the registation link), he access to the registration form for the group A (When he validate the form, he will be automatically added into the group A). Or if he click on group B link, he get to the registration form for the group B.

I'm not sure to be clear. If i'm not, tell me where it's ambiguous

Thx

60
vaughan
Re: Registration Extra fields?
  • 2007/1/28 13:45

  • vaughan

  • Friend of XOOPS

  • Posts: 680

  • Since: 2005/11/26


Quote:

theFrenchGuy wrote:
I use smartprofile in my XOOPS site. In my website, I've 3 differents groups and I wanna create one registration form for each one. How I can do that ?

I would like, if an user click on group A link (the registation link), he access to the registration form for the group A (When he validate the form, he will be automatically added into the group A). Or if he click on group B link, he get to the registration form for the group B.

I'm not sure to be clear. If i'm not, tell me where it's ambiguous

Thx


that's not possible to do with this module. there's a hack called registration codes which has the possibility to assign registrations to a particular group based on a code (like a promotion code) that the user enters on registration. but having seperate registration forms has not been done.

it would be possible to do but would require some major rewriting of the module.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

67 user(s) are online (37 user(s) are browsing Support Forums)


Members: 0


Guests: 67


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits