MyBB Community Forums

Full Version: Custom profile fields question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hi all

first of all thanks for such a wonderful forum system, i am grateful for all of you


Well, here is my question:
i run a college related forum, so i want a custom profile field for year, meaning which year a user is in, ex: 1st year, 2nd year,...., graduated

so i understand this can be done via the ACP, the thing is, can it be so that every year i can update those fields but not one by one?
i mean all 1st years should be 2nd years, all third=> fourth and so on

but i am afraid my members would forget or dislike the extra hassle of updating this yearly (u don't know my members Big Grin)

Help would be appreciated, i searched and didn't find appropriate answers, i hope i am posting in the correct section

Thanks!
Well, as far as my understanding is of this, as they have to choose the original value themselves, there's no easy way of forcing a new value onto them.
You'd have to do this through SQL queries. Say your custom profile field has ID = 6, and your values are:
1st year
2nd year
3rd year
4th year
5th year and older

Then you would run the following queries
UPDATE mybb_userfields SET fid6='5th year and older' WHERE fid6='4th year'
UPDATE mybb_userfields SET fid6='4th year' WHERE fid6='3rd year'
UPDATE mybb_userfields SET fid6='3rd year' WHERE fid6='2nd year'
UPDATE mybb_userfields SET fid6='2nd year' WHERE fid6='1st year'

The easiest way to do this would be one by one in the above order in phpMyAdmin each year.
(2008-09-26, 08:32 PM)Matt_ Wrote: [ -> ]Well, as far as my understanding is of this, as they have to choose the original value themselves, there's no easy way of forcing a new value onto them.

thanks for your reply, i can make them put it once or even put it myself for them, but not every year Big Grin
thanks a lot anyway

(2008-09-26, 09:13 PM)DennisTT Wrote: [ -> ]You'd have to do this through SQL queries. Say your custom profile field has ID = 6, and your values are:
1st year
2nd year
3rd year
4th year
5th year and older

Then you would run the following queries
UPDATE mybb_userfields SET fid6='5th year and older' WHERE fid6='4th year'
UPDATE mybb_userfields SET fid6='4th year' WHERE fid6='3rd year'
UPDATE mybb_userfields SET fid6='3rd year' WHERE fid6='2nd year'
UPDATE mybb_userfields SET fid6='2nd year' WHERE fid6='1st year'

The easiest way to do this would be one by one in the above order in phpMyAdmin each year.

Thanks a million, that was exactly what i needed, really appreciated Smile
btw i use different table prefix, so i should put it instead of mybb_ , right?

sorry for being such a noob Blush
Yeah replace mybb_ with whatever your prefix is.
(2008-09-26, 10:16 PM)Matt_ Wrote: [ -> ]Yeah replace mybb_ with whatever your prefix is.

thanks again Cool
sorry but another question

can i send mass mail to for example 1st years only? i tried and couldn't do it in the ACP?
sorry, i wonder if someone would answer that, please? Shy
Currently I don't think it's possible without a modification/plugin. However, if you have all the 1st years in their own usergroup, then you could set the usergroup of the mass-mailing to the 1st years.
Yeah maybe putting the people from different years into different user groups would generally be a better way of sorting them, then you could manage each group separately for different things.
fine, so i understand that it's better if i make groups for each year, now how could i mass move them? i mean make all 1st years=>2nd years and so on?

would it be better if i make those groups secondary groups? i mean not selecting "Users can set this group as their display group "? right? and the user image of the secondary group would still be displayed?


sorry for troubling you with a lot of questions, thanks Smile
Pages: 1 2