Log in

View Full Version : Profile.php update cvs questions


Andy
07-15-2005, 03:34 AM
I'd like to update my profile.php file according to this bug report:

http://www.vbulletin.com/forum/bugs35.php?do=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

--- 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
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 ;


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


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


// 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 ;


// 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
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.