vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Display name vs Login name (https://vborg.vbsupport.ru/showthread.php?t=62558)

jluerken 03-16-2004 05:48 PM

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 :D

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...

EricR 03-16-2004 10:37 PM

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 :(

Zachery 03-16-2004 11:00 PM

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

lasto 03-16-2004 11:01 PM

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 :)

jluerken 03-17-2004 06:03 AM

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?

Zachery 03-17-2004 06:06 AM

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.

jluerken 03-17-2004 06:21 AM

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.


All times are GMT. The time now is 10:08 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.00988 seconds
  • Memory Usage 1,731KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete