[SOLVED] CB Activity - Desactive Url Link Profil of member in a wall

4 years 2 weeks ago - 4 years 2 weeks ago #317795 by krileon
Avatar is trickier. You won't be able to remove it while still displaying the thumbnail image. It'll cause the fullsize image to load, but the below would accomplish what you're wanting.

Userlist Value Layout:
[cb:if user="#me" user_id<="0"]<img src="[avatar]" />[cb:else][value][/cb:else][/cb:if]

I also tried in the formatname field also without success.

The formatname field should work fine as well using the below.

Userlist Value Layout:
[cb:if user="#me" user_id<="0"][formatname][cb:else][value][/cb:else][/cb:if]

You won't be able to use userdata or userfield field substitutions for a fields self in its own layout as that'd cause an infinite loop situation so you can only use the raw substitutions like shown above. The raw substitution of [avatar] should just give you the URL of the avatar to insert into an image tag. I've also added a feature ticket to see if these profile linked fields can also just be improved.

forge.joomlapolis.com/issues/7938


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.

4 years 2 weeks ago - 4 years 2 weeks ago #317810 by Julien04
Hi,

Thanks for your support !

I tried the new codes that you transmitted to me and we are getting closer ..

I am sending you private screenshoot message of the result with your codes and an idea that came to me.

The first screenshoot is the rendering with your new codes. At this point, the image of my avatar appears in duplicate with the original size profile photo. The link is still to my profile is still present on the resize. The user name, this time is placed below the photo.

On the second, I based myself on your code and called my photo resize.
The resize photo is displayed with username below.
[cb:if user="#me" user_id<="0"]<img src="images/julien_direct.jpg" />[cb:else][value][/cb:else][/cb:if]
[cb:if user="#me" user_id<="0"][formatname][cb:else][value][/cb:else][/cb:if]

The third is the desired result in the positioning of the avatar and username.

With these codes, when I log in as a member, there appears a duplicate username on all the walls caused by the avatar code :
[cb: if user = "# me" user_id <= "0" ] <img src = "[avatar]" /> [cb: else] [value] [/ cb: else] [/ cb: if]

So, can we :

- add a value to remove the primary avatar, just when the member does not have access to his profile?
- Position the new avatar (photo resize called) like the original one?
- Position the username to the right of the photo as at the origin?
- And correct this duplicate username that appears on all the walls

Thanks in advance !

Julien

Please Log in to join the conversation.

4 years 2 weeks ago #317815 by krileon
Don't supply both codes to a single field. The formatname layout goes in the formatname field and the avatar layout goes in the avatar field. For the avatar usage you'll probably need CBs based CSS classes added to it. The below should work fine.

Userlist Value Layout:
[cb:if user="#me" user_id<="0"]<img src="[avatar]" class="cbImgPict cbThumbPict img-thumbnail" />[cb:else][value][/cb:else][/cb:if]

I've tested the above in the avatar field and appears to work fine.


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

Please Log in to join the conversation.

4 years 2 weeks ago #317816 by Julien04
Yeah !!!!!

It works !! And I don't need to touch the CSS, everything came back to one place :-))

With your code the loop and looped :)

Gratitude!

Have a nice day!
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.262 seconds

Facebook Twitter LinkedIn