by Ange Tuteur January 29th 2015, 10:57 pm
Hello
@Tonight,
Create a new profile field that has these options :
Type : Text field
Display : Profiles
The rest is up to you.
Next go to Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In all the pages
Paste the code below :
- Code:
window.location.pathname.match(/\/u\d+/) & $(function() { $('#profile-tab-field-profil dl').click(function() { alert(this.id) }) });
Go to your profile and click on the field that you just added. Copy the ID which shows up, and then you can remove this script.
Now create another script :
Title : Your choice
Placement : In all the pages
Paste the code below :
- Code:
window.location.pathname.match(/\/u\d+/) && $(function() {
var field = 'field_id-11';
document.body.style.backgroundImage = 'url(' + $('#'+field+' .field_uneditable').text() + ')';
});
All you need to do is replace
field_id-11 with the ID which you copied before, and you should be set.