How to replace my chat with a new one. 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.
4 posters

    How to replace my chat with a new one.

    avatar
    Guest
    Guest


    In progress How to replace my chat with a new one.

    Post by Guest December 1st 2014, 8:09 pm

    Hello, I would like to replace the chat on my forum with something else, here is the code I want to change my chat to.

    <!-- <Auren Chat Box> !-->
    <div id='aurenChatBox'></div>
    <script>
    var auren_chat_box = {};
    auren_chat_box.width = 400;
    auren_chat_box.height = 350;
    auren_chat_box.id = 'spike';
    </script>
    <script src="http://aurenjs.com/embed/embed.js"></script>
    <!-- </Auren Chat Box> !-->


    I would like to take the default chat you get on forumotion to replace with that code, I tried doing in in my templates and index body but that way won't work.


    Please help, thanks. Smile
    avatar
    Guest
    Guest


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 8:13 pm

    If you need my forum link it's spike.forums.fm


    SO SORRY FOR DOUBLE POST Sad
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

    In progress Re: How to replace my chat with a new one.

    Post by SLGray December 1st 2014, 8:17 pm

    Have you tried adding the code to a HTML page, a widget, an announcement, or the homepage message?



    How to replace my chat with a new one. Slgray10

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


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

    In progress Re: How to replace my chat with a new one.

    Post by JScript December 1st 2014, 8:40 pm

    @Luke Spike

    Create a new JavaScript with placement only in index, copy and past the code below:
    Code:

    function insertChatBox(chatbox_id, chatbox_url) {
        return insertChatBoxNew(chatbox_id, chatbox_url);
    }

    function insertChatBoxNew(chatbox_id, chatbox_url) {

       document.getElementById(chatbox_id).innerHTML = '<iframe src="http://aurenjs.com/chat.php?id=spike" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
    }

    Result:
    How to replace my chat with a new one. 8UFQ9kw

    JS
    avatar
    Guest
    Guest


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 8:53 pm

    How do I add a message above the chat, also it works thanks! Smile
    JScript
    JScript
    Forumember


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

    In progress Re: How to replace my chat with a new one.

    Post by JScript December 1st 2014, 9:01 pm

    Make a dash in the image I posted the place you want to put the message, ok?

    JS
    avatar
    Guest
    Guest


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 9:03 pm

    JScript
    JScript
    Forumember


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

    In progress Re: How to replace my chat with a new one.

    Post by JScript December 1st 2014, 10:07 pm

    @Luke Spike

    Try this CSS:
    Code:

    #chatbox_top:before, #chatbox_botton:before {
      content: "The text goes along here!";
      font-size: 14px;
      margin-top: -25px;
      position: absolute;
    }

    JS
    avatar
    Guest
    Guest


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 10:16 pm

    I fixed your code and it's bottom not botton lol. Thanks, BUT it is going over the top of the chat and in to something else, how do I move it down and the chat down a little bit?


    EDIT: What I mean is how do I move the text down a little then the chat a little.


    Last edited by Luke Spike on December 1st 2014, 10:20 pm; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51555
    Reputation : 3524
    Language : English
    Location : United States

    In progress Re: How to replace my chat with a new one.

    Post by SLGray December 1st 2014, 10:18 pm

    Edit this part:
    Code:
    margin-top: -25px;



    How to replace my chat with a new one. Slgray10

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


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 10:26 pm

    Okay, now how do I make it in to the center and add HTML text to lead to links, I tried but it just deletes? :/
    JScript
    JScript
    Forumember


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

    In progress Re: How to replace my chat with a new one.

    Post by JScript December 1st 2014, 10:34 pm

    Luke Spike wrote:I fixed your code and it's bottom not botton lol.
    I'm human, then maybe I can fail!

    Bye bye, so long, farewell...

    JS
    avatar
    Guest
    Guest


    In progress Re: How to replace my chat with a new one.

    Post by Guest December 1st 2014, 10:35 pm

    I was only pointing it out. O.o
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: How to replace my chat with a new one.

    Post by Ange Tuteur December 2nd 2014, 2:08 am

    Hello Luke Spike,

    Try this :
    Administration Panel > Modules > JavaScript codes management > Create a new script

    Title : Your choice
    Placement : In the homepage
    Code:
    $(function() {
      var msg = 'Your message here <a href="/forum">Link</a>', a = document.getElementById('frame_chatbox'), b = document.createElement('DIV');
      b.innerHTML = msg, b.className += ' msgBox';
      a.parentNode.insertBefore(b,a);
    });

    Edit the value of msg to change the message displayed above the chat.

    Add this to your CSS to change the style of the message block :
    Display > Colors > CSS stylesheet
    Code:
    .msgBox {
      text-align:center;
      background:#EEE;
      border:1px solid #CCC;
      border-radius:3px;
      padding:6px 3px;
      margin:6px 0;
    }

    P.S.
    Correcting people on their grammar or spelling is often considered to be rude when they didn't ask for it. Wink
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1443
    Reputation : 220
    Language : English

    In progress Re: How to replace my chat with a new one.

    Post by SarkZKalie December 2nd 2014, 7:10 am

    Create a new HTML page with your new chatbox source code, e.g http://yourdomain.com/h1-page. Then, use iframe tag to place it on the page you want.
    Code:
    <iframe src="http://yourdomain.com/h1-page" width="" height=""></iframe>
    JScript
    JScript
    Forumember


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

    In progress Re: How to replace my chat with a new one.

    Post by JScript December 3rd 2014, 1:20 pm

    sarkzkalie01 wrote:Create a new HTML page with your new chatbox source code, e.g http://yourdomain.com/h1-page. Then, use iframe tag to place it on the page you want.
    Code:
    <iframe src="http://yourdomain.com/h1-page" width="" height=""></iframe>
    I see that you answered without even check if it has been answered, see: https://help.forumotion.com/t137171-how-to-replace-my-chat-with-a-new-one#926219

    See also the previous message yours!

    JS
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1443
    Reputation : 220
    Language : English

    In progress Re: How to replace my chat with a new one.

    Post by SarkZKalie December 4th 2014, 8:02 pm

    Oh my bad, seems to be a bit of confusion. I don't even remember posting this here. What a shame! ="=
    Thanks, JS.



    How to replace my chat with a new one. Sarkzk10