MyBB Community Forums

Full Version: User profiles and options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello all,

I have a support-request, enhancements, modification-request...call it what you will but I am in need of help.

Running a system that is FAR more than just a forum, brings it's own level of complexities. So far we've been able to get around most of our problems with this system, but I am starting to face a new kind of problem.

We have basically amended the dbase-schema to include physical-address-fields in the users-table, and continued with a whole host of our own custom-fields in the appropriate table userfields.
So far so good, but our recent additions have brought up a new problem.
I added a good block of new permission -fields that define the preferred contact-method, various permission-flags based on the content etc......
The end result is that I have about 80 different fields in the userfields-table for each member. A hefty chunk of these are hidden admin-only type of fields, but most of them not...they have to be editable by the users.

So....since our website is designed on 800x600 template and the forum is only embedded inside a master-template inside this 800x600 template...I am running out of space... Since the userprofile makes little distinction between the different userfields (they are pretty much called in as a single block), this makes the user profile REEAAAALLLLY long vertically...

So basically I would LOVE to have a system in place that allows you to identify a 'subsegment' for each FID in the system, then you could in the templates call each of the subsegments individually and place them in the appropriate blocks. Since the template-system already allows for great flexibility when it comes to layout, I could easily put together a template that splits the 80 or so userfields into 10 or 20 blocks....and then just arrange the blocks with appropriate headers into 2 or 3 columns or even across multiple pages...

I hope my question/plea for help/request is coherent and looking forwards to hearing suggestions.

cheers,
Kimmo
uhmmm....no comments? should I move to the requests with this one? or pay someone to develop me the code?
hmm...no comments....
let me rephrase then.....can someone then talk me through how I can call individual fidxx-fields in the templates rather than the entire block?...basically could create a new template for this...
I know this would mean that by adding a new customfield, I would also have to manually edit the template to include it in the profile....but should be doable right? or am I missing something.

Kimmo

PS. Feel free to move this to mod-requests where I actually think this more belongs to....
can someone move this to requests where I hope it would get more attention...
Big Grin i have no idea what you talked about but it seems rather complicated Big Grin good luck
well.....to put a long story short...
I want to rewrite the usertable and have a capability to call the custom profilefields individually in the template rather than as one block...
anyone?? please?

I don't know how to simplify this more.
Currently if you look into the templates, you will find something like $userfields. This will basically splash all the custom-fields in one block. All fine and dandy as long as you have limited amount of custom fields. I have 80.

So I would like to create new templates for editprofile and memberprofile where the template itself does NOT call for $userfields but rather something like $user->fid[30] or $user->fid[80] inside my own template

This way I could avoid getting a memberprofile-page that has a mile long one column.....I could also group my userfields better (keep my permission-fields together, contact-details -fields together, preferences together etc.).

I don't even need anyone to write the template for me....just tell me how I can call for those individual fields in the templates! And yes, I do realize that if I use the admincp to create a new userfield, I would have to now manually add it to the templates.

cheers,
Kimmo
Ok, I think I have a solution. A quick and dirty solution none the less.

In member.php
Find and Remove:
$customfields = '';

Find:
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
Replace with:
eval("\$customfields[$customfield[fid]] = \"".$templates->get("member_profile_customfields_field")."\";");

Then in *Your Template Set* -> member_profile_customfields
Find:
{$customfields}
Replace with:
{$customfields['30']}
{$customfields['80']}

I think that's everything, if not then I'll have a look see tomorrow. Smile
I've thought about it, and I think the best way to solve this is to introduce categories like we use for templates. Have each category display on its own page. This way, you only alter the template once instead of every time you add a new custom profile field.
thanks Christian, I will be trying this soonish...
laie....I am intrigued...I would be quite interested in this but will this category work for standard user-fields as well? not only for records in the userfields-table? for example, the user-table has a field for email, msn yahoo...I've also added manually a field for SKYPE...but because it is a field of my own, it is in the userfields-table. So if I do categorization, I would naturally all these email, IM and other comms-type fields I've added (phone, fax etc) to show up under one category regardless of which table the data is stored in (user- or userfields-table...even though I've got also normalized pointers in the user-table to other reference-tables of my own...but I can tackle that separately)

cheers,
Kimmo
Pages: 1 2