vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   useradmin_edit_column1 (https://vborg.vbsupport.ru/showthread.php?t=107593)

-=Sniper=- 02-09-2006 10:22 PM

useradmin_edit_column1
 
I was wondeirng if this was possible.

I have values in the admincp, seprated using line breaks (or by pressing enter)

e.g.
Monday
Tuesday

in the useradmin_edit_column1 plugin

I have this code

PHP Code:

print_select_row('My Day''user[days]'explode("\n",trim($vbulletin->options['days'])), $user[days]); 

I easily get the dropdown menu with all the days, however the one the user has, is not selected.

e.g.. I have the day "Monday" in my $user[days] field(contains the actual value "Monday"), but the above doesnt select it, it only lists all the days.

thanks

Andreas 02-09-2006 10:38 PM

The value needs to be 0-6

-=Sniper=- 02-09-2006 10:42 PM

Quote:

Originally Posted by Andreas
The value needs to be 0-6

sorry, but I don't understand what you mean? :squareeyed:

edit: if you mean in terms of days, it would be 0 to 6. But I don't have the integer value stored in the user[days] but the actual string "Monday", rather than 0 (for monday).

Marco van Herwaarden 02-10-2006 07:49 AM

It will use the array keys as the value to store:
0->Monday
1->Tuesday
etc..

The key gets stored, to display, you would need to take the key, and lookup the value in the array.

-=Sniper=- 02-10-2006 09:56 AM

Quote:

Originally Posted by MarcoH64
It will use the array keys as the value to store:
0->Monday
1->Tuesday
etc..

The key gets stored, to display, you would need to take the key, and lookup the value in the array.

yes thats possible, however looking the customfields which are added via admincp->userfields

when you select a value in a dropdown menu, the actual value is stored in the related userfield.

e.g. for the flags hack, the actual country name is stored rather than the key for it.

I hope you get what I mean?

Edit: ok, I got ot to work by adding a for_each_loop, now its time to make it save :)


All times are GMT. The time now is 03:26 PM.

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.00992 seconds
  • Memory Usage 1,724KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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