Adding a background onto a specific member's profile page. Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

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

    Bedlam
    Bedlam
    Forumember


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

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

    Post by Bedlam Thu 28 May - 23:57

    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 Fri 29 May - 0:24; edited 1 time in total
    avatar
    meelad_sd
    Forumember


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

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

    Post by meelad_sd Fri 29 May - 0:17

    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;
            });
    Bedlam
    Bedlam
    Forumember


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

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

    Post by Bedlam Fri 29 May - 0:23

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


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

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

    Post by meelad_sd Fri 29 May - 0:26

    np ^^
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51497
    Reputation : 3523
    Language : English
    Location : United States

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

    Post by SLGray Fri 29 May - 4:11

    Topic solved and archived



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

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