Profile Songs?
2 posters
Page 1 of 1
Profile Songs?
Hello,
I am looking for a answer/code for profile songs....
Basically what I want is to have a small sleek media player on the profile page of every user, which the user can customize to play a single song of their choosing. I don't want anything for the entire forum and so on, just what I said above. I looked and it looked like it was possible but I'm not entirely sure on what to do because I couldn't find anything with that was direct or what I wanted exactly.
The Forum Link: http://thevoid.forumotion.net/
Forum Version: PhpBB2
Thank you for the help in advance.
I am looking for a answer/code for profile songs....
Basically what I want is to have a small sleek media player on the profile page of every user, which the user can customize to play a single song of their choosing. I don't want anything for the entire forum and so on, just what I said above. I looked and it looked like it was possible but I'm not entirely sure on what to do because I couldn't find anything with that was direct or what I wanted exactly.
The Forum Link: http://thevoid.forumotion.net/
Forum Version: PhpBB2
Thank you for the help in advance.
Re: Profile Songs?
Hi,
Go to ACP >> Users & Groups >> Users >> Profiles >> Press this button
Make a new field just like this https://i.imgur.com/Y8QqXRm.png then hit Save
Go to ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management >> Click on this button
Title: Profile Music
Placement: In all the pages
Javascript code:
Make sure the link you put in your profile is a YouTube link otherwise it won't work. Hope i helped
Go to ACP >> Users & Groups >> Users >> Profiles >> Press this button
Make a new field just like this https://i.imgur.com/Y8QqXRm.png then hit Save
Go to ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management >> Click on this button
Title: Profile Music
Placement: In all the pages
Javascript code:
- Code:
$(function(){
if(RegExp("/u[0-9]+").test(window.location.pathname)) {
var mobileAgents = new RegExp("Android|BlackBerry|Blazer|BOLT|SymbianOS|Doris|Mobile|Phone|Fennec|GoBrowser|Iris|Maemo|MIB\/2\.2|Minimo|NetFront|Opera Mini|Opera Mobi|SEMC|Skyfire|Teleca|uZardWeb","i");
if(mobileAgents.test(navigator.userAgent)) {
return;
}
var profsong = $("#field_id4 dt + dd div:first-of-type") || undefined;
if(!profsong) {
return;
}
var trueorfalse = profsong.text().trim().charAt(0) !== "-" || false;
if(trueorfalse) {
var vid = profsong.text().replace(/\/watch\?v\=/,"/v/"),
friends = $('.forumline:nth-of-type(2)'),
name = $('div.nav a + span strong'),
namecolor = name.css('color');
var field = document.getElementById('field_id4');
field.style.display = "none";
field.nextSibling.style.display = "none";
friends.after('<table width="100%" cellspacing="1" cellpadding="0" border="0" class="forumline"><tbody><tr><td class="catLeft"><span class="genmed module-title"><span style="color: '+namecolor+';"><strong>'+name.text()+'</strong></span>\'s Profile Song</span></td></tr><tr><td><object width= "298" height="24"><param name="movie" value="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0"></param><param name="allowFullScreen" value="false"></param><param name="allowscriptaccess" value="always"></param><embed src="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0" type="application/x-shockwave-flash" allowfullscreen="false" width="298" height="24" allowscriptaccess="always"></embed></object></td></tr></table>');
} else {
return;
}
} else {
return;
}
});
Make sure the link you put in your profile is a YouTube link otherwise it won't work. Hope i helped
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
I was hoping to get a media player that would go under the friends section, also I tried what you put anyway cause whatever works works, so I did everything and when I went to put the link it just showed the link and didn't play music when I went to view my profile.
Re: Profile Songs?
Hi,
I just made an account on your website and i couldn't find that profile music field, make sure its visible on profiles
I just made an account on your website and i couldn't find that profile music field, make sure its visible on profiles
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
It was, I took it off, I had two of the admins check it out and they couldn't get it to play either. They put the link in the field and nothing happened, just showed the link so I took it off.
Re: Profile Songs?
I need you to put it back, once you do that let me know so i can find out the ID for the profile music field and give you the full code
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
Hi,
Sorry for the late reply kinda busy with college any ways, replace the first javascript code i gave you with this and it should be ready to
Sorry for the late reply kinda busy with college any ways, replace the first javascript code i gave you with this and it should be ready to
- Code:
$(function(){ var proffield = 'field_id-1'; if(RegExp("/u[0-9]+").test(window.location.pathname)) { var mobileAgents = newRegExp("Android|BlackBerry|Blazer|BOLT|SymbianOS|Doris|Mobile|Phone|Fennec|GoBrowser|Iris|Maemo|MIB\/2\.2|Minimo|NetFront|Opera Mini|Opera Mobi|SEMC|Skyfire|Teleca|uZardWeb","i"); if(mobileAgents.test(navigator.userAgent)){ return; } var profsong =$("dl#"+proffield+" dt + dd div:first-of-type") || undefined; if(!profsong) { return; } var trueorfalse =profsong.text().trim().charAt(0) !== "-" ||false; if(trueorfalse) { var vid =profsong.text().replace(/\/watch\?v\=/,"/v/"), friends =$('#profile-advanced-right .module:eq(1)'), name = $('.page-title span strong'), namecolor =name.css('color'); $('dl#'+proffield).css('display','none').next().css('display','none'); friends.after('<table width="100%" cellspacing="1" cellpadding="0" border="0" class="forumline"><tbody><tr><td class="catLeft"><span class="genmed module-title"><span style="color: '+namecolor+';"><strong>'+name.text()+'</strong></span>\'sProfile Song</span></td></tr><tr><td><object width= "298" height="24"><param name="movie" value="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0"></param><param name="allowFullScreen" value="false"></param><param name="allowscriptaccess" value="always"></param><embed src="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0" type="application/x-shockwave-flash" allowfullscreen="false" width="298" height="24" allowscriptaccess="always"></embed></object></td></tr></table>'); } else { return; } } else { return; } });
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
Okay, I put the new script in but it's still not working, am I suppose to put the song in a special way, like you do with images or?
Re: Profile Songs?
Hi,
Try to replace it with this one and make sure the field is visible in profiles and the link you are using is a YouTube link.
Try to replace it with this one and make sure the field is visible in profiles and the link you are using is a YouTube link.
- Code:
$(function(){ var proffield = 'JS_field_id1'; if(RegExp("/u[0-9]+").test(window.location.pathname)) { var mobileAgents = newRegExp("Android|BlackBerry|Blazer|BOLT|SymbianOS|Doris|Mobile|Phone|Fennec|GoBrowser|Iris|Maemo|MIB\/2\.2|Minimo|NetFront|Opera Mini|Opera Mobi|SEMC|Skyfire|Teleca|uZardWeb","i"); if(mobileAgents.test(navigator.userAgent)){ return; } var profsong =$("#"+proffield+" .field_uneditable") ||undefined; if(!profsong) { return; } var trueorfalse =profsong.html().trim().charAt(0) !== "-" ||false; if(trueorfalse) { var vid =profsong.text().replace(/\/watch\?v\=/,"/v/"), friends =$('#profile-advanced-right .module:eq(1)'), name = $('.page-title span strong'), namecolor =name.css('color'); $('dl#'+proffield).css('display','none').next().css('display','none'); friends.after('<table width="100%" cellspacing="1" cellpadding="0" border="0" class="forumline"><tbody><tr><td class="catLeft"><span class="genmed module-title"><span style="color: '+namecolor+';"><strong>'+name.text()+'</strong></span>\'sProfile Song</span></td></tr><tr><td><object width= "298" height="24"><param name="movie" value="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0"></param><param name="allowFullScreen" value="false"></param><param name="allowscriptaccess" value="always"></param><embed src="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0" type="application/x-shockwave-flash" allowfullscreen="false" width="298" height="24" allowscriptaccess="always"></embed></object></td></tr></table>'); } else { return; } } else { return; } });
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
Hi,
Try using this one instead, if it doesnt work im sorry to inform you that i ran out of solutions o.o maybe someone else could help then.
Good luck!
Try using this one instead, if it doesnt work im sorry to inform you that i ran out of solutions o.o maybe someone else could help then.
- Code:
$(function(){
if(RegExp("/u[0-9]+").test(window.location.pathname)) {
var mobileAgents = new RegExp("Android|BlackBerry|Blazer|BOLT|SymbianOS|Doris|Mobile|Phone|Fennec|GoBrowser|Iris|Maemo|MIB\/2\.2|Minimo|NetFront|Opera Mini|Opera Mobi|SEMC|Skyfire|Teleca|uZardWeb","i");
if(mobileAgents.test(navigator.userAgent)) {
return;
}
var profsong = $("#field_id1 dt + dd div:first-of-type") || undefined;
if(!profsong) {
return;
}
var trueorfalse = profsong.text().trim().charAt(0) !== "-" || false;
if(trueorfalse) {
var vid = profsong.text().replace(/\/watch\?v\=/,"/v/"),
friends = $('.forumline:nth-of-type(2)'),
name = $('div.nav a + span strong'),
namecolor = name.css('color');
var field = document.getElementById('field_id4');
field.style.display = "none";
field.nextSibling.style.display = "none";
friends.after('<table width="100%" cellspacing="1" cellpadding="0" border="0" class="forumline"><tbody><tr><td class="catLeft"><span class="genmed module-title"><span style="color: '+namecolor+';"><strong>'+name.text()+'</strong></span>\'s Profile Song</span></td></tr><tr><td><object width= "298" height="24"><param name="movie" value="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0"></param><param name="allowFullScreen" value="false"></param><param name="allowscriptaccess" value="always"></param><embed src="'+vid+'?autoplay=1&rel=0&fs=0&autohide=0" type="application/x-shockwave-flash" allowfullscreen="false" width="298" height="24" allowscriptaccess="always"></embed></object></td></tr></table>');
} else {
return;
}
} else {
return;
}
});
Good luck!
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
You need to stop removing the profile field.. Every time you do that it changes the field ID which is probably why the code is not working. Let me know when you add it back and this time do NOT remove it.
Kirbs- Forumember
- Posts : 628
Reputation : 18
Language : English
Re: Profile Songs?
I put the last three codes in and didn't remove the field. It didn't work and it really wasn't what I/we wanted on our forum in the first place but if it worked, it worked but it didn't.
Similar topics
» Add Youtube Songs to members profile
» Profile tabs + separated profile fields
» [QUERY] How to show the members' group joined in their post profile and even in their profile?
» How can adapt the advanced profile to IPB profile look?
» Profile + View Profile Issue
» Profile tabs + separated profile fields
» [QUERY] How to show the members' group joined in their post profile and even in their profile?
» How can adapt the advanced profile to IPB profile look?
» Profile + View Profile Issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum