Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Quick question regarding the CB profile page

9 years 3 months ago - 9 years 3 months ago #267931 by delhi-expat
Hi Guys

I'm planning on modifying the CB user profile page so that a small "call me" icon (or similar image) shows up beside the user's profile pic. What I'm planning on doing is to make a simple API call to my current chat software so that clicking on this link would facilitate a direct call to the user logged in.

Which php file would I need to edit in order to accomplish this, and are there any other additional details that I need to be aware of?

Thanks! :cheer:
Last edit: 9 years 3 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #267950 by krileon
Replied by krileon on topic Quick question regarding the CB profile page
None, you would need to create a new CB plugin to provide a custom fieldtype to do what you're wanting. Alternatively use a Custom HTML field with an HTML link to your software. CSS can then be used to position the field as needed if it's not positioned correctly when placed on the "Portrait" tab. CB Profiles are dynamically constructed from tabs and fields so there isn't a spot to just hardcode in something like this.


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: delhi-expat

Please Log in or Create an account to join the conversation.

9 years 3 months ago - 9 years 3 months ago #268068 by delhi-expat
Replied by delhi-expat on topic Quick question regarding the CB profile page
Hi Kyle

Thanks for your response. I did what you said in terms of the custom HTML (i.e. I created a "video call" field, placed the code which is basically a one liner linking to a javascript in the editor area) and it works fine. What would be the CSS file I'd need to edit in order for it to show correctly - I'm guessing I'd need to make use of the "css class" field provided in field management? I basically just want a small call "button" (image that I plan on linking to) right next to the green "online" status underneath the profile picture.

Additionally, what I'd like to do would be for my users to see this "button" only on other user's profiles, as it makes more sense that way. I'm guessing using CB subs would be the correct way to get it to stop showing on the user's own profile, but on all other profiles - am I correct?

Thanks!
Last edit: 9 years 3 months ago by delhi-expat.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #268125 by krileon
Replied by krileon on topic Quick question regarding the CB profile page

Thanks for your response. I did what you said in terms of the custom HTML (i.e. I created a "video call" field, placed the code which is basically a one liner linking to a javascript in the editor area) and it works fine. What would be the CSS file I'd need to edit in order for it to show correctly - I'm guessing I'd need to make use of the "css class" field provided in field management? I basically just want a small call "button" (image that I plan on linking to) right next to the green "online" status underneath the profile picture.

You need to write CSS to absolute position the field. Right click and inspect the photo on your profile then find your field in the DOM and play with absolute positioning it to get it where you want. The online field uses absolute positioning to place it where it's at. The below should be a good starting point.

Code:
#cbfv_FIELD_ID { position: absolute; bottom: -9px; left: 15px; z-index: 6; }

Replace FIELD_ID with the actual ID of your field.

Additionally, what I'd like to do would be for my users to see this "button" only on other user's profiles, as it makes more sense that way. I'm guessing using CB subs would be the correct way to get it to stop showing on the user's own profile, but on all other profiles - am I correct?

You can use CB Conditional then use a Custom > Value condition to hide the field from the user if they're viewing their self. This is done using the below condition.

Value: [user_id]
Operator: Equal To
Value: [cb:userdata field="user_id" user="#me" /]
Mode: Hide


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: delhi-expat

Please Log in or Create an account to join the conversation.

9 years 3 months ago #268178 by delhi-expat
Replied by delhi-expat on topic Quick question regarding the CB profile page
Thanks for responding Kyle. With regard to the CSS - I'm assuming (based upon a bit of a research I did on this forum) that I'd be best off putting in the template.css file for whichever template I'm using?

Also, I'm assuming the "field ID" is the same as the "ID" column mentioned in the "field management" area in CB? Seems to be, as when I "inspected" the element, those same numbers show up.

I did this, but it seemed not to work. Should it be #cbfr instead of #cbfv - the former is what seems to show when "inspecting" the element. . .

BTW, and on a completely unrelated note (apologies!) I've enabled cache and gzip compression on my site to speed page load times up. Seems to work for the most part, but I've heard that the Joomla! cache feature isn't really bug free - and I sometimes need to clear the cache manually for changes in order to show. Are there any better ways of doing this - in other words, should I look for other plugins that handle this better, or am I better off using the native Joomla! caching system?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
9 years 3 months ago #268205 by krileon
Replied by krileon on topic Quick question regarding the CB profile page

Thanks for responding Kyle. With regard to the CSS - I'm assuming (based upon a bit of a research I did on this forum) that I'd be best off putting in the template.css file for whichever template I'm using?

Wherever you want is fine as long as it's loaded. Joomla template.css, Joomla template override.css (if supported), CB template CSS, CB template override.css, CB plugin template override, etc..

Also, I'm assuming the "field ID" is the same as the "ID" column mentioned in the "field management" area in CB? Seems to be, as when I "inspected" the element, those same numbers show up.

Yes.

I did this, but it seemed not to work. Should it be #cbfr instead of #cbfv - the former is what seems to show when "inspecting" the element. . .

No, the inner div for the field row needs to be targeted. The out div for all field rows on the "Portrait" is automatically sized to fit the canvas photo position limits. So you only need to target the inner div to move the contents where you want. This worked fine in all my tests, but again it's just an example and you'll need to inspect the page and mess with the CSS to get more desired results.

BTW, and on a completely unrelated note (apologies!) I've enabled cache and gzip compression on my site to speed page load times up. Seems to work for the most part, but I've heard that the Joomla! cache feature isn't really bug free - and I sometimes need to clear the cache manually for changes in order to show. Are there any better ways of doing this - in other words, should I look for other plugins that handle this better, or am I better off using the native Joomla! caching system?

Page Cache is the main issue. Just enabling Joomla cache won't cause any problems as it only works with what it's told to work with. Page Cache though takes the buffer and caches it entirely for the entire page regardless of permission. This causes rapid out of date data and is why Joomla keeps it disabled by default even if caching is enabled. It however doesn't particularly matter with CB as we updated our system plugin to purge CB page cache to avoid issues in CB. 3rd party extensions however are not covered with our system plugin and could still cause problems.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum