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] Image in Community Builder profile linking to external url

  • Thatch10
  • Thatch10
  • OFFLINE
  • Posts: 14
  • Thanks: 4
  • Karma: 1
9 years 2 months ago - 9 years 2 months ago #269874 by Thatch10
cb 2.0.10 and Joomla! 3.4.3
using sh404sef to smarten the urls

I wish to include a sponsors logo against each member of the community which links to the sponsors external website.

i have fields

cb_sponsorsimage (for the image)

cb_sponsorsurl (for the url)

with parameters in the Profile Value Layout of
Code:
<strong>[formatname]</strong> is sponsored by <br/><a target="_blank" href="[cb:userdata field="cb_sponsorsurl"/]"><img src="[cb_sponsorsimage]"/></a>

At present the url goes to

www.mysite.co.uk/cb_sponsorsurl

rather than the value stored in cb_sponsorsurl

Can anyone advise how I get the url to just be the sponsors url rather than prefixed with www.mysite.co.uk/

Thanks

Thatch
Last edit: 9 years 2 months ago by krileon.

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

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 2 months ago #269877 by jpdenny1
Hey, saw your post and I had a similar issue with the url in the link field in the activity stream. Think that's being fixed.

Add http:// to the url, that solves it.

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

  • Thatch10
  • Thatch10
  • OFFLINE
  • Posts: 14
  • Thanks: 4
  • Karma: 1
9 years 2 months ago #269882 by Thatch10
Thanks for the reply, unfortunately the url stays the same, it drops the http:// from the cb web address field even if I add it.

I can see this as I have to display the url at the moment to get the functionality as close as possible, however the image gives a 404 error as it adds the external address to the sites address as previously stated.

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

  • jpdenny1
  • jpdenny1
  • OFFLINE
  • Posts: 195
  • Thanks: 25
  • Karma: 5
9 years 2 months ago #269902 by jpdenny1
Hmm, I have two buttons. 1 is external website that the user puts the url into. The other is auto actioned and prefilled linking to users profile. These show on profile and lists, with no problems.

Just a suggestion to use a custom html field maybe.

Joomla 3.6.2
CB 2.0.15 Latest Nightly
GJ 3.0.1 nightly
Php version 5.5.35
Auto actions nightly
Activity nightly
Privacy nightly
Conditions nightly
CB Gallery 2.0
.....all nightly!
Uddeim 3.9

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
9 years 2 months ago - 9 years 2 months ago #269903 by krileon
CB removes the HTTP/HTTPS for a URL when using a web address field. It does this so you don't end up with mixed content when someone shares an HTTP URL on your HTTPS site. We add it in when the field is displayed. Your issue is you're outputting the raw database stored value and not the formatted value, which is why it's missing HTTP. You can add this manually to your href by adding http:// before the substitution or use the formatted substitution below.

[cb:userfield field="FIELD_NAME" /]


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.
Last edit: 9 years 2 months ago by krileon.

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

  • Thatch10
  • Thatch10
  • OFFLINE
  • Posts: 14
  • Thanks: 4
  • Karma: 1
9 years 2 months ago #269912 by Thatch10
I guessed it would be a simple fix, just didn't think that it would be that easy, went for the addition of the http:// before the substitution, tried the formatted substitution below but that didn't work, must be still doing something wrong there, however will go with the option that works. Thanks

Thatch
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum