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.

View previous topic View next topic Go down

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

Post by Bedlam on May 28th 2015, 11: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 May 29th 2015, 12:24 am; edited 1 time in total

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 May 29th 2015, 12:17 am

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 May 29th 2015, 12:23 am

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

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 May 29th 2015, 12:26 am

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 May 29th 2015, 4:11 am

Topic solved and archived


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


SLGray
Administrator
Administrator

Male Posts : 35641
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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