Forum version: phpBB3
Last edited by Tonight on Sat Jan 31, 2015 12:50 pm; edited 1 time in total
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
window.location.pathname.match(/\/u\d+/) & $(function() { $('#profile-tab-field-profil dl').click(function() { alert(this.id) }) });
window.location.pathname.match(/\/u\d+/) && $(function() {
var field = 'field_id-11';
document.body.style.backgroundImage = 'url(' + $('#'+field+' .field_uneditable').text() + ')';
});
window.location.pathname.match(/\/u\d+/) && $(function() {
var field = 'field_id-11', default_bg = '', bg = $('#'+field+' .field_uneditable').text();
bg.length ? bg = bg : bg = default_bg;
document.body.style.backgroundImage = 'url(' + bg + ')';
});
default_bg = 'imageurl.gif'
window.location.pathname.match(/\/u\d+/) && $(function() {
var field = 'field_id-11', default_bg = '', bg = $('#'+field+' .field_uneditable').text();
$('#'+field).css('display','none');
bg.length ? bg = bg : bg = default_bg;
document.body.style.backgroundImage = 'url(' + bg + ')';
});
Problem is that Ange's script loses forum's original background. If anyone clicks on other tabs, then he sees just black (or whatever is your bg color) instead of original image._Twisted_Mods_ wrote:he wants the bg image to display on the other profile tabs but it wont because it has no image url to grab on those pages .. you would have to use ajax to request the main profile page to get the image url or have the url saved to your local storage until the page no longer contains the user id ... idk its ange project ill let him do it
window.location.pathname.match(/\/u\d+/) && $(function() {
var field = 'field_id-11', default_bg = 'http://i38.servimg.com/u/f38/18/45/41/65/red10.gif', url = window.location.pathname.match(/(\/u\d+)/)[1],bg;
if (window.location.pathname != url) {
$.get(url,function(data){
bg = $('#'+field+' .field_uneditable',data).text().trim();
setBG();
});
} else {
bg = $('#'+field+' .field_uneditable').text().trim();
$('#'+field+',#'+field+'+div').hide();
setBG();
}
function setBG() { bg.length > 1 ? bg = bg : bg = default_bg; document.body.style.backgroundImage = 'url(' + bg + ')'; };
});