vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   $vbulletin->userinfo['fieldxx'] (https://vborg.vbsupport.ru/showthread.php?t=274586)

TTayfun 11-24-2011 06:30 PM

$vbulletin->userinfo['fieldxx']
 
Hi guys,
i tried something for this link but i could not. Look,

i created userfield as radiobuttons and options: yes and no i want change userfield with link.
i must write some code at misc_start hooks.

i want when
Code:

misc.php?do=changefield&message=yes
then field of user will be = yes

i wrote some codes but not worked:

PHP Code:

global $vbulletin;
                if((
$_REQUEST['do']=='changefield'))
$message=strtolower(trim($_REQUEST['message']));
                        if(
$message=='yes')
{
$vbulletin->userinfo['field14'] === 'yes';
}

if(
$_SERVER['HTTP_REFERER']!='')
                            
$vbulletin->url $_SERVER['HTTP_REFERER'];
                        else
                            
$vbulletin->url $vbulletin->options['bburl'];
                        eval(
print_standard_redirect('',false,false)); 


Lynne 11-25-2011 05:06 PM

You are trying to change a field based on what is in the URL? If you are going to change the field, you would need to access the database and update it.

TTayfun 11-26-2011 10:14 AM

yes i want change field with url. how do access the database and update it? i could not insert in plugin (in plugin)

Lynne 11-26-2011 04:06 PM

You would need to first clean the variable and then write a query to update it.

https://vborg.vbsupport.ru/showthrea...hlight=cleaner

If you look at most any of the php files, you'll see examples of how to do this.


All times are GMT. The time now is 02:13 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.01011 seconds
  • Memory Usage 1,722KB
  • 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_code_printable
  • (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