vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Profile Enhancements - Extra Profile Fields Page (https://vborg.vbsupport.ru/showthread.php?t=229881)

BaziCenter 06-04-2011 06:01 AM

This Mod has an issue with vB4.1.4 Beta1. Every time the user updates his/her extra fields in userCP, his/her IM, Website and Birthday fields resets to empty.

I don't know if it's happen in 4.1.x too or not.

grey_goose 06-27-2011 03:26 AM

1 Attachment(s)
Hello! Love the mod, used it on 3.8. Recently migrated to 4.1.4, and can't seem to get the same functionality.

Basically I use these to make 10 separate pages, by changing the value of "extra" and incrementing the instance from 7 onward. It worked in 3.8 but doesn't seem to be working now.

What am I doing wrong? I've attached my first 'add-on' page for perusal. When I import it, it makes it impossible to read the previous extra fields.

Wired1 06-27-2011 03:37 AM

Bazicenter: No idea, don't have that vB version to test on.

grey_goose: quick glance at the code and it seems ok, but again, I can't test with that version of vB.

LifesGreatestGift 06-27-2011 11:40 PM

1 Attachment(s)
I took your mod to the next level ;) look at attachment.

DS MrSinister 06-28-2011 12:33 AM

wow that's awesome TheWindows7Site. hopefully Wired1 will let you post it.. :D

Wired1 06-28-2011 03:50 AM

Wrong mod actually :) That's within the member page right? Was it just multiple profile fields pages, or a real back end? By all means post the code if you'd like, and/or add it as an add on if you want.

LifesGreatestGift 06-28-2011 06:54 PM

that was actually a screen of my postbit_legacy.. Im not using the Tab mod.

Scalemotorcars 07-20-2011 08:06 PM

1 Attachment(s)
I also recently upgraded from 3.8 to 4.1.4 sp2 and I canted edit view the extra profile fields page. Ive checked and double checked the template edits and read the entire mod. Ive also imported the mod a 2nd time with overwrite and still no change.

Also at the very top you have a note about 3.8 to 4.- upgrades about possible DB errors and you say to delete the PAGE template. The only page template I can find is the one for Facebook. What am I missing here?

Scalemotorcars 07-20-2011 08:37 PM

I figured out how to do it.
I took the template code from the plugin and created a new template called extraprofilepage

I then added the this code.
HTML Code:

<form action="profile.php" method="post">
<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
<input type="hidden" name="do" value="{vb:raw updateextra}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />

        <h2 class="blockhead">{vb:rawphrase edit_extra_options}</h2>
        <div class="blockbody formcontrols">
                <h3 class="blocksubhead">{vb:rawphrase extra_options}</h3>
                        {vb:raw customfields.extra}       
        </div>

        <div class="blockfoot actionbuttons">
                <div class="group">
                        <input type="submit" class="button" value="{vb:rawphrase save_changes}" accesskey="s" />
                        <input type="reset" class="button" value="{vb:rawphrase reset_fields}" accesskey="r" />
                        <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
                        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                        <input type="hidden" name="do" value="updateprofile" />
                </div>
        </div>

</form>

After that I went to the plugin manager and changed two of the plugins.

Caches Extra Profile Field Page Templates is replaced with this code using the new template name above.
HTML Code:

if (THIS_SCRIPT == 'profile')
{
$cache = array_merge((array)$cache,array(
        'extraprofilepage',
        'userfield_checkbox_option',
        'userfield_radio',
        'userfield_radio_option',
        'userfield_select',
        'userfield_select_multiple',
        'userfield_select_option',
        'userfield_textarea',
        'userfield_textbox',
        'userfield_wrapper'
));
}

And this plugin, Creates Extra Profile Field Page is changed to....
HTML Code:

// This is if a user requests ?do=extra it will do start the actions
if ($_REQUEST['do'] == 'extra')
{
        // Gets our Extra Page Fields
        $customfields = array();
        fetch_profilefields(1);

        // makes the user cp nav look correct
        construct_usercp_nav('extra');
       

        // sets the area discription, feel free to change
        $navbits[''] = $vbphrase[edit_extra_options];
       
        // sets template name to be called when the action is performed
        //$templatename = 'extraprofilepage';
        $templater = vB_Template::create('extraprofilepage');
       
        $page_templater = vB_Template::create('extraprofilepage');
        $page_templater->register('customfields', $customfields);       
       
        // sets shell template
        //$shelltemplatename = 'USERCP_SHELL';
}

// this is so that when a user saves their info it does get saved
if ($_POST['do'] == 'updateextra')
{
        $vbulletin->input->clean_array_gpc('p', array(
                // custom profile fields
                'userfield'    => TYPE_ARRAY,
        ));

        // init user data manager
        $userdata =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
        $userdata->set_existing($vbulletin->userinfo);

        // custom profile fields
        $userdata->set_userfields($vbulletin->GPC['userfield']);

        // save the data
        $userdata->save();
}

Works fine now. :up:

ryohnosuke 07-21-2011 01:18 PM

Are you sure that it works? I've updated with your code but extra options still missing.

Saludos.


All times are GMT. The time now is 03:15 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.01188 seconds
  • Memory Usage 1,748KB
  • 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
  • (3)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete