Register to Reply
Results 1 to 9 of 9

Thread: How to display user information in the title bar?

  1. Thread Starter #1
    Super VIP cfleischmann's Avatar
    Click to Expand
    Join Date
    Feb 2016
    Posts
    205
    vB Version
    4.2.x
    Likes
    49
    Liked 49 Times in 40 Posts
    Gender
    Female

    How to display user information in the title bar?

    Hello:

    I want to echo some user information in the title of every page. On our old app at work (Prior to WinxPortal® Social Intranet Platform)bwhen you signed on the title would read something like:

    ”<Module> | <Employee Name> (X) - <department> | WinxPortal® Social Intranet Platform”

    example: “DiscussionCenter | Smith, Amber L. (5) - Human Recourses | WinxPortal® Social Intranet Platform”

    where (5) is in the example is the total number of unacknowledged notifications. I don’t remember the order of the various elements, but it was something like that.
    Thanks:
    Carly G. Fleischmann:
    Customer Experience Lead / Sr. Web Dev.:
    XDS Support & Training Services

  2. #2
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    6,055
    vB Version
    4.2.x
    Likes
    1,975
    Liked 3,075 Times in 1,429 Posts
    Gender
    Male
    Depending on the info you want, it will depend on how to render it. If it is already being used in the template, you can use certain conditionals/queries.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  3. Thread Starter #3
    Super VIP cfleischmann's Avatar
    Click to Expand
    Join Date
    Feb 2016
    Posts
    205
    vB Version
    4.2.x
    Likes
    49
    Liked 49 Times in 40 Posts
    Gender
    Female
    Tempus:

    the information ion comes from profile fields I custom created and the way I’ve renamed all the navigation bar items and static text.
    Thanks:
    Carly G. Fleischmann:
    Customer Experience Lead / Sr. Web Dev.:
    XDS Support & Training Services

  4. #4
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    6,055
    vB Version
    4.2.x
    Likes
    1,975
    Liked 3,075 Times in 1,429 Posts
    Gender
    Male
    Ah ok. So you want to know how to output the information from custom profile fields?
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  5. #5
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    6,055
    vB Version
    4.2.x
    Likes
    1,975
    Liked 3,075 Times in 1,429 Posts
    Gender
    Male
    I use this in a plugin for the gender on the userinfo on posts. Hook location is postbit_display_complete.
    Code:
    Only registered members can view code.

    If you just wanted to output the value on something, like "vB Version" as I have, you just need this:
    Code:
    Only registered members can view code.
    The red part checks if the user has filled out this bit of info. If they have, then it runs the rest of the query. This is how I do it so I don't need to edit every style.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  6. Thread Starter #6
    Super VIP cfleischmann's Avatar
    Click to Expand
    Join Date
    Feb 2016
    Posts
    205
    vB Version
    4.2.x
    Likes
    49
    Liked 49 Times in 40 Posts
    Gender
    Female
    Only registered members can view quoted posts.


    So, can I use these to echo back information from the user profile into the browser title bar? In the title tag in the head include template
    Thanks:
    Carly G. Fleischmann:
    Customer Experience Lead / Sr. Web Dev.:
    XDS Support & Training Services

  7. #7
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    6,055
    vB Version
    4.2.x
    Likes
    1,975
    Liked 3,075 Times in 1,429 Posts
    Gender
    Male
    Yes, it should work BUT, $post may only work in posts lol. You’d need a different variable for headinclude template.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  8. #8
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    6,055
    vB Version
    4.2.x
    Likes
    1,975
    Liked 3,075 Times in 1,429 Posts
    Gender
    Male
    Should have mentioned, the browser title is a PIA to alter. Tried doing it before to add notification count to it and gave up lol
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  9. Thread Starter #9
    Super VIP cfleischmann's Avatar
    Click to Expand
    Join Date
    Feb 2016
    Posts
    205
    vB Version
    4.2.x
    Likes
    49
    Liked 49 Times in 40 Posts
    Gender
    Female
    Only registered members can view quoted posts.
    Dyly noted. Not too huge a fan of things that are major pain to deal with
    Thanks:
    Carly G. Fleischmann:
    Customer Experience Lead / Sr. Web Dev.:
    XDS Support & Training Services

Register to Reply

Similar Threads

  1. Replies: 0
    Last Post: 23rd Jul 2017, 14:14
  2. IpInfo -- Extra user IP information (VB4)
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 0
    Last Post: 5th Apr 2015, 19:19
  3. User-defined Date and Time display options
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 0
    Last Post: 23rd Feb 2015, 22:05
  4. SOLVED
    User title or Usergroup
    By nk2join in forum Solved Requests
    Replies: 3
    Last Post: 10th Oct 2012, 12:32
  5. User To Moderate Button In Thread Display Page
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 0
    Last Post: 27th Oct 2011, 20:57

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •