vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to deal with custom user permissions? (https://vborg.vbsupport.ru/showthread.php?t=106885)

daFish 02-01-2006 09:27 AM

How to deal with custom user permissions?
 
Hi all,

after searching the forum for a couple of time, I wasn't able to find information about my question.
So here we go:

I'm adding a new Yes/No-row via plugins in the user management page in admincp (print_yes_no_row()).
But how can I change the checked status for this item when getting the userdata out of the user table?
It shows currently 'Yes', independet from the value of the tablecolumn.
Maybe its simple, but I didn't got the trick yet.

Best regards,
daFish

daFish 02-06-2006 10:28 AM

Does no one have an idea?

Marco van Herwaarden 02-06-2006 10:32 AM

Şorry not really getting what you are asking. Where do you want to retrieve the value? Maybe some snippets of your code.

harmor19 02-06-2006 12:54 PM

The way I think you have it set up is that you have a list of usernames.
When you click on the username you're passing the userid through the url, correct?.

If so make a query on the user's table where userid = $_GET[userid] (I don't know the secure one off hand) above the form_start where radio button is.

Assuming you're using $row['status']

Here's an example radio button

PHP Code:

print_yes_no_row($vbphrase['phrase'], 'some_name'$row['status']); 

If $row['status'] equals "1" then "Yes" will be checked.
If it equals "0" then "No" will be checked.


All times are GMT. The time now is 07:18 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.01088 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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