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.

Moving JScrpit's Staff Chatbox

View previous topic View next topic Go down

Moving JScrpit's Staff Chatbox

Post by FrOsTyXi on 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.

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by _Twisted_Mods_ on 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');
});

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by JScript on 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:


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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by FrOsTyXi on 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

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by _Twisted_Mods_ on 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>';

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by FrOsTyXi on 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!!

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by JScript on 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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

Post by _Twisted_Mods_ on 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

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: Moving JScrpit's Staff Chatbox

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

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

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

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