Post.asp - remove 'Screensize' option - نوشته شده در (3769 Views)
Average Member
Andy Humm
مطلب: 908
908
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<
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
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<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
Andy Humm
مطلب: 908
908
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<
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
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.<
نوشته شده در
Average Member
Andy Humm
مطلب: 908
908
Carefree, thank you does this apply for post.asp?<
نوشته شده در
Junior Member
texanman
مطلب: 410
410
"Having removed the 'screensize' option could we put a table header in place and provide a title"
What happened to your title box? bigsmile <
نوشته شده در
Average Member
Andy Humm
مطلب: 908
908
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.<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
http://mad2kool.co.uk/forum/post.asp?method=Topic&FORUM_ID=1 theres an example of my code

so to answer you question...yes<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
Andy Humm
مطلب: 908
908
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!
<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
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<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
Andy Humm
مطلب: 908
908
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<
 
شما باید یک متن وارد کنید