Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Closed)
 (v3.4.03) Design Change/Screensize on post screen
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 07 March 2003 :  21:12:48  Show Profile
In earlier versions of the forum, when you changed the screen size via the dropdown box on the Post screen, the change would immediately be changed in the cookie via javascript. While working on v3.4, this behavior was removed because it wasn't working.

redbrad0 was the one who brought this to my attention.

changes will need to be made in 2 files, post.asp & inc_code.js

post.asp

on line #515 find the following:
			"                <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea()"">" & vbNewLine & _
and replace it with this:
			"                <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea('" & strUniqueID & "')"">" & vbNewLine & _



inc_code.js

on line #423 find the following function:
function resizeTextarea()
{
	if (document.PostTopic.SelectSize.value == 1)
	{
		document.PostTopic.Message.cols = 45;
		document.PostTopic.Message.rows = 11;
	}
	if (document.PostTopic.SelectSize.value == 2)
	{
		document.PostTopic.Message.cols = 70;
		document.PostTopic.Message.rows = 12;
	}
	if (document.PostTopic.SelectSize.value == 3)
	{
		document.PostTopic.Message.cols = 90;
		document.PostTopic.Message.rows = 12;
	}
	if (document.PostTopic.SelectSize.value == 4)
	{
		document.PostTopic.Message.cols = 130;
		document.PostTopic.Message.rows = 15;
	}
}
replace the entire function with the following:
function resizeTextarea(tmpCookieURL)
{
	var today = new Date();
	var expires = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000); // plus 365 days
	if (document.PostTopic.SelectSize.value == 1)
	{
		document.PostTopic.Message.cols = 45;
		document.PostTopic.Message.rows = 11;
	}
	if (document.PostTopic.SelectSize.value == 2)
	{
		document.PostTopic.Message.cols = 70;
		document.PostTopic.Message.rows = 12;
	}
	if (document.PostTopic.SelectSize.value == 3)
	{
		document.PostTopic.Message.cols = 90;
		document.PostTopic.Message.rows = 12;
	}
	if (document.PostTopic.SelectSize.value == 4)
	{
		document.PostTopic.Message.cols = 130;
		document.PostTopic.Message.rows = 15;
	}
	document.cookie = tmpCookieURL + "strSelectSize=" + document.PostTopic.SelectSize.value + "; expires=" + expires.toUTCString()
}
This may affect some MODS that use the Screensize function, if so, they will just need to use the change to post.asp above as an example of what needs to be changed.

Also, since inc_code.js is usually cached, after this change is made, users may see an error when trying to use the Screensize dropdown box. Using <CTRL> <F5> will force your browser to reload the page (including the inc_code.js file) from the server (instead of from cache).

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 17 June 2003 :  07:38:42  Show Profile
added to v3.4.04
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07