[SOLVED] set page title on user profiles

11 years 9 months ago - 11 years 9 months ago #207452 by socialfan
[SOLVED] set page title on user profiles was created by socialfan
hi, I try to modify the page title of the userprofiles.
at the moment it only the username.

I found components/com_comprofiler/comprofiler.html.php where I could edit a function.

I think there should be other ways, maybe language file?

Also, I am looking for a way to show firstname instead of username when mouseover the avatar.

thanks for support!

Please Log in to join the conversation.

11 years 9 months ago #207467 by krileon
Replied by krileon on topic Re: set page title on user profiles
You can change page title using CB Auto Actions with the after profile render trigger in a Code action then set the method to Page Title. You can then use something like [username] to display the username as the title for example.

All of this however is unnecessary based off your needs. Simply set "Name Format" to "Name Only" within CB > Configuration > General.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #207468 by socialfan
Replied by socialfan on topic Re: set page title on user profiles
the global configuration only alows to combine username and name.
name = firstname + lastname

I only need firstname

tried cb auto action only found onBeforeUserProfileDisplay
do i need to specify doc type?
I set page title and put: [username] [cb_city] some text but it doesnt display.

Please Log in to join the conversation.

11 years 9 months ago #207496 by krileon
Replied by krileon on topic Re: set page title on user profiles
Below should give you exactly what you're wanting.

Type: Code
Trigger: onAfterUserProfileDisplay
Access: Everybody
Method: Page Title
Code: [firstname]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: socialfan

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #207506 by socialfan
Replied by socialfan on topic Re: set page title on user profiles
thank you so much. works perfect :)

Next one... :)

The alt tag in the image on the profile page its also always the username.
Is there a similar smooth way to chnage that?

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #207511 by krileon
Replied by krileon on topic Re: set page title on user profiles

Is there a similar smooth way to chnage that?

It's hardcoded, but the below should change it or remove it.

Display Firstname
Type: Code
Trigger: onAfterUserProfileDisplay
Access: Everybody
Method: jQuery
Code: $( '.cbFullPict' ).attr( 'alt', '[firstname]' ).attr( 'title', '[firstname]' );

Remove Mouseover Display
Type: Code
Trigger: onAfterUserProfileDisplay
Access: Everybody
Method: jQuery
Code: $( '.cbFullPict' ).removeAttr( 'alt' ).removeAttr( 'title' );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: socialfan

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.223 seconds

Facebook Twitter LinkedIn