Moving JScrpit's Staff Chatbox 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

    Moving JScrpit's Staff Chatbox

    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

    Moving JScrpit's Staff Chatbox Empty Moving JScrpit's Staff Chatbox

    Post by FrOsTyXi December 7th 2014, 8:48 pm

    Hello I'm looking to move the staff chatbox to right below the public chatbox, I have my public chatbox above the widgets on the home page using this code.
    Code:
    $('#' + chatbox_id).parent().detach().prependTo('#wrapper');

    Full code after change
    Code:
    document.getElementById(chatbox_id).innerHTML = '<iframe src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
     $('#' + chatbox_id).parent().detach().prependTo('#wrapper');

    This above was what i used to move the public chatbox to the top of the widgets that JScript provided (thanks again)

    Thank you for the help in advance.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by _Twisted_Mods_ December 7th 2014, 9:19 pm

    do it the same way u did the chatbox
    i didnt test this so hope it works
    Code:
    $(function(){
     $('#js_chatstaff').parent().detach().prependTo('#wrapper');
    });
    JScript
    JScript
    Forumember


    Male Posts : 741
    Reputation : 175
    Language : PT-BR, EN
    Location : Brazil

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by JScript December 7th 2014, 9:21 pm

    Hello!

    What my code does is occupy the category information space created for the pseudo database!
    See image below and you understand it better:
    Moving JScrpit's Staff Chatbox 4M5aRnF

    So to move it would also have to move the category bar, is not difficult, but I think it would not be cool, but if you so desire!

    JS
    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by FrOsTyXi December 7th 2014, 9:37 pm

    ah i see then we will just leave it as is. also the code provided above moves the chat but as JScript said the category will need to move too thanks guys


    Last edited by FrOsTyXi on December 7th 2014, 10:28 pm; edited 1 time in total
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by _Twisted_Mods_ December 7th 2014, 10:27 pm

    this should work ... it wont show until a new message is posted

    replace

    Code:
    cbStaff.PUSERNAME = $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].innerHTML;




    with

    Code:
    cbStaff.PUSERNAME = '<strong><a href="/u' + _userdata.user_id + '">' + $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].innerHTML + '</a></strong>';
    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by FrOsTyXi December 7th 2014, 10:32 pm

    _Twisted_Mods_ wrote:this should work ... it wont show until a new message is posted

    replace

    Code:
    cbStaff.PUSERNAME = $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].innerHTML;




    with

    Code:
    cbStaff.PUSERNAME = '<strong><a href="/u' + _userdata.user_id + '">' + $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].innerHTML + '</a></strong>';

    this worked perfect thank you very much!!
    JScript
    JScript
    Forumember


    Male Posts : 741
    Reputation : 175
    Language : PT-BR, EN
    Location : Brazil

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by JScript December 7th 2014, 11:48 pm

    _Twisted_Mods_ wrote:this should work ... it wont show until a new message is posted (...)
    I do not know what that has to do with the topic title, but could be simply:

    replace:
    Code:
    cbStaff.PUSERNAME = $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].innerHTML;

    with:
    Code:
    cbStaff.PUSERNAME = $('a[href^="/u"]:contains('+ _userdata.username + ')')[0].outerHTML;

    JS
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by _Twisted_Mods_ December 8th 2014, 12:06 am

    yea guess u could do that 2 .. still have to add the strong depending on how your coloring the user names.. but either way im still learning Razz
    FrOsTyXi
    FrOsTyXi
    Forumember


    Male Posts : 460
    Reputation : 12
    Language : english

    Moving JScrpit's Staff Chatbox Empty Re: Moving JScrpit's Staff Chatbox

    Post by FrOsTyXi December 8th 2014, 4:39 am

    thank you guys for all the help with this the team is loving it!!