Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2004, 05:48 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Display name vs Login name

Sry Mod, I posted this question already in a thread but in the vb2 forum which was wrong.

I give it a try here

I am importing my UBBT to vb3 and have one problem.

UBBT decides between a users Display Name which is the name shown all over the page (beside a post for example) and the Login Name simply used for the login.
This is fine with me cause the users have the change in changing their name this way.

Now I want to implement a Display Name also in vb3.

Therefore I created a custom field with the id5 (profilefieldid5)

I went into my postbit_legacy Template and changed:

$post[username]

to

$post[field5]. I also tried $post[profilefieldid5]

but nothing worked.

I want on ALL my pages the displayname to be shown.

Any idea what I am doing wrong?
Please help me cause I need to implement this urgently.

Many thanks in advance...
Reply With Quote
  #2  
Old 03-16-2004, 10:37 PM
EricR EricR is offline
 
Join Date: Feb 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perhaps an obvious question but... since you modified the legacy template are you sure you configured vB to use the legacy template?

A similar request was posted here, sounds like you were right the first time (field5) :
http://www.vbulletin.com/forum/showthread.php?t=96719

I'm looking for the same thing, only I want to know how to use conditionals so that if the user leaves the custom name blank it'll default to the registered name. I haven't found any answers on that part yet
Reply With Quote
  #3  
Old 03-16-2004, 11:00 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EricR
Perhaps an obvious question but... since you modified the legacy template are you sure you configured vB to use the legacy template?

A similar request was posted here, sounds like you were right the first time (field5) :
http://www.vbulletin.com/forum/showthread.php?t=96719

I'm looking for the same thing, only I want to know how to use conditionals so that if the user leaves the custom name blank it'll default to the registered name. I haven't found any answers on that part yet
Add a new userprofile field

Call it Display Name make it a signle line text box
make sure to note the field id

now,

find in your postbit template $post[musername] and replace it with this

<if condition="$post[fieldX]">$post[fieldx]<else />$post[musername]</if>
replace X with the filed id
That SHOULD do it, altho i dont have the time to look directly at the templates let me know if it works or not
Reply With Quote
  #4  
Old 03-16-2004, 11:01 PM
lasto lasto is offline
 
Join Date: Jan 2002
Posts: 1,514
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i aint no hacker or anything so i may be on wrong track but why not get the display name to be a profile field and then call it in using the follwoing in postbit

<div class="smallfont">
<if condition="$post['field5']">
$post[field5]
</if>
</div>


obviously change the postfield bit to match your number


also aint my code - thanks to Arkham (vb.nl)for help on solving my problem he gave me the conditionals.

Edit

soz Zachery we posted at same time
Reply With Quote
  #5  
Old 03-17-2004, 06:03 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
<if condition="$post[fieldX]">$post[fieldx]<else />$post[musername]</if>
replace X with the filed id
That SHOULD do it, altho i dont have the time to look directly at the templates let me know if it works or not
Thanks Zachery, this sounds helpful to me but its not working.
I change this line in postbit and postbit_legacy but still the loginname is shown. I don't know if there is any caching system behind which results to this cause your code snippet looks logic to me.

What about the replacement variables in vb3. Can't I use them to replace $post[username] with $post[field5] in a whole style?
Reply With Quote
  #6  
Old 03-17-2004, 06:06 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
Thanks Zachery, this sounds helpful to me but its not working.
I change this line in postbit and postbit_legacy but still the loginname is shown. I don't know if there is any caching system behind which results to this cause your code snippet looks logic to me.

What about the replacement variables in vb3. Can't I use them to replace $post[username] with $post[field5] in a whole style?
Lol, they dont work so much like that.

Now unless someone goes in and changes their field 5 it wouldnt showup.
Reply With Quote
  #7  
Old 03-17-2004, 06:21 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
Lol, they dont work so much like that.

Now unless someone goes in and changes their field 5 it wouldnt showup.
You can define a default variable during the creation of custom fields.
I think this should be shown or?

I gave your hint a try and entered something in the field but still this is not shown.
Reply With Quote
Reply


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:09 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.04066 seconds
  • Memory Usage 2,222KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete