Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Registration Mod 6.4

Description: This adds several profile fields to the newuser registration page, so that upon registration, you have a more complete profile. It adds: Homepage, Occupation, Hobbies, Geographic Location, Bio, ICQ Number, Custom1, Custom2, Custom3, Custom4, and let's them give a URL to their picture, upload a picture, or (if enabled) choose a stock avatar.

It requires the Occupation, Hobbies, Location and the 4 extra fields to be complete in order to register, as well as either an uploaded photo, URL or stock avatar.

Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites: UBB.Threads 6.4 or 6.4.1

Author(s): JoshPet

Date: 01/12/04

Credits: Commissioned by DonJulio from www.laondalatina.com

Files Altered: newuser.php, newuser_signup.tmpl, adduser.php

New Files: none

Database Altered: none

Info/Instructions: Note: Since the 4 extra fields are required, you must activate them in your config file or nobody will be able to register.

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
104955-registrationmod6.4.txt (0 Bytes, 123 downloads)

Last edited by JoshPet; 01/27/2004 2:20 AM.
Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thank You ! This should be the last one because I recall something like the being planned for 6.5

Last edited by donJulio; 01/13/2004 12:29 PM.
Joined: Sep 2000
Posts: 49
Power User
Power User
Offline
Joined: Sep 2000
Posts: 49
Hi Josh:

I get this error when I go to the new user page:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/site/public_html/ubbthreads/newuser.php on line 215


My line 214 and 215 is this:
// Send the page to them
$html -> send_header($ubbt_lang['NEW_USER'],$Cat,0,0,0,0);


Any ideas?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You must have missed a line above there somewhere. Usually a } or { will throw the whole thing off.

I've checked the instructions, copy & paste with 6.4.1, so I think they are fine. Just make sure you didn't leave something out.

Joined: Sep 2000
Posts: 49
Power User
Power User
Offline
Joined: Sep 2000
Posts: 49
I found the problem (-- mine mostly!):

Your instructions tell us to open newuser.php, and...

[:"red"]
Find this:

// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
[/]

Unfortunately, that exact coding exists in TWO PLACES in that file (line 127 and line 207). My search naturally found the first such occurrence of it, but your mod requires the SECOND occurrence of it to be changed.

I normally check that when I hit a snag, but I neglected to this time. Anyway, I'm sure everyone will hit this same one unless you cahnge the instructions a tad.

Thanks Josh -- I like this mod.

Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
[] Description: This adds several profile fields to the newuser registration page, so that upon registration, you have a more complete profile. It adds: Homepage, Occupation, Hobbies, Geographic Location, Bio, ICQ Number, Custom1, Custom2, Custom3, Custom4, and let's them give a URL to their picture, upload a picture, or (if enabled) choose a stock avatar. [/]

Where's the part about the choosing a stock avatar? Look at mine right here:
http://www.laondalatina.com/foros/newuser.php
The part about being able to choose a stock avatar is the part that's missing (not to mention being the coolest part). Is it in the script but just missing from the template? It says in the above quote that it can be done if enabled, but I don't see how to enable it. I checked the instructions, and there is no mention of this feature in the mod:
[] Description: This adds several profile fields to the newuser registration
page, so that upon registration, you have a more complete profile.
It adds: Homepage, Occupation, Hobbies, Geographic Location, Bio,
ICQ Number, Custom 1, Custom2, Custom3, Custom4, and let's them give a URL
to their picture, or upload a picture (if you have the picture upload option on).

It requires the Occupation, Hobbies, Location and the 4 extra fields to be
complete, as well as they must either upload a picture, or supply a URL. [/]

Please help Josh!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
It's enabled from the threads config file.

Have you turned on the ability for people to use stock avatars in your config file?

I think it's off by default in 6.4.

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
OK. I'll look into it
EDIT:
I turned this on:
Allow users to choose from a predefined set of avatars for their picture?

And it still looks the same. Am I missing something else?
http://www.laondalatina.com/foros/newuser.php
BTW: On the last one you did for me, 6.3, there were some changes to a language file, but I didn't see any of that for this version. I don't think that is the problem though...

Last edited by donJulio; 01/15/2004 2:16 PM.
Joined: Sep 2000
Posts: 49
Power User
Power User
Offline
Joined: Sep 2000
Posts: 49
Same prob here.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK - sorry , my mistake.

Indeed in the template:

Below this:

$tictureviw


You need to add this:

$stockavatar

I'll fix the directions.

Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thanks for the fix Josh. This is sooooo sweet!

Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
This is fantastic.. however..

I think there are a few too many compulsory fields, not everyone has a homepage etc.. so how do we go about only making some of those fields compulsory ?

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Homepage isn't compulsory in this mod. However take a look at this snippet of the instructions for the adduser.php:
[] // ------------------------------------------------------------
// If all required info is not filled in, then we can't proceed
if(((!$Loginname)||(!$Displayname)||(!$Email)||($agree != "yes")||(!$Occupation)||(!$Hobbies)||(!$Location)||(!$Extra2)||(!$Extra3)||(!$Extra4)||(!$Extra5)) || ((!$Picture) && (!isset($HTTP_POST_FILES['userfile']['name'])) && (!$avurl))){
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
} [/]

I no next to little about PHP, but I'm pretty sure that's where you can change which fields are required OK, I admit it, I read Josh's comment

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
[]deltajo said:
I found the problem (-- mine mostly!):

Your instructions tell us to open newuser.php, and...

[:"red"]
Find this:

// ---------------------
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
[/]

Unfortunately, that exact coding exists in TWO PLACES in that file (line 127 and line 207). My search naturally found the first such occurrence of it, but your mod requires the SECOND occurrence of it to be changed.

I normally check that when I hit a snag, but I neglected to this time. Anyway, I'm sure everyone will hit this same one unless you cahnge the instructions a tad.

Thanks Josh -- I like this mod. [/]


Thank you - corrected the instructions.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
[]MattUK said:
This is fantastic.. however..

I think there are a few too many compulsory fields, not everyone has a homepage etc.. so how do we go about only making some of those fields compulsory ? [/]

I'd changed this portion of my adduser.php code from this hack:

// ------------------------------------------------------------
// If all required info is not filled in, then we can't proceed
if(((!$Loginname)||(!$Displayname)||(!$Email)||($agree != "yes")||(!$Occupation)||(!$Hobbies)||(!$Location)||(!$Extra2)||(!$Extra3)||(!$Extra4)||(!$Extra5)) || ((!$Picture) && (!isset($HTTP_POST_FILES['userfile']['name'])) && (!$avurl))){
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}


To:

// ------------------------------------------------------------
// EDITED VERSION OF THE HACK - If all required info is not filled in, then we can't proceed
if(((!$Loginname)||(!$Displayname)||(!$Email)||($agree != "yes")) || ((!$Picture) && (!isset($HTTP_POST_FILES['userfile']['name'])) && (!$avurl))){
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}


I don't want to require my members to have to fill out all the fields...but atleast I want them to have the option up front to fill them in.

Hope this may help you...

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, the field requirements are what I was commissioned to write. But you've got it nailed, you simply take them out of the check if you don't want that many fields required.

Joined: Apr 2003
Posts: 359
Enthusiast
Enthusiast
Joined: Apr 2003
Posts: 359
[]JoshPet said:
Yeah, the field requirements are what I was commissioned to write. But you've got it nailed, you simply take them out of the check if you don't want that many fields required. [/]



Thanks again for a well written hack Josh!

Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
Josh,

This is a great hack and it works well 99% of the time. But just today, someone registered on my Board and somehow by-passed many of the required fields. Since I installed this hack only one other person decided to avoid filling in the required fields with the information asked for by typing in "n/a", which although I didn't think someone would do, I can understand how that would permit the registration process to succeed. But this newest individual's profile shows nothing for most of the required fields; they are blank. My guess is that the fields were filled in initially, and then after logging in, this person deleted the information for those fields.

Is there anyway to prevent this from happening other than informing such individuals that unless they provide the information asked for they will not be permitted to have an account? []http://www.the-highway.com/Smileys/shrug.gif[/]

Jeff


Artificial Intelligence is no match for natural stupidity!
Joined: Apr 2002
Posts: 610
Code Monkey
Code Monkey
Joined: Apr 2002
Posts: 610
does it count spaces as filling it in? Maybe the hit the space bar a few times?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, it might be spaces - the standard check in threads is just that fields aren't empty.

But yeah - they could edit their profile and remove the info - unless you further modify changebasic.php to require this information when they edit their profile.

This mod doesn't alter the requirements for when a user edits their profile.

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I'm pretty sure it will look at spaces and put that into the database and accept the field as being filled, allowing registration to continue. I've already seen it several times on my site, where people are really only interested in the photo galleries and want to be members as soon as possible, so they don't put any effort into actually filling relevant info into the fields.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)