Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 15 Sep 2008, 02:46
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Real name: Patrick Connolly
Custom Profile Field in user.php

Hello! I'm trying to customize user.php in the admincp folder so that there are a few extra columns that show up while moderating new users. There are a couple of custom profile fields that need to be laboriously cross-checked before I allow folks to post, and it sure would be easier if they showed up on the main user moderation page. It would be even easier if I could get LDAP Authentication working, but that's a different story... grumble, mumble, etc.

Anyway, I know how to set it up and where to edit, but I can't seem to figure out what calls the contents of the custom field. I figured it would be $user[fieldX] or something, but that's not working. Any quick answers? I only know how to call it in a postbit, but I think this is different, if I understand correctly...

Thanks all!
Reply With Quote
  #2  
Old 15 Sep 2008, 02:53
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Are you making sure the fields are even available to be printed out right then? Did you modify a query to add them to the select statement?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 15 Sep 2008, 05:06
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Real name: Patrick Connolly
Oh dear. And this is where my amateur-ness shines through. I don't know PHP aside from the chunks I try to edit, so the grand structure is above me. Excuse me if my terminology is a little wonky, but how would I query info from a different table? In the user moderation section, all the info is queried from the "user" table, but the custom profile fields are in the "userfield" table. Is there an easy way to organize that so that I could get the userfield info into the $users array that all the other info is dumped in?

Drats. I don't make sense, do I?

Well thanks regardless Lynne!

--------------- Added 15 Sep 2008 at 06:43 ---------------

Alright, so I managed to learn a little PHP, and the parts I changed around were the query_read and $cell = array() bits... I'd love to hear your input as to whether this looks OK. Barring any unforeseen database explosions, I look forward to hearing from you


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by biome.pat; 15 Sep 2008 at 06:44. Reason: Auto-Merged DoublePost
Reply With Quote
  #4  
Old 15 Sep 2008, 16:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Well, simply looking at the code, it looks fine. Does it give you what you want? (Sometimes what I do is rename the page to something like user1.php and that way I'm not screwing up the page the mods are using.)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #5  
Old 16 Sep 2008, 00:13
biome.pat biome.pat is offline
 
Join Date: Aug 2008
Real name: Patrick Connolly
Yeah, it seems to be working great! I was just worried that somehow I would erase EVERYTHING somehow. Y'know... just "DATABASE GONE". I suppose that pretty hard to do with query_read, but still

Thanks again for getting me thinking in the right direction. This made the today's couple-hundred user moderations somewhat more manageable!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:55.

Layout Options | Width: Wide Color: