vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using User Profile Fields on a different part of the site (https://vborg.vbsupport.ru/showthread.php?t=209160)

Lynne 03-22-2009 11:36 PM

Quote:

Originally Posted by TNCclubman (Post 1774650)
Does anyone have an idea of what the javascript is to have the little edit pencil show up?

Sleuthing 101:

Take a look at the page source and see what is going on. If you did, you'd see something like this:
HTML Code:

    <dt class="shade" id="profilefield_title_1">Biography</dt>
    <dd id="profilefield_value_1">
        N/A
        <script type="text/javascript">
        <!--
        vBulletin.register_control("vB_ProfilefieldEditor", "1");
        //-->

        </script>
    </dd>

Then, do a search in your files for "register_control" and you'll find it in clientscript/vbulletin_global.js.

Also, since this is shown on the member.php page, it's a good idea to see what scripts get added on that page that don't get added on all the other pages. When looking at the page source, search for any scripts on there and you'll come across a couple scripts that have the word "edit" in them - "vbulletin_quick_edit_generic.js" and "vbulletin_profilefield_edit.js" And, right under where you find those scripts, you'll see some more lines that look useful that have the word "Edit" in them. Grab that too. Do I know if you need all that? No, I don't know, but it's a good place to start.

Fuzz22 03-23-2009 02:00 AM

Quote:

Originally Posted by Lynne (Post 1774646)
That isn't telling us anything. Post your script and tell us which plugin you are using for it and tell us where - which template or line - you wish to use it on the homepage. I assume by homepage you mean the forum index? If not, you need to explain it better.

No, by homepage I mean a completely separate part of the site (not the forum) as I explained in my first post.

I wish to insert field5 (one of my User Profile Fields) into a sentence. I don't have a code yet as I'm not sure where to start. I know that if I was doing it on any forum page, then I'd use "$post[field5]" however this won't work and I'd like to know what I need to add to make that work. Hopefully that's a little more understandable :)

Lynne 03-23-2009 03:11 AM

Well, what query are you using to get the userinfo? You'll have to add to that query to get the field5 info.

TNCclubman 03-23-2009 05:16 PM

1 Attachment(s)
Ok, got the pencil to show up and it links to the users 'edit details' page. Wanted it to just do an instant inline editing with the javascript... wondering if anyone's figured out exactly what I need in terms of the coding to do that... it kind of sucks that by clicking the icon they leave the page and have to search for that field to change it.

Lynne 03-23-2009 06:01 PM

You really need to start your own thread about this and post the code you are using and template changes, etc. We really can't help when we have no clue what you have done and where, etc.

Fuzz22 03-24-2009 05:17 AM

Quote:

Originally Posted by Lynne (Post 1775208)
Well, what query are you using to get the userinfo? You'll have to add to that query to get the field5 info.

None as yet, I'd like to know what query I should use.


All times are GMT. The time now is 11:45 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.01007 seconds
  • Memory Usage 1,729KB
  • 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_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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