Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Display canvas-image-url in other content or module?

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258123 by krileon
I don't know what to tell you. Copying and pasting exactly what I provided you above worked perfectly fine. Please see the below.




Ensure you've the latest CB Content Bot installed and enabled. Ensure the canvas field is actually visible to the user you're trying to display it to. By default CB Content Bot substitutions act on the article user, not the viewing user. You can change this by adding user="#me" to the substitution as follows or globally by editing CB Content Bot parameters.

Code:
{cb}<div class="cb_template">[cb:userfield field="canvas" user="#me" /]</div>{/cb}


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

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

9 years 10 months ago #258132 by avateamcom
Hey Kyle,
you are completely right!! I just figured out my problem: I had set the field and/or the tab including the field to hidden. now I just tried everything and got it working at all. To get is running in my code, I created a query-field for the canvas-field in comprofiler-table. Then I moved the new field to a "Not in profile" tab and now it works as expected..
The avatar-field always was published, so it worked fine from the beginning.....

Thank you for your patient help and sorry for my little fail here.. :)

Besides: The query-field uses the substitution [USER-ID] for the user-id. Can I substitute the User-ID of the currently shown userprofile`of another user, which the logged in user is just watching?

Best regards,
Stefan

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

  • heyai
  • heyai
  • OFFLINE
  • Posts: 324
  • Thanks: 79
  • Karma: 24
9 years 10 months ago #258134 by heyai

avateamcom wrote: Besides: The query-field uses the substitution [USER-ID] for the user-id. Can I substitute the User-ID of the currently shown userprofile`of another user, which the logged in user is just watching?


Have you checked out the slightly out-dated, but still awesome tutorial? www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb

hey-ai - the community for asian guys and non-asian girls

The search bar is your friend, not just decoration!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8302
  • Karma: 1446
9 years 10 months ago #258155 by krileon

you are completely right!! I just figured out my problem: I had set the field and/or the tab including the field to hidden. now I just tried everything and got it working at all. To get is running in my code, I created a query-field for the canvas-field in comprofiler-table. Then I moved the new field to a "Not in profile" tab and now it works as expected..
The avatar-field always was published, so it worked fine from the beginning.....

I'm not sure why you need a query field. Just ensure the canvas field is set to display on profile. If you don't want it actually displayed on profile then move it to a tab in a not shown on profile position, but leave its parameter to display on profile and it'll be able to substitute in fine.

Besides: The query-field uses the substitution [USER-ID] for the user-id. Can I substitute the User-ID of the currently shown userprofile`of another user, which the logged in user is just watching?

Yes, you can specify whatever user you want for a substitution. For example user="#me" will substitute information from the viewing user or user="42" substitutes information from the user with an id of 42. Please see the substitutions tutorial below.

www.joomlapolis.com/support/tutorials/107-use-cases/18353-using-substitutions-throughout-cb


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.

9 years 10 months ago #258641 by avateamcom
I used the query-module to extract the path of the image. the canvas field itself uses some more code around. but in the meantime, I solved it as you mentioned. Works fine! Once again, thank you..

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

  • chanteur94
  • chanteur94
  • OFFLINE
  • Posts: 302
  • Thanks: 13
  • Karma: 1
9 years 9 months ago #260926 by chanteur94
Hi Kyle

I can't find how to put 'canvas' in background image. (module or article)
Is it possible ?

Thank you.

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

Moderators: beatnantkrileon
Powered by Kunena Forum