The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Adding a background onto a specific member's profile page.

Go down

Solved Adding a background onto a specific member's profile page.

Post by Bedlam on Thu May 28, 2015 4:57 pm

Hi so I recently discovered this code to add a background onto a specific member's page:

Code:
jQuery(document).ready(function(){
        if(window.location.pathname.indexOf("/u68")!==-1){
    jQuery('<style>body{background: url("http://media.tumblr.com/6233adc1e97adcc10105f1988b8a2465/tumblr_inline_mns3reYdBr1qz4rgp.gif"); </style>').appendTo(document.head);
        } else return;
        });

It works like a charm, except there are a lot of members on my forum so instead of adding it just to user68 it's adding it to user 681, 682, 683 etc

How do you make it only add it to user 68?

Thank you


http://www.gasrforum.com/


Last edited by Bedlam on Thu May 28, 2015 5:24 pm; edited 1 time in total
avatar
Bedlam
Forumember

Female Posts : 62
Reputation : 4
Language : English
Location : Canada

http://www.gasrforum.com/

Back to top Go down

Solved Re: Adding a background onto a specific member's profile page.

Post by meelad_sd on Thu May 28, 2015 5:17 pm

change this:
Code:

if(window.location.pathname.indexOf("/u68")!==-1)
to this:
Code:

if (window.location.pathname == "/u68")

So:

Code:

jQuery(document).ready(function(){
        if(window.location.pathname == "/u68"){
    jQuery('<style>body{background: url("http://media.tumblr.com/6233adc1e97adcc10105f1988b8a2465/tumblr_inline_mns3reYdBr1qz4rgp.gif"); </style>').appendTo(document.head);
        } else return;
        });

meelad_sd
Forumember

Posts : 50
Reputation : 13
Language : English, Swedish, Assyrian, Arabic

http://www.exhclan.com/

Back to top Go down

Solved Re: Adding a background onto a specific member's profile page.

Post by Bedlam on Thu May 28, 2015 5:23 pm

Wow thank you so much!! It really was that easy I just couldn't figure it out~
avatar
Bedlam
Forumember

Female Posts : 62
Reputation : 4
Language : English
Location : Canada

http://www.gasrforum.com/

Back to top Go down

Solved Re: Adding a background onto a specific member's profile page.

Post by meelad_sd on Thu May 28, 2015 5:26 pm

np ^^

meelad_sd
Forumember

Posts : 50
Reputation : 13
Language : English, Swedish, Assyrian, Arabic

http://www.exhclan.com/

Back to top Go down

Solved Re: Adding a background onto a specific member's profile page.

Post by SLGray on Thu May 28, 2015 9:11 pm

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 42734
Reputation : 3010
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum