-
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 onlyI think to display the image, I have to put
but I do not know more …thanks in advance
userpro_profile_data stores the custom field value for any custom key you provide. What did you try and what did you get?
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 …
I looked here to help me : http://userproplugin.com/userpro/forums/forum/api-function-reference/
I found, I think:
<?php echo get_avatar( $user_id, $profile_thumb_size=150 ); ?>But how with my mp3 ???
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 🙂
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 albumgreets.
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.
You must be logged in to reply to this topic.