Problem with using CSS stylesheet.

Go down

Solved Problem with using CSS stylesheet.

Post by yuriko on June 23rd 2015, 7:36 am

Technical Details

Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : http://yuri-village.fengbb.com/

Description of problem

I saw the post in this forum, about how to personalize chatbox.
URL: CLICK HERE!
I decided to add these function to my chatbox in the forum so I followed the steps instructed.

But where should I paste the code in? ( I mean which position in the CSS stylesheet )

I need help...

Let's take an example, I want to "Add a message on login"

Code:
$(window).load(function() {
  var chatbox_script = function() {
    $('#chatbox_option_co').click(function(){
      $('#chatbox').addClass('recently-connected');
      setTimeout(function(){ $('#chatbox').removeClass('recently-connected') }, 60000)
    })
  };
  var s=document.createElement('script');s.text="("+chatbox_script.toString()+")();";$('object[data^="/chatbox/index.forum"],iframe[src^="/chatbox/index.forum"]').each(function(){try{$(this.contentDocument||this.contentWindow.document).find("#chatbox").closest("html").find("head").first().each(function(){this.appendChild(s.cloneNode(true))})}catch(a){}})
});
Code:
#chatbox.recently-connected:after {
  font-family: "trebuchet ms", serif;
  font-size: 1.5em; line-height:1.5em; font-weight: bold; color: #8BC34A;
  box-shadow:0 0 5px #AED581; display:block; background: #F1F8E9; margin:auto;
  width:80%; margin:1.5% auto; padding:1%; white-space: pre;
  content: "Welcome to the chatbox =D \a If you are alone, place a log on the fire.";
}


CLICK HERE!

What should I do to add this function to my chatbox?


Last edited by yuriko on June 26th 2015, 8:41 pm; edited 1 time in total

yuriko
New Member

Posts : 2
Reputation : 1
Language : English, Japanese, Cantonese, Chinese

http://yuri-village.fengbb.com/

Back to top Go down

Solved Re: Problem with using CSS stylesheet.

Post by SLGray on June 23rd 2015, 9:21 pm

The first  code is a JavaScript code:  AP > Modules > HTML/JavaScript > JacvaScript Management.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43049
Reputation : 3046
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Problem with using CSS stylesheet.

Post by yuriko on June 26th 2015, 8:41 pm

Thank you. I know what to do now ^^

yuriko
New Member

Posts : 2
Reputation : 1
Language : English, Japanese, Cantonese, Chinese

http://yuri-village.fengbb.com/

Back to top Go down

Solved Re: Problem with using CSS stylesheet.

Post by APE on June 27th 2015, 3:37 am

Topic solved and archived



avatar
APE
Administrator
Administrator

Male Posts : 12031
Reputation : 1208
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum