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.

How to replace my chat with a new one.

View previous topic View next topic Go down

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

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

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

Post by Zuke on December 1st 2014, 8:13 pm

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


SO SORRY FOR DOUBLE POST Sad

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

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

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


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


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

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

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


JS

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

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

Post by Zuke on December 1st 2014, 8:53 pm

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

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

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

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

JS

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

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

Post by Zuke on December 1st 2014, 9:03 pm


Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

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

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

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

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

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


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


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

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

Post by Zuke on 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? :/

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

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

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

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

Post by Zuke on December 1st 2014, 10:35 pm

I was only pointing it out. O.o

Zuke
Forumember

Male Posts : 379
Reputation : 20
Language : English
Location : United Kingdom

http://ocean.forums.fm

Back to top Go down

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

Post by Ange Tuteur on 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

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

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

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

SarkZKalie
Forumember

Male Posts : 448
Reputation : 78
Language : English

http://rotavn.nstars.org/

Back to top Go down

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

Post by JScript on 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: http://help.forumotion.com/t137171-how-to-replace-my-chat-with-a-new-one#926219

See also the previous message yours!

JS

JScript
Forumember

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

http://jscript.forumeiros.com/

Back to top Go down

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

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

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

SarkZKalie
Forumember

Male Posts : 448
Reputation : 78
Language : English

http://rotavn.nstars.org/

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