Post.asp - remove 'Screensize' option

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67084?pagenum=1
05 November 2025, 10:53

Topic


Andy Humm
Post.asp - remove 'Screensize' option
18 May 2008, 16:33


I am looking to remove the screensize option that appears at the top of post.asp and widen the table out to 100% to bring the edges inline with the table edges of the topic review and reply postings below. Having removed the 'screensize' option could we put a table header in place and provide a title.
I would like to change the format of post from this:

To something like this
I have been having a fiddle with the tables etc and can not pinpoint the exact code to get it to have a 100% table width in the first place. Any help would as always be greatly appreciated.. Andy<

 

Replies ...


MaD2ko0l
18 May 2008, 17:51


dont know if this is what u want but what i have came up with is like so....Line numbers will be different as this si from a modded forums file.
find line 42, shoudl read this

dim strSelectSize

add this below

strSelectSize = 3

change the number as shown

1 = 640x480
2 = 800x600
3 = 1024x768
4 = 1280x1024

if you want a different size you will need to look for this section

select case strSelectSize

and change as necessory


find lines 531 - 553 it should read this

Code:

if strRqMethod = "Edit" or strRqMethod = "EditTopic" or strRqMethod = "Forum" or strRqMethod = "EditForum" or _
strRqMethod = "Reply" or strRqMethod = "ReplyQuote" or _
strRqMethod = "Topic" or strRqMethod = "TopicQuote" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Screensize:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select name=""SelectSize"" size=""1"" tabindex=""-1"" onchange=""resizeTextarea('" & strUniqueID & "')"">" & vbNewLine & _
" <option value=""1"""
if strSelectSize = "1" then Response.Write(" selected")
Response.Write ">640 x 480</option>" & vbNewLine & _
" <option value=""2"""
if strSelectSize = "2" or strSelectSize = "" then Response.Write(" selected")
Response.Write ">800 x 600</option>" & vbNewLine & _
" <option value=""3"""
if strSelectSize = "3" then Response.Write(" selected")
Response.Write ">1024 x 768</option>" & vbNewLine & _
" <option value=""4"""
if strSelectSize = "4" then Response.Write(" selected")
Response.Write ">1280 x 1024</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if


you can either delete or comment that section out

then add this section above the commented section with this

Code:

	Response.Write	"              <tr>" & vbNewLine & _
" <td bgColor=""" & strHeadCellColor & """ noWrap vAlign=""top"" align=""center"" Colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Post</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine


touch wood, this will do more or less what you want it to<
Andy Humm
19 May 2008, 01:47


MaD2ko0l, thank you so far, being at work I have nil access to my files, but reading through the suggestion has the screensize option removal been replaced with alternative code to size the table to 100% similar to the tables below it. I will await reply and give it a try tonight when andy return from shift.. Thank you
andy<
Carefree
19 May 2008, 02:51


Here's another approach:

In post.asp, lines 486-494

Code:

Response.Write	"          </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & Msg & "</font></p>" & vbNewLine & _
" <table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <form name=""PostTopic"" method=""post"" action=""post_info.asp"""

Add the bits in red, and your size will be fixed.
For part 2, adding a title:

Lines 518-520:
Code:

	Response.Write	"              <tr>" & vbNewLine & _
" <td bgColor=""" & strHeadCellColor & """ background=""" & strImageURL & strHeadCellBGImage & """ colspan=""2"" align=""center"" vAlign=""middle""><b><font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strHeaderFontSize & """>Post New " & strRqMethod & "</b></font></td></tr><tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ noWrap vAlign=""top"" align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Screensize:</b></font></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _

Add the line in red, you've got your title. You can keep or discard the screensize resolution at that point.
Edit: I modified the line in the second box to incorporates the changes referred to below.<
Andy Humm
19 May 2008, 04:42


Carefree, thank you does this apply for post.asp?<
texanman
19 May 2008, 09:41


"Having removed the 'screensize' option could we put a table header in place and provide a title"
What happened to your title box? bigsmile <
Andy Humm
19 May 2008, 11:10


Texanman Quote: "What happened to your title box?"
Carefree & MaD2ko0l: Will the table header and title be placed across the current two column table? ie joining the former 'screensize:' heading and pulldown option box cells. See second image in the first post of this thread.<
MaD2ko0l
19 May 2008, 14:29


http://mad2kool.co.uk/forum/post.asp?method=Topic&FORUM_ID=1 theres an example of my code

so to answer you question...yes<
Andy Humm
19 May 2008, 17:02


Spot on MaD2ko0l
Regarding your header code
" <td bgColor=""" & strHeadCellColor & """ noWrap vAlign=""top"" align=""center"" Colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Post</b></font></td>" & vbNewLine & _ " </tr>" & vbNewLine I have slightly changed it so the strheadfontcolor corresonds with the forum status
" <td bgcolor=""" & strHeadCellColor & """ background=""" & strImageURL & strHeadCellBGImage & """ noWrap vAlign=""top"" align=""center"" Colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Post</b></font></td>" & vbNewLine & _

Just as a stroke of professionalism, with the 'Post' title in the header could we utilise the strRqMethod
" <form name=""PostTopic"" method=""post"" action=""post_info.asp"""
select case strRqMethod
case "Topic", "EditTopic", "Reply", "ReplyQuote", "TopicQuote", "Edit"
Response.Write(" onSubmit=""return validate();""")
case else
Response.Write ""
end select
found in post.asp lines 512-518 as it is used for the submit button, so that the form title corresponds with the button. At the moment we have a static heading 'post' but if the select case was used to dynamically change the title to correspond with the different methods of the post.asp. Just a Suggestion!
<
MaD2ko0l
19 May 2008, 18:55


yes...carefree has that bit.
but replace the word "post" with this:

" & strRqMethod & "

with the " marks included, just look at carefree's example if you are stuck<
Andy Humm
20 May 2008, 03:48


Quality! Thank you MaD2ko0l & Carefree
You learn something everyday!
I have just tweaked the title to
"& "Post New  " & strRqMethod & " so that it duplicates what is displayed on the submit button<
© 2000-2021 Snitz™ Communications