API / display picture and mp3 – UserPro Forums https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/feed/ Sun, 05 May 2024 04:55:39 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22882 <![CDATA[API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22882 Mon, 24 Feb 2014 19:55:11 +0000 acidf What php code to display an image?
I try this:
<?php echo userpro_profile_data(‘profilepicture’, $user_id); ?>
but only the link appears…

Same for an audio file …
<?php echo userpro_profile_data(‘track_01’, $user_id); ?>
I install an audio Player: mb.miniAudioPlayer , one that appears directly when a link is posted mp3
but with the php code, a link appears only

I think to display the image, I have to put ...
but I do not know more …

thanks in advance

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22883 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22883 Mon, 24 Feb 2014 20:03:14 +0000 admin userpro_profile_data stores the custom field value for any custom key you provide. What did you try and what did you get?

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22893 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22893 Mon, 24 Feb 2014 20:48:58 +0000 acidf Grieve, I do not quite understand … my english is bad !
If you can understand this? :

I want to display an image (field ‘ProfilePicture’)in the profile page

I delete all the code this page: view.php
I copy my HTML in this file and place this code:

<?php echo userpro_profile_data(‘profilepicture’, $user_id); ?>

I get “broken link” (the image may not appear, and instead I have a small logo “image lacks”

I also want my audio file …

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22894 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22894 Mon, 24 Feb 2014 20:50:10 +0000 acidf I looked here to help me : http://userproplugin.com/userpro/forums/forum/api-function-reference/

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22903 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22903 Mon, 24 Feb 2014 21:02:43 +0000 acidf I found, I think:
<?php echo get_avatar( $user_id, $profile_thumb_size=150 ); ?>

But how with my mp3 ???

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22978 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-22978 Tue, 25 Feb 2014 02:40:39 +0000 admin With mp3, you can take the URL of mp3 which is stored in:

userpro_profile_data(‘mymp3link’, $user_id);

Now use it with your audioplayer or insert it as the src of audio. UserPro does not embed the MP3 for you, so you need iframe/embed code that plays the MP3 given you have the link of audio file already.

If that answer helped you, please let me know to close it 🙂

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-23202 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-23202 Tue, 25 Feb 2014 18:42:32 +0000 acidf Thank you for your quick response.

Well I used this code :
<?php echo userpro_profile_data(‘mymp3link’, $user_id); ?>
But it will not … it just displays the links.

I’ll do more tests and try other audio player.
I would say here is my solution, it can be used for other users…

I look forward to show you the result, my use is different from the majority of users.
I am a musician directory where they can share their album

greets.

]]>
https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-23250 <![CDATA[Reply To: API / display picture and mp3]]> https://forum.userproplugin.com/forums/topic/api-display-picture-and-mp3/#post-23250 Wed, 26 Feb 2014 02:31:10 +0000 admin Yes It’ll display the link ONLY that’s normal. Take the link and use your embed codes to make it playable. That’s what I meant.

]]>