Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Customizing profiles?
Topic Started: Dec 11 2011, 12:10 AM (941 Views)
Rainbow Dash
Member
[ * ]
I have a code to customize profiles, but where could I pur it? Here is the post with the code:

Code:
 
<script type="text/javascript">
//Settings
var music = "Profile Song"; //Music Profile Field Name
var background = "Profile Background Image"; //Profile Background Field Name
var style = "Profile CSS"; //Profile Styling Field Name
var customStuff = "My Stuff"; //Profile Custom Stuff (HTML Allowed)

if(location.href.match('profile')){
//Music
var field = $('td.c_desc:contains("' + music + '")');
$(field).next().html($(field).next().html().replace(/(.+)/gi, '<object type="application/x-shockwave-flash" data="http://z3.ifrm.com/28092/186/0/f612359/player.swf" id="mp3player1" height="24" width="290"><param name="movie" value="http://z3.ifrm.com/28092/186/0/f612359/player.swf"><param name="FlashVars" value="playerID=1&bg=0x9DA5BF&leftbg=0xeeeeee&lefticon=0x666666&rightbg=0x394670&rightbghover=0x999999&righticon=0xE7E7EF&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&loop=no&autostart=no&soundFile=$1"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object>'));

//Style
field = $('td.c_desc:contains("' + style + '")');
var styling = $(field).next().text();
$(field).parent('tr').remove();
$('body').append('<style>' + styling + '</style>');

//Backgrounds
field = $('td.c_desc:contains("' + background + '")');
var backgroundurl = $(field).next().text();
$(field).parent('tr').remove();
$('html,body').css("background", 'url(' + backgroundurl + ')');

//Custom
field = $('td.c_desc:contains("' + customStuff + '")');
var html = $(field).next().text();
$(field).parent('tr').remove();
$('.profile:last').after('<table class="profile" cellspacing="0"><thead><tr><th colspan="2">' + customStuff + '</th></tr></thead><tbody><tr><td colspan="2">' + html + '</td></tr></tbody></table>');
}
</script>



Can anyone figure this thing out? It's supposed to be for profile...

Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cęsaris Salutis!
[ *  *  *  * ]
"Below The Board", should work just fine, but the code requires you to have the profile field "Profile Song" (or whatever you set it to in the configuration), and the user must have it set for the code to work; otherwise it displays an error. I fixed this bug for you and posted the code below:
Code:
 
<script type="text/javascript">
//Settings
var music = "Profile Song"; //Music Profile Field Name
var background = "Profile Background Image"; //Profile Background Field Name
var style = "Profile CSS"; //Profile Styling Field Name
var customStuff = "My Stuff"; //Profile Custom Stuff (HTML Allowed)

if(location.href.match('profile')){
//Music
var field = $('td.c_desc:contains("' + music + '")');
if($(field).length!=0){$(field).next().html($(field).next().html().replace(/(.+)/gi, '<object type="application/x-shockwave-flash" data="http://z3.ifrm.com/28092/186/0/f612359/player.swf" id="mp3player1" height="24" width="290"><param name="movie" value="http://z3.ifrm.com/28092/186/0/f612359/player.swf"><param name="FlashVars" value="playerID=1&bg=0x9DA5BF&leftbg=0xeeeeee&lefticon=0x666666&rightbg=0x394670&rightbghover=0x999999&righticon=0xE7E7EF&righticonhover=0xffffff&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x666666&loader=0x9FFFB8&loop=no&autostart=no&soundFile=$1"><param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"></object>'));}

//Style
field = $('td.c_desc:contains("' + style + '")');
var styling = $(field).next().text();
$(field).parent('tr').remove();
$('body').append('<style>' + styling + '</style>');

//Backgrounds
field = $('td.c_desc:contains("' + background + '")');
var backgroundurl = $(field).next().text();
$(field).parent('tr').remove();
$('html,body').css("background", 'url(' + backgroundurl + ')');

//Custom
field = $('td.c_desc:contains("' + customStuff + '")');
var html = $(field).next().text();
$(field).parent('tr').remove();
$('.profile:last').after('<table class="profile" cellspacing="0"><thead><tr><th colspan="2">' + customStuff + '</th></tr></thead><tbody><tr><td colspan="2">' + html + '</td></tr></tbody></table>');
}
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply