Hello. Please help with the implementation of one bit problematic ideas.
@Draxion, shared with me a cool scenario in this topic and now I realized that you can implement a long-standing idea.
I would like to modify this script:
I want it to change not the background of the page, but the background of the block.
I pasted this HTML into the profile_view_body template
code:
Then added CSS:
The result was this:
Now I want the user to insert a link to a picture in the profile field, for example field_id20, and from this block the picture becomes the background for div class = "cowerage".
@Draxion, shared with me a cool scenario in this topic and now I realized that you can implement a long-standing idea.
I would like to modify this script:
- Code:
/\/u\d+/.test(window.location.href) &&
$(function() {
var field = document.getElementById("field_id13"),
bg;
if (field) {
bg = $(".field_uneditable", field)[0];
if (bg) document.body.style.backgroundImage = "url(" + bg.innerHTML + ")";
document.body.style.backgroundAttachment = "fixed";
document.body.style.backgroundSize = "cover";
}
});
I want it to change not the background of the page, but the background of the block.
I pasted this HTML into the profile_view_body template
code:
- Code:
<div class = "cowerage"> </ div>
Then added CSS:
- Code:
.cowerage {
width: 100%;
height: 400px;
background: chartreuse;
}
The result was this:
Now I want the user to insert a link to a picture in the profile field, for example field_id20, and from this block the picture becomes the background for div class = "cowerage".
Last edited by Storyteller of Wonderland on Tue Jun 18 2019, 19:33; edited 1 time in total