• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

100% Chat Height

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
10 posts • Page 1 of 1

Postby zagor256 » Thu Oct 07, 2010 7:51 pm

Hi.

After some research I find a way how to have a chat on whole browser screen.


OPEN
data/public/js/pfcclient.js

Find

refreshGUI: function()
{

AFTER ADD

Code: Select all
var myWidth;
var myHeight;

if( typeof( window.innerWidth ) == 'number' ) {

//Non-IE

myWidth = window.innerWidth;
myHeight = window.innerHeight;

} else if( document.documentElement &&

( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

//IE 6+ in 'standards compliant mode'

myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;

} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

//IE 4 compatible

myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;

}

document.getElementById("pfc_container").style.height = (myHeight - 60) + "px";
document.getElementById("pfc_channels_content").style.height = (myHeight - 260)+ "px";

Adjust last two lines to match your style. (change: myHeight -260 to lower or higher value)
Last edited by zagor256 on Tue Oct 12, 2010 9:46 pm, edited 1 time in total.
my site: zasebni stiki
zagor256
Member
 
Posts: 23
Joined: Thu Jul 17, 2008 5:59 pm
Location: Slovenia
  • Website
Top

Postby OldWolf » Mon Oct 11, 2010 8:09 pm

I think you've just answered a very long standing question. ;) I'll sticky it for you, thanks!
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby todhend » Wed Nov 10, 2010 1:47 am

this works great, thanks
http://nflpick.net free football picks
http://tdah.us free webmail script
todhend
Member
 
Posts: 83
Joined: Tue Jan 19, 2010 9:03 pm
Location: Missouri
  • Website
Top

Postby radionow » Mon Dec 13, 2010 9:17 pm

awesome, thank you very much for this.
My Site: http://chickentalk.org/
radionow
Member
 
Posts: 57
Joined: Sun Jan 10, 2010 6:26 pm
Top

Postby littleantz » Tue Apr 19, 2011 12:40 pm

Will this auto fit when chat is inside an iframe?
Last edited by littleantz on Tue Apr 19, 2011 12:41 pm, edited 1 time in total.
littleantz
Member
 
Posts: 14
Joined: Tue Apr 19, 2011 11:36 am
Top

Postby mountpku » Fri Aug 05, 2011 8:37 am

it works, i also do the some research, but no result
thank you
mountpku
New member
 
Posts: 4
Joined: Tue Aug 02, 2011 4:25 am
Top

Postby zagor256 » Wed Aug 10, 2011 1:55 pm

Hi. It works also in iframe.

I have also modifed JS code that when you resize browser window when chat is already loaded it also resize chat dimensions.

So you have to do edits from first post and
also put that code in index.php (somewhere between <head> and </head> n) if you also want realtime resizing:

Code: Select all
<script type="text/javascript">
window.onresize = doResize;
function doResize()
  {
var myWidth;
var myHeight;

if( typeof( window.innerWidth ) == 'number' ) {

//Non-IE

myWidth = window.innerWidth;
myHeight = window.innerHeight;

} else if( document.documentElement &&

( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

//IE 6+ in 'standards compliant mode'

myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;

} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

//IE 4 compatible

myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;

}

document.getElementById("pfc_container").style.height = (myHeight - 60) + "px";
document.getElementById("pfc_channels_content").style.height = (myHeight - 260)+ "px";

var divs=document.getElementsByTagName('div'), d, i=0;
while(d=divs[i++]){
d.id.match(/pfc_online_/)?d.style.height = (myHeight - 260)+ "px":null;
d.id.match(/pfc_channel_content_/)?d.style.height = (myHeight - 260)+ "px":null;
d.id.match(/pfc_chat/)?d.style.height = (myHeight - 260)+ "px":null;
}
}
</script>
Last edited by zagor256 on Wed Aug 10, 2011 1:56 pm, edited 1 time in total.
my site: zasebni stiki
zagor256
Member
 
Posts: 23
Joined: Thu Jul 17, 2008 5:59 pm
Location: Slovenia
  • Website
Top

Postby guttastyle » Sun Mar 04, 2012 8:20 pm

Hello to all,

Does this allow for me to adjust my chat's height to a specific height ? or is this just to make the chat's height 100% / full screen on browser ?
guttastyle
Member
 
Posts: 24
Joined: Sat Mar 03, 2012 5:37 pm
Top

Postby xgamer224 » Mon Mar 05, 2012 3:15 am

Nice! It works for me
xgamer224
Member
 
Posts: 13
Joined: Sun Mar 04, 2012 7:01 am
Location: Austin Texas
Top

Postby guttastyle » Mon Mar 05, 2012 5:01 pm

Does this allow you to adjust the chat's height to a specific height ? or is this just to make the chat's height 100% / full screen on browser ?
guttastyle
Member
 
Posts: 24
Joined: Sat Mar 03, 2012 5:37 pm
Top


Post a reply
10 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 14 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub