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.
The forum of the forums
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 Sun 7 Dec - 19:48

    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_ Sun 7 Dec - 20:19

    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 Sun 7 Dec - 20:21

    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 Sun 7 Dec - 20:37

    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 Sun 7 Dec - 21:28; 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_ Sun 7 Dec - 21:27

    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 Sun 7 Dec - 21:32

    _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 Sun 7 Dec - 22:48

    _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_ Sun 7 Dec - 23:06

    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 Mon 8 Dec - 3:39

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

      Current date/time is Wed 13 Nov - 17:27