View Full Version : $vbulletin->GPC
dayzman
04-05-2008, 02:53 PM
Hi,
Does anyone know which function puts values into the $vbulletin->GPC array, i.e. the actual initialisation of the array. Thanks.
Michael
Opserty
04-05-2008, 03:10 PM
It stores cleaned input which has been passed through the vBulletin Input Cleaner.
Using the vBulletin Input Cleaner (https://vborg.vbsupport.ru/showthread.php?t=119372&highlight=Input+Cleaner)
What are you trying to do?
effeff70
01-15-2018, 07:35 PM
Even though this thread is quite old:
I am looking for an answer to dayzman's question. Why?
vbulletin preselects a certain value within certain dropdown boxes. For instancem when registering at a forum, within the 'showbirthday' dropdown list, the entry with value="2" is preselected.
This is a privacy concern! I would like to change this to the entry with value="0" being shown. Within register.php I found:
$sbselected = array($vbulletin->GPC['showbirthday'] => 'selected="selected"');
I concluded that the values I am looking for are to be found in the GPC Array. Well, that's where I am stuck and I would appreciate help with this.
Thanks.
The $vbulletin->GPC array contains all user input data that has been passed through the input "cleaner". ($_POST, $_GET, $_COOKIE) You sure you don't just want to make a template modification to change the default value of the showbirthday option?
effeff70
01-16-2018, 07:50 PM
I wasn't sure how chaging the template could possibly effect other functionallity (I am not a VB pro as you can tell by my question).
And since the values of the listbox is not a user input I thought...
Anyways: Enough on problems, let's focus on solutions! ;)
Where and how would I have to change which template in order to achieve a different pre-selection within the 'showbirthday' listbox?
It would probably be easier for you to modify the register.php file.
Look for the following in register.php:
// Default Birthday Privacy option to show all
if (empty($errorlist))
{
$sbselected = array(2 => 'selected="selected"');
}
And change that 2 to 0.
effeff70
01-17-2018, 06:25 AM
...it's so simple when you know what to look for! ;-)
Thanks for your help.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.