Smarty link to soundcloud with username and title?

alt=
@tettlingen
7 years ago
93 posts
Hi Just a quick question,

I´m trying to create a link to a artists soundcloud page on soundcloud.com
(Like the one on the player - "Open on soundcloud" )

Like this:

https://soundcloud.com/{$item.soundcloud_artist}/{$item.soundcloud_title_url}

But this generates an adress like this: soundcloud.com/user name/titleofsong
(with blanc " " steps in name )

Is there a smarty name that will do this:

user-name with the "-" insted of blanc spaces

so that soundcloud will get the correct url?

I have tried debug, but its not there...

Thank you.
updated by @tettlingen: 03/20/18 05:50:00AM
michael
@michael
7 years ago
7,714 posts
There is but its no guarantee that the user is going to be on soundcloud or that the generated url is going to be the correct one.

The function to change
this is a long sentence
into
this-is-a-long-sentence
is
{$item.soundcloud_artist|jrCore_url_string}
alt=
@tettlingen
7 years ago
93 posts
Hi. Ok I see what you mean. Looks like it only works if the users id on soundcloud is the same as their user name.
Looks like it works in the widget from soundcloud, but that´s their own creation I guess.

Well thanks anyway.
michael
@michael
7 years ago
7,714 posts
Don't give up on it. Just need to find a way to make sure you have the right info.

You could use the FORM DESIGNER to add another form field to wherever, maybe the PROFILE SETTINGS form that collects their soundcloud url.

Docs: "Using the Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/getting-started/1275/using-the-form-designer

Then you WILL have the correct soundcloud profile url.
alt=
@tettlingen
7 years ago
93 posts
Hi.
That worked fine, link is working :)
alt=
@tettlingen
7 years ago
93 posts
Come to think of it. Would it perhaps be possible to make some form fields that are allmost always the same, pre filled in by default. If yoy wish it. Like band name etc That would be a great feature. Just a thought. Thanks
michael
@michael
7 years ago
7,714 posts
In the Form Designer there is an option to add a DEFAULT value. ( I'm not totally understanding your meaning i suspect though. )
form_field.jpg
form_field.jpg  •  55KB


updated by @michael: 12/19/17 03:05:43PM

Tags