Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2009, 08:44 PM
Fuzz22 Fuzz22 is offline
 
Join Date: May 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Using User Profile Fields on a different part of the site

Is it possible to use User Profile Fields (e.g. field5) on a different part of the site (not the forum) like my homepage. If so, how would I make it work?
Reply With Quote
  #2  
Old 03-22-2009, 08:51 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, you should be able to. I use it in my navbar with the variable $bbuserinfo[fieldx]
Reply With Quote
  #3  
Old 03-22-2009, 08:53 PM
TNCclubman's Avatar
TNCclubman TNCclubman is offline
 
Join Date: Sep 2008
Posts: 690
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looking for this too...

Lynne, will that also bring the little editing icon next to the field as well?
Reply With Quote
  #4  
Old 03-22-2009, 08:58 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If its not a forumpage(as you wrote*g*) you'll have to grab it yourself from the db(table userfield) or include the global.php from the forum and use it like lynne wrote.

--------------- Added [DATE]1237759165[/DATE] at [TIME]1237759165[/TIME] ---------------

Quote:
Originally Posted by TNCclubman View Post
looking for this too...

Lynne, will that also bring the little editing icon next to the field as well?
no, thats happening with js
Reply With Quote
  #5  
Old 03-22-2009, 09:02 PM
TNCclubman's Avatar
TNCclubman TNCclubman is offline
 
Join Date: Sep 2008
Posts: 690
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks lynne, that worked!!!

All I need is to also have the edit button next to it, and when its pressed, the info becomes editable and you can just re-write the entry...like when they do it in their profile!
Reply With Quote
  #6  
Old 03-22-2009, 09:05 PM
Fuzz22 Fuzz22 is offline
 
Join Date: May 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you help me with grabbing it from the db?
Reply With Quote
  #7  
Old 03-22-2009, 09:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you need to grab it from the db, you'll have to write a plugin. You'll have to be much more specific about where you need to use it if you want help with that.

As for the edit button, steal the code from the template and make sure you include the same files included on the member page and see what happens.
Reply With Quote
  #8  
Old 03-22-2009, 09:36 PM
Fuzz22 Fuzz22 is offline
 
Join Date: May 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I wish to use it on a script that I already have and submit field5 into the script which is located on the homepage.
Reply With Quote
  #9  
Old 03-22-2009, 10:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 03-22-2009, 10:42 PM
TNCclubman's Avatar
TNCclubman TNCclubman is offline
 
Join Date: Sep 2008
Posts: 690
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<!-- ########## WHATS ON YOUR MIND ######### -->

<a href="/usercp.php"><img src="/image.php?u=$bbuserinfo[userid]" alt="Some avatar" border="0" /></a>
    <tr><td class="alt1" nowrap="nowrap" align="left"><b>What's On Your Mind?:</b>
<fieldset>
$bbuserinfo[field12]
</fieldset></td>
  </tr>

<!-- ########## /WHATS ON YOUR MIND ######### -->
So far with the code above, I got the users avatar showing up and thanks to Lynnu, the field is showing as well...

Does anyone have an idea of what the javascript is to have the little edit pencil show up?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07387 seconds
  • Memory Usage 2,253KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete