miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Adding new user profile field (Full name)

 
 
Page  Page 2 of 4:  « Previous  1  2  3  4  Next »

Author zorglub
Partaker
#16 | Posted: 15 Mar 2005 12:22 
All right ;)
I'm sorry I don't have much time to explain, I'll be ver busy for some time... For the next release, if you have time for it, try to add custom fields with radio buttons for instance that we could customize, keep the checked setting and so on...

I'll be back shortly ! Have nice coding guys ;) see you soon !

Author Anonymous
Guest
#17 | Posted: 25 May 2005 23:52 
Ive added a field in my users table called realname just below username.

Now everything is offset by 1.

Is there an "easy" modification I could do to make db_SimpleSelect function fetch associative arrays?

Author realitybytes
Partaker
#18 | Posted: 26 May 2005 01:29 
why not just add it at the end of the table?

Author Anonymous
Guest
#19 | Posted: 26 May 2005 02:21 
Because Im an "organized" "neat-freak".. But Im willing to do that.

But I would like to be able to add a field to the user prefs where they can change thier username but not thier realname... How would i add this field?

Author realitybytes
Partaker
#20 | Posted: 26 May 2005 02:50 
But I would like to be able to add a field to the user prefs where they can change thier username but not thier realname... How would i add this field?


Easy way or hard way.

easy way would be to use the existing field username as real name which is already configured so that it cannot be changed. Use your new table field as username.

Options for implemention could be addon, in the bb plugins file or you could work with the core itself. Obviously for future upgrades the less changes you make to the core the better. any changes you make to the core you should document, and any upgrades will require you to go through the code and check to see if your original changes will work with the new core, usually requires setting up a test server.

A problem I have run in to, as I have modified the original core quite a lot.

If you are confident with coding then modify the core, but I get the impression you would be better off using the plugin option.

you need to set out what it is you want exactly then work with

if (action=='registernew' or $action=='prefs')

then create the functions to perform. /

Also you will want to work with $_POST and $userTitle and the template user_dataform.html

The hardway will be to change the username functions so it can be edited and add your own new field and not allow it to be edited. Which I am not even going to bother looking in to as it will take to much time.

If you understand what I have provided which is only a basic overview you should be able to work on implementing it. If you need help and you provide some sample code I will be happy but I do not have time to write this feature for you.

Author Anonymous
Guest
#21 | Posted: 26 May 2005 03:21 
Yeah, Im pretty comfortable with PHP as I have been doing it for years. It all comes down to motivation.. Matter of fact, if it werent for my weakness with sessions & cookies, I would start something from scratch.

One problem with miniBB's code is that it was definitely not written for readability. Everything is bunched together with no indenting etc. This makes it really hard to read not to mention the ammount of scrolling that need to be to be done when looking around.

Ive always been one to quote everything (back to HTML again) and indent profusely. I cant even wonder how long it would take me to indent/bracketize all miniBB's code lol.

There are some nice techniques that I am learning from the miniBB code and some I will definitely change. the switch statement seems to be taboo here when it could definitely be used in come places (the action conditionals in index.php for one).

Damnest thing though, Ive already got thing almost the way I want it and again, its the motivation factor creeping in. and to be honest, it doesnt really need re-doing.. MiniBB is pretty good as it is.

One thing I have implemented is a "private" forum. Not a single passord entry but only for registered users. That means no matter what, you have to be logged in with your user/pw to even see the forums at all. I just replaced the protected forum stuff with user login stuff and checked for $user_id before the load_header..

Thanks for your help.

Author Team
8-)
#22 | Posted: 26 May 2005 12:58 
Anonymous - first of all, you NEED to add new fields ONLY to the end of table. Else you will break everything.

the switch statement seems to be taboo here when it could definitely be used in come places - switch statements used only in the admin panel, which is run not really often. In index.php, we are using "if then else" just because it is faster, than switch, statement, and it is organized so most frequent conditions appears on top, and script does not check further.

One thing I have implemented is a "private" forum. That means no matter what, you have to be logged in with your user/pw to even see the forums at all - it is really bad idea. If you are trying to close your forums from all aroung the world, like snail is closing in its sink, don't forget that Google and another anonymous search indexers will not index your forums.

One problem with miniBB's code is that it was definitely not written for readability. Everything is bunched together with no indenting etc. - Haven't your visual editor special "re-indent" menu? I think, most editors should have it, if you really need it. We are professional enough, so we don't need indenting. And - indenting will not help you, if you don't know the logics.

Author realitybytes
Partaker
#23 | Posted: 26 May 2005 16:06 
if you don't know the logics.

This is very true, and what you have suggested no matter how you implement it, it is going to have a big impact on the original coding for this board.

Here are some other thing you need to consider even once you have the fields setup and registration and editing processes working.

How will users be authenticated? Names can be the same so you have to authenticate with a unique field.

Names can change, in most cases surnames so do you really want it so users cannot edit this.

Allowing users to change username, could cause confusion if somebody has been posting under a given name, then changes and somebody else claims the first posters username. There will be noway to know who the original poster is from the end users perspective.

It can go on and on, after thinking some more on what you want to implement, It would probably be easier to create your own new templates and add in some complete new functions to get it to work correctly.

If you want these extra fields available outside of the forum, then I would use seperate tables, and your own scripts. Just write a simple addon so that users can enter/edit the field contents in the sign up/prefs form.

Whatever you decide it is not as straight cut as I initially thought. There is no easy way to implement it without creating a whole new problem that will need addressing.

Author realitybytes
Partaker
#24 | Posted: 26 May 2005 16:40 
If you change your mind so that the username stays the same, and the Name fields could be easily added with created insert update and select, sql commands in the plugins.

You could easily have it so the names cannot be edited if you want.

Author thi3f
Partaker
#25 | Posted: 1 Jul 2005 17:00 
Is it possible to change a user's title? Just the name that is.. Or even lets just say I .. kept me as Admin, all the others as members, but wanted to create a dumb .. title to throw on someone. I'm 99% sure I'd have to edit the user in the database.. but yah. Any help? (& sorry if this topic already exists)

Author Ivan
Advanced Member
#26 | Posted: 1 Jul 2005 18:07 
The user's name - only manually through phpMyAdmin, or whatever other database interface you use on your server. But this is for the user's name ONLY, and would be an exclusive case. For the user's title it's here:

https://www.minibb.com/forums/index.php?action=manual#userrankings

Eeehhh... nobody reads manuals today... :)

Author Simon_B
Partaker
#27 | Posted: 5 Sep 2005 22:56 
I've done the above mentioned and I've registred a new user, edited the preferences, but when I want to see the users profile I can't see the new field I've created.

How can that be?

Where do I have to add something for the field to be visible whe viewing users profiles?

Author Team
8-)
#28 | Posted: 6 Sep 2005 10:32 
I think, you need to add variable in language pack. Like $l_usrInfo[15] or whatever index you will have (RTFM for indexes).

Author Simon_B
Partaker
#29 | Posted: 6 Sep 2005 21:16 
I have done that already, and I can see the full name field when viewing my own profile, but when I want to see other users, I can't see the field.

Author Team
8-)
#30 | Posted: 6 Sep 2005 21:30 
Could you provide an example URL of it?

Page  Page 2 of 4:  « Previous  1  2  3  4  Next » 
Master Class miniBB Support Forums / Master Class /
 Adding new user profile field (Full name)
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑