vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Quick question on Users Awaiting Moderation customization (https://vborg.vbsupport.ru/showthread.php?t=145150)

HMBeaty 04-18-2007 02:23 AM

Quick question on Users Awaiting Moderation customization
 
I am currently in the process of customizing the "Users Awaiting Moderation" in the admincp where it lists the users User Name, Email, and IP.

I am in the process of adding a couple of fields on it and stuck on the Age portion.

I looked in the postbit to grab and show you what I'm looking for. In this portion of code
HTML Code:

<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
How and where is the $post[age] called?

I can't get the age to show up.

So far, I have this in my admincp/user.php file
PHP Code:

        print_table_header($vbphrase['users_awaiting_moderation'], 5);
        
print_cells_row(array(
            
$vbphrase['age'],
            
$vbphrase['username'],
            
$vbphrase['email'],
            
$vbphrase['ip_address'],
            
"<input type=\"button\" class=\"button\" value=\"" $vbphrase['accept_all'] . "\" 

onclick=\"js_check_radio(1)\" />
            <input type=\"button\" class=\"button\" value=\"" 
$vbphrase['delete_all'] . "\" 

onclick=\"js_check_radio(-1)\" />
            <input type=\"button\" class=\"button\" value=\"" 
$vbphrase['ignore_all'] . "\" 

onclick=\"js_check_radio(0)\" />"
        
), 0'thead', -3);
        while (
$user $db->fetch_array($users))
        {
            
$cell = array();
            
$cell[] = "$user[age]";
            
$cell[] = "<a href=\"user.php?" $vbulletin->session->vars['sessionurl'] . "do=edit&amp;u=$user

[userid]\" target=\"_user\"><b>
$user[username]</b></a>";
            
$cell[] = "<a href=\"mailto:$user[email]\">$user[email]</a>";
            
$cell[] = "<a href=\"usertools.php?" $vbulletin->session->vars['sessionurl'] . 

"do=doips&amp;depth=2&amp;ipaddress=$user[ipaddress]&amp;hash=" CP_SESSIONHASH "\" target=\"_user\">$user[ipaddress]

</a>"


Any help on this will be greatly appreciated.

Thanks

It's probably something obvious I'm looking over. It's late and I can't think clearly

Kungfu 04-18-2007 02:51 AM

its probably not $post['age'] its most likely something like $post['field2']

HMBeaty 04-18-2007 03:03 AM

No, because field2 is location

Dismounted 04-18-2007 05:18 AM

$post['age'] is referring to the 'age' field of the user table.

HMBeaty 04-18-2007 06:47 PM

Quote:

Originally Posted by Dismounted (Post 1230231)
$post['age'] is referring to the 'age' field of the user table.

Yeah, I kinda figured that. But how do I get the age to show up? What do I need to add and where?

Dismounted 04-19-2007 05:09 AM

You need to query the database to retrieve the field.

HMBeaty 04-19-2007 07:27 PM

Ok, what do I need to add and where? I'm not very experienced with PHP or MySQL queries. Thanks for your responses :)

Dismounted 04-20-2007 08:42 AM

What do you currently have as your query with $users as the variable?


All times are GMT. The time now is 11:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01692 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete