11
ALFA-FOXTROT
Re: Adding Fields in Registration

WEll.. its posted in a FAQ to explain what it dows and how to install... anyway... ill post here everything i posted there...

-----------------------------------------------------------
This hack adds new fields in the registration the view/edit profile, ADMIN EDIT USER and saves to the DB.
Almost all fields are in comboBox so that the user doesnt have the chance of writhing anything else...

+ Info :
- Creates new fieds in DB and on the view/edit profile, ADMIN EDIT USER.
- BIRTHDAY
- Horoscope(Combo Box)
- Age
- Sex (Combo Box)
- Cívil Estate (Combo Box)- Sngle, Married, Confidential etc...

- Thanks for all the help that may come from other users, code and imrpovements! - THis hack only has a prob. it doesnt calculate automaticly the Age and Horoscope (working on That, help needed since im a newbie on php working slow...)

-----------------------------------------------------------------------------

+ instalation :
- Back up all files that are going to be changed!
- Decompress flies to your site.
- Go to phpMyAdmin > Your DB > SQL > Importe alfa-sql*

*Case import doesnt work, create manually the fields same name.

-----------------------------------------------------------------------------

Files being changed:

\edituser.php
\userinfo.php
\register.php
\kernel\user.php
\class\xoopsformloader.php
\class\xoopslists.php
\include\registerform.php
\modules\system\templates\system_userinfo.html
\modules\system\admin\users\userform.php
\modules\system\admin\users\main.php
\modules\system\admin\users\users.php
\modules\system\language\Your LANGUAGE\admin\users.php

added +3 files:

\class\xoopsform\formselectestadoc.php
\class\xoopsform\formselectlocalidade.php
\class\xoopsform\formselectsignos.php

ScreenShoots: In this screenshoots only the new fields appear but the ICQ,AIM,YIM are there also... only need to uncoment them in the register.php, userinfo.php, templates/system_userinfo.php remove //...

Register

Resized Image

Confimation

Resized Image

View Account

Resized Image

Admin User Account

Resized Image

Hope u like....

Download: ALFA-FOXTROT REGISTER MOD v.0.2 ALFA-FOXTROT REGISTER MOD v.0.2

TO change the options in the COMBOBOXES to your language, go to \class\xoopslists.php and edit!

ANy Questions just ask, try to solve the problem



12
ALFA-FOXTROT
Re: Adding Fields in Registration

Do you kwon were is the module for download?



13
ALFA-FOXTROT
Re: anniversaire integration in user menu....

Rough translation but here it goes...

NSTALLATION:

1° stage:

- unzip everthing to the root of your site
- activate, and the admin has to check the accesses of the groups.

2° stage:

that if you want to have a bond in the Menu of the member
- ouvrer the file system_blocks.php in the repertory modules/system/blocks
- in the function b_system_user_show() towards line 48 to add

/////////////////after this line/////////////////////
$block['content'] = "<strong><big>·</big></strong>&nbsp;<a href='".XOOPS_URL."/user.php'>"._MB_SYSTEM_VACNT."</a><br />";

////////////////the following code///////////////////////////

$block['content'] = "<strong><big>·</big></strong>&nbsp;<a href='".XOOPS_URL."/modules/anni/'>Anniversaire</a><br />";

- and it is good!

IMPORTANT:

The problem of this system is that you will have the block all the time on your site even if there is no birthday the day in question!

FEATURES:

Resolution of this problem and improvement of the design!



14
ALFA-FOXTROT
Re: Adding Fields in Registration

well, I Didnt understand very well what you mean... But if you wanna create a new field without touching the DB...just change the Language... I mean the, change the translation in the language file... just change a field that you think that it will not be required and change the name... the data will be saved anyway...



15
ALFA-FOXTROT
Re: Adding Fields in Registration

Thanks... :)))

Xoops4u! :)))



16
ALFA-FOXTROT
Re: Adding Fields in Registration

Ok... but if you dont wanna install my Hack...

Ill try to explain what u have to do....

You will have to touch 2 files:

/include/registerform.php
register.php

Backup these files!

Let's start ...

In /include/registerform.php

Look for line 75 (like in the image)

Resized Image




And add the following line after that line:


$reg_form->addElement(new XoopsFormText(_US_REALNAME"name"2625$name), true);


At the end of the line where you have TRUE, you can change it to FALSE if you do not wish the field to be required for registration.

You can save and close the file.

Lets Edit Register.php:

Look for line 150 (like in the image):

Resized Image









And add the following line after that line:

<INPUT type=hidden value='".$myts->makeTboxData4PreviewInForm($name)."' name=name>


Save and close the file! ITS DONE!

In Case you whant the confirmation... Open the file register.PHP

At line 131 you have:

$uname trim($uname);


Add this line rigth after it:

$nametrim($name);


To end this...

At line 139 you have:

echo _US_USERNAME.": ".$myts->makeTboxData4Preview($uname)."<br />";

Add this line rigth after it:
echo _US_REALNAME.": ".$myts->makeTboxData4Preview($name)."<br />";


HEHEHHE SAVE AND EXIT!

Credits to topet05 from: www.xoops.net.br



17
ALFA-FOXTROT
Re: Adding Fields in Registration

Well, I have created a hack that adds more options to the registration, including the Real Name...

My Hack can be check out @

www.xoops.net.br

Well, It adds news filds also to the DB, Like Horoscope, AGE, Date of Birth, Location and Civil State(I think this is the name in english), some of these options with comboBoxes. Check out the screenShoots...
In Case you need any help please post...

Oh... by the way the fields that you Whant .. Realname is already activated you will only need to comment what o dont need and uncoment what u need...



18
ALFA-FOXTROT
COMPLETE!

Well I completed the transformation, but now i included ComboBoxes for the options I above mentioned, so that user dont abuse of what they rigth on the site...

I made it required at registration, but the old members most go to their "edit Account" to change, still didnt find a way to redirect them immediatly upon next login to the edit account while they dont change the new settings...

Anyway, I leave here the download so that people can see...
Just backup the files that are going to be swicthed so that u can put your site as it was...

DOWNLOAD

Any help is wellcomed...
My next step is trying to create a field in the DB for this propose and module(Im trying to create a site for the comunity were i live and so that the people that live here can meet)... (im still a newbie in PHP, so 4 the leets what i did is nothing special... :[ )

Well I Hope to hear some comments on what i did...

Thanks...



19
ALFA-FOXTROT
COMPLETE!

Well I completed the transformation, but now i included ComboBoxes for the options I above mentioned, so that user dont abuse of what they rigth on the site...

I made it required at registration, but the old members most go to their "edit Account" to change, still didnt find a way to redirect them immediatly upon next login to the edit account while they dont change the new settings...

Anyway, I leave here the download so that people can see...
Just backup the files that are going to be swicthed so that u can put your site as it was...

DOWNLOAD

Any help is wellcomed...
My next step is trying to create a field in the DB for this propose and module(Im trying to create a site for the comunity were i live and so that the people that live here can meet)... (im still a newbie in PHP, so 4 the leets what i did is nothing special... :[ )

Well I Hope to hear some comments on what i did...

Thanks...



20
ALFA-FOXTROT
IS this a SUPPORT FORUM?!

Well, do i get any support or is this post like many others, without response?!





TopTop
« 1 (2) 3 »



Login

Who's Online

155 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

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

Latest GitHub Commits