profile music
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Toys
Page 1 of 1 • Share
profile music
_Twisted_Mods_- Posts : 101
Reputation : 3
Birthday : 1986-08-05
Join date : 2014-10-03
Age : 37
Location : USA
The following script enables the members to have their personal YouTube music playing when some other member visits their profile.
goto acp>users&groups>profile>
add a new profile text field
then
[script=Your choice=in all pages]
- Code:
$(function(){
if(_userdata.user_level == 1){
$('head').append(' <style>#pflinfo {color: red;font-weight:
bold;background: none repeat scroll 0% 0% black;display:
inline-block;padding: 5px;border: 1px solid white;border-radius:
5px;transition: 2s;}#pflinfo:hover {font-size:3em;padding:
10px;}</style> ')
$('#profile-tab-field-profil dl').each(function(){
$(this).append(' <span id="pflinfo" style="">'+$(this).attr("id")+'</span> ');});
$('#profile-advanced-details dl').each(function(){$(this).append('
<span id="pflinfo" style="">'+$(this).attr("id")+'</span>
');
});}});
submit
then view someones profile and copy the id of the field you created for the profile music
next replace the first javascript with
- Code:
$(function(){
var proffield = 'JS_field_id10';
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 = $("#"+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>\'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;
}
});
replace
- Code:
JS_field_id10
with
with new profile field id then submit
add a song to your profile and you should be good 2 go
Liquid Code :: Coding Factory :: Scripting :: Finished scripts :: Toys
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum