The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Getting URL out of submission code
In another thread there has been some discussion of creating a style chooser dropdown that actually updates the member's profile details.
We have achieved that part of it ok. It works like the existing style chooser, from a drop down list that then refreshes the page. That works fine, but I would *also* like to get a URL equivalent to the dropdown that achieves the same thing. This will be for use in the postbit where I have an entry showing people's style as a clickable link. The submit code being used in the php file is this: Code:
if ($_POST['do'] == 'updateoptions') { if ($show['member']){ $vbulletin->input->clean_array_gpc('p', array('newstyleset' => TYPE_INT)); $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD); $userdata->set_existing($vbulletin->userinfo); // style set if ($vbulletin->options['allowchangestyles'] AND $vbulletin->userinfo['realstyleid'] != $vbulletin->GPC['newstyleset']) { $userdata->set('styleid', $vbulletin->GPC['newstyleset']); } ($hook = vBulletinHook::fetch_hook('profile_updateoptions')) ? eval($hook) : false; $userdata->save(); } else { exec_header_redirect("../index.php?"); } } Code:
<input type="hidden" name="s" value="" /> <input type="hidden" name="do" value="updateoptions" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <select class="forumselector" name="newstyleset" id="sel_newstyleset" onchange="this.form.submit()";> <optgroup label="$vbphrase[quick_style_chooser]"> $quickchooserbits </optgroup> </select> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|