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)

sulasno 06-09-2010 06:35 AM

tagged and thanks

justoverclock 07-19-2010 02:32 PM

i see a blank page in my hardware options….the filed are created and set to view in extra options…ù.

why don't work?

marrr 07-31-2010 03:32 AM

Below is an example of the code I used to create a dropdown menu in the postbit_legacy template. The code mimics the code used in the forum menu for creating a dropdown menu, only this one does not use links but rather static text.

Instructions:

Replace all Instances of $post['field#'] to list the proper field name of each custom profile field you wish to include and follow the format below to add additional fields. Only 3 fields were shown in the code to reduce the length of it. When adding a new field you should add it to the first vB conditional as well as the code for listing it. The conditional for displaying each field is optional and by some may be considered excessive, this is entirely up to you! You also do not have to use inline styling as I have but this was thrown together quickly to get something that works.

HTML Code:

<!-- post specs_menu -->
<vb:if condition="$post['field#'] OR $post['field#'] OR $post['field#']">
        <div class="userinfo_extra">
                <ul>
                        <li class="popupmenu">
                                <a href="javascript://" class="popupctrl" accesskey="6">Computer Specs</a>
                                <ul class="popupbody popuphover">
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Case:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Motherboard:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Processor:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                </ul>
                        </li>
                </ul>
        </div>
</vb:if>
<!-- / post specs_menu -->

I hope this helps and that I have posted this code in the right section :P

Neo_obs 07-31-2010 09:46 PM

I fixed the redirect a couple ways... Although I think the plugin edit is the only thing needed I added the rest of my edits because they make sense.

In the "Creates Extra Profile Field Page" plugin add this just after $userdata->save();
PHP Code:

    $vbulletin->url 'profile.php?' $vbulletin->session->vars['sessionurl'] . 'do=extra';
    eval(
print_standard_redirect('redirect_extra_options_updated'truetrue)); 

And then overwrite the "page" template with this
Code:

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

        <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="updateextra" />
                </div>
        </div>

</form>

There were two inputs with the name do which I think confused the browser, at least it confused me. Also it appears that the forms are now submitted to profile.php?do=(updatepage) So I changed that as well and removed duplicate inputs for s and securitytoken, again not needing a duplicate of everything.

justoverclock 08-14-2010 01:51 PM

Quote:

Originally Posted by marrr (Post 2077081)
Below is an example of the code I used to create a dropdown menu in the postbit_legacy template. The code mimics the code used in the forum menu for creating a dropdown menu, only this one does not use links but rather static text.

Instructions:

Replace all Instances of $post['field#'] to list the proper field name of each custom profile field you wish to include and follow the format below to add additional fields. Only 3 fields were shown in the code to reduce the length of it. When adding a new field you should add it to the first vB conditional as well as the code for listing it. The conditional for displaying each field is optional and by some may be considered excessive, this is entirely up to you! You also do not have to use inline styling as I have but this was thrown together quickly to get something that works.

HTML Code:

<!-- post specs_menu -->
<vb:if condition="$post['field#'] OR $post['field#'] OR $post['field#']">
        <div class="userinfo_extra">
                <ul>
                        <li class="popupmenu">
                                <a href="javascript://" class="popupctrl" accesskey="6">Computer Specs</a>
                                <ul class="popupbody popuphover">
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Case:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Motherboard:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                        <vb:if condition="$post['field#']">
                                                <li style="width:300px;color:#808080"><span style="font-weight:bold;color:#EEE;">Processor:</span> {vb:raw post.field#}</li>
                                        </vb:if>
                                </ul>
                        </li>
                </ul>
        </div>
</vb:if>
<!-- / post specs_menu -->

I hope this helps and that I have posted this code in the right section :P



not work for me, the position of code???, where in postbit legacy?

justoverclock 08-14-2010 02:19 PM

work for me thanks!!!!!!!!!!!

wipedout 08-25-2010 01:36 PM

i found 1 bug and i have a request as well.

first of all, when i change my settings in the extra tab, my emails and such from the standard profile settings get reset, msn and such.

secondly, is it possible to make it "register" as an own setting?

tommac3 08-28-2010 04:14 AM

Any update on the using this as part of the profile

alexp999 08-29-2010 11:57 AM

Quote:

Originally Posted by wipedout (Post 2089334)
i found 1 bug and i have a request as well.

first of all, when i change my settings in the extra tab, my emails and such from the standard profile settings get reset, msn and such.

secondly, is it possible to make it "register" as an own setting?

I've just fixed this bug by applying the following fix. I know it wasnt intended to fix this, but I thought I would give it a shot and it worked! :D

https://vborg.vbsupport.ru/showpost....5&postcount=44

Wired1 08-30-2010 05:13 AM

wipedout: So you mean instead of editing the fields in the EPFP, you're going into the tab from the addon and editing them there? Are they ACTUALLY deleted (e.g. you're checking the adminCP), or you just don't see them in the appropriate tab if you switch to it? If the latter, refresh the page, sounds like an AJAX thing.

tommac3: Can you be more specific on your question please?

alexp999: The redirect "bug" had nothing to do with the mod. When I upgraded the test bed, the issue went away. Didn't come back on a complete wipe / reinstall of the test bed.


All times are GMT. The time now is 08:52 AM.

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.01229 seconds
  • Memory Usage 1,774KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_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