vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Profile.php update cvs questions (https://vborg.vbsupport.ru/showthread.php?t=92226)

Andy 07-15-2005 03:34 AM

Profile.php update cvs questions
 
I'd like to update my profile.php file according to this bug report:

http://www.vbulletin.com/forum/bugs3...view&bugid=686

but I don't understand how to interperit CVS. Here is the CVS code that needs to be changed in profile.php

Code:

--- vb3/profile.php        2005/07/12 14:18:20        1.360
+++ vb3/profile.php        2005/07/13 13:55:00        1.361
@@ -1091,6 +1091,7 @@ if ($_POST['do'] == 'updateoptions')
                'invisible' => TYPE_INT,
                'autosubscribe' => TYPE_INT,
                'options' => TYPE_ARRAY_BOOL,
+                'set_options' => TYPE_ARRAY_BOOL,
                'modifyavatar' => TYPE_NOCLEAN,
                'userfield' => TYPE_ARRAY
        ));
@@ -1107,15 +1108,11 @@ if ($_POST['do'] == 'updateoptions')
        // options bitfield
        foreach ($vbulletin->bf_misc_useroptions AS $key => $val)
        {
-                if (isset($vbulletin->GPC['options']["$key"]))
+                if (isset($vbulletin->GPC['options']["$key"]) OR isset($vbulletin->GPC['set_options']["$key"]))
                {
                        $value = $vbulletin->GPC['options']["$key"];
+                        $userdata->set_bitfield('options', $key, $value);
                }
-                else
-                {
-                        $value = $vbulletin->userinfo["$key"];
-                }
-                $userdata->set_bitfield('options', $key, $value);
        }
\ No newline at end of file

For example is the third line just pointing to the correct area in the profile.php ??

Paul M 07-15-2005 04:22 AM

Quote:

Originally Posted by Andy
but I don't understand how to interperit CVS. Here is the CVS code that needs to be changed in profile.php

I believe this means that ;

PHP Code:

        'invisible' => TYPE_INT,
        
'autosubscribe' => TYPE_INT,
        
'options' => TYPE_ARRAY_BOOL,
        
'modifyavatar' => TYPE_NOCLEAN,
        
'userfield' => TYPE_ARRAY 

becomes ;

PHP Code:

        'invisible' => TYPE_INT,
        
'autosubscribe' => TYPE_INT,
        
'options' => TYPE_ARRAY_BOOL,
        
'set_options' => TYPE_ARRAY_BOOL,
        
'modifyavatar' => TYPE_NOCLEAN,
        
'userfield' => TYPE_ARRAY 

and ;

PHP Code:

    // options bitfield
    
foreach ($vbulletin->bf_misc_useroptions AS $key => $val)
    {
        if (isset(
$vbulletin->GPC['options']["$key"]))
        {
            
$value $vbulletin->GPC['options']["$key"];
        }
        else
        {
            
$value $vbulletin->userinfo["$key"];
        }
        
$userdata->set_bitfield('options'$key$value);
    } 

becomes ;

PHP Code:

    // options bitfield
    
foreach ($vbulletin->bf_misc_useroptions AS $key => $val)
    {
        if (isset(
$vbulletin->GPC['options']["$key"]) OR isset($vbulletin->GPC['set_options']["$key"]))
        {
            
$value $vbulletin->GPC['options']["$key"];
            
$userdata->set_bitfield('options'$key$value);
        }
    } 

:)

Andy 07-15-2005 04:29 AM

Thanks Paul, that is how I interpreted it.

I made the changes and uploaded the updated profile.php and cleared cache, but it didn't work. I still can't change settings in my User CP > Edit Options > Visible Post Elements

Perhaps it has something to do with the modifyoptions template Freddie mentions at the bottom ?? I wish I knew what he means.

Paul M 07-15-2005 04:45 AM

Quote:

Originally Posted by Andy
Perhaps it has something to do with the modifyoptions template Freddie mentions at the bottom ?? I wish I knew what he means.

Yep, without the template changes it won't work, an extra field has been added to the input forum.

Andy 07-15-2005 04:57 AM

Thanks Paul.

I'm looking at the source page now, I just can't figure out where to make the changes. I will need to get a copy of the template modifyoptions.


All times are GMT. The time now is 02:17 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.01115 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)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