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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Height size of first topic post - possible bug?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Lon2
Junior Member

USA
151 Posts

Posted - 04 February 2009 :  16:44:39  Show Profile
I searched but didn't find.

I noticed the first post of every topic in our forum the table height size of 100% does not expand out like every other post after it. For example: If you post a new topic with just a few words or a short sentence, the topic looks like this (minus left cell; user name, avatar, etc):

|--------------------------------------|
| Posted - 04 February 2009...------------|
|--------------------------------------|
| Just a few words or a short sentence. |
|--------------------------------------|
| Signature----------------------------|
|--------------------------------------|

But yet the exact "just a few words or a short sentence" posted again after the topic's first or initial post yeilds this:

|--------------------------------------|
| Posted - 04 February 2009...- - - -------|
|--------------------------------------|
| Just a few words or a short sentence. |
|--------------------------------------|
|--------------------------------------|
|--------------------------------------|
|--------------------------------------|
|--------------------------------------|
| Signature----------------------------|
|--------------------------------------|

Both message body's are set to valign=top and height=100%. We are using a migrated database so I'm not sure if there are any hickups regarding that. Any clue on what's causing the table formatting issues?<

AnonJr
Moderator

United States
5768 Posts

Posted - 04 February 2009 :  17:29:18  Show Profile  Visit AnonJr's Homepage
Got a link we can look at? Or at least a screenshot?<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 February 2009 :  17:35:11  Show Profile  Visit HuwR's Homepage
seems to work ok here, do you have any mods installed ?<
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 04 February 2009 :  18:16:51  Show Profile  Visit MaD2ko0l's Homepage
if i remeber correctly its somthign with the avatar mod and the signature messing up.

i noticed thsi problem years ago but didnt know what i was lookign for or how to explain it.

so i left it.

just post topics that have more lines than the size of the things in the left colum (username/ranks/avatar/posts etc etc etc) and it only happends on the initial topic.

all replies are normal<

© 1999-2010 MaD2ko0l
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 05 February 2009 :  04:53:47  Show Profile  Visit MarcelG's Homepage
Yep, this is a known 'issue'. I fixed it years ago by making the height of the initial post dependent on having an avatar or not, and that seems to do the trick.<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 05 February 2009 04:54:08
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 February 2009 :  04:57:12  Show Profile  Visit HuwR's Homepage
so is this an issue with the avatar mod ?<
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 05 February 2009 :  08:15:44  Show Profile  Visit MarcelG's Homepage
Well, it's triggered by the Avatar mod. The issue is with the declaration of the height of the TD.

here's the structure of the first post
<tr>
                <td bgcolor="#F5F5F5" valign="top" width="100" nowrap>
<p>topicstarter info and postcount
</p></td>
<td bgcolor="#F5F5F5" width="100%" colspan="2" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
icons
<hr noshade size="1"></td>
                    </tr>
                    <tr>
                      <td valign="top" height="100%">
<font face="Verdana, Arial, Helvetica" size="2" color="#191970">
<span class="spnMessageText" id="msg"> 
post
</span id="msg"></font></td>
                    </tr>
                  </table>
                </td>
              </tr>

The reply however looks like this:
<tr>
<td bgcolor="#DCDCDC" valign="top" width="100" nowrap>
<p><p>topicstarter info and postcount</p>
</td>
<td bgcolor="#DCDCDC" height="100%" width="100%" colspan="2" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
icons
<hr noshade size="1"></td>
</tr>
<tr>
<td valign="top" height="100%">
<font face="Verdana, Arial, Helvetica" size="2" color="#191970"><span class="spnMessageText" id="msg">
reply
</span id="msg"></font></td>
</tr>
<tr>
<td valign="bottom"><hr noshade size="1">
<font color="#191970" face="Verdana, Arial, Helvetica" size="2">
<span class="spnMessageText"> <font size="1">
signature
</span></font></td>
</tr>
<tr>
<td valign="bottom" align="right" height="20">
<a href="#top">
<img src="icon_go_up.gif" width="15" height="15" border="0" alt="Go to Top" title="Go to Top" align="right" /></a>
</td>
</tr>
</table>
</td>
</tr>

The statement height=100% in the original post, but that statement does not work, as it won't grow to the size of the surrounding table.
I think that thát was the cause of this problem.

In my topic.asp I fixed the function GetFirst with this piece of code:
	if lcase(Member_Name) <> "guest" then		
	if Member_Avatar <> strImageURL & "noavatar.gif" or Member_Avatar <> "" then
	'there is an avatar, so minimum height = 100
		if CanShowSignature = 1 and Topic_Sig = 1 and Topic_MemberSig <> "" then
		' there's also a signature, you can remove at least 10 pixels from the topicheight 
			if instr(Topic_MemberSig,"[img]") = 0 then
				'there's no image in the signature ; remove another 10 pixels.
				topicheight = "95"
			else
				'there is an image in the signature, remove 50 pixels
				topicheight = "40"
			end if
		else
			'no sig, maximum topicheight
			topicheight = "100"
		end if
	else
	'no avatar, keep the height to a minimum
		topicheight = "40"
	end if	
	else
	topicheight = "5"
	end if
	If isSpider = 1 Then
			topicheight = "40"
	end if	

This value, topicheight, is then used down the line to set the height of the first post.
<td colspan=""2"" valign=""top"" height=""" & topicheight & """>

Beware, it's specific to Oxle, as it also includes the guest-mod.
Also, it's not a 100% correct fix, but it remedies the symptoms in 99% of the cases.

Sourcecode: http://oxle.com/source.asp?page=topic.asp&lines=yes (demo/demo).<

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 05 February 2009 08:21:15
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 05 February 2009 :  10:37:01  Show Profile
I think there's another bug with this (or the mod); when no avatar is selected, it doesn't load the noavatar.gif image.<

Edited by - Lon2 on 05 February 2009 10:47:57
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 05 February 2009 :  11:12:05  Show Profile
I found the culprit of the height problem and it's not related to the avatar mod. It's the table cell or data (TD) surounding the message body table. It's missing the "height=100%" attribute. When I add it, all is well! Thanks to everyone that tried to help!

Here's the fix: In topic.asp under "sub GetFirst()" routine, the very first Response.Write, 2nd line, change this:

"<td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """"
to this:

"<td bgcolor=""" & strForumFirstCellColor & """ valign=""top"" width=""" & strTopicWidthLeft & """ height=""100%"""
Now there is another spot that may or may not need updating, I'm not sure. In the same routine under the "if strCountry" the second Response.Write, second line, has another Table Data without height. Does anyone know which table this line belongs to?

Now for the "noavatar.gif" avatar mod issue. I guess I'll start a new topic in the mod forums, Huwr. <

Edited by - Lon2 on 05 February 2009 11:58:32
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 05 February 2009 :  12:21:02  Show Profile
quote:
Originally posted by HuwR

seems to work ok here, do you have any mods installed ?

To answer your question, Huwr, no mods that effect this table. We are, however, working with an older upgraded version, which may be the reason. We've been running Snitz Forums for 6 or 7 years now, and I think we've upgraded 2 or 3 times. Incidently, this was way before you kicked my partner off Snitz Help Forums for disagreeing with you about moving one of our topics on your forums. He had nothing but good things to say about Snitz up until that happened. But I guess that's an issue with you personally so I won't rub salt in old wounds. <
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 February 2009 :  17:43:25  Show Profile  Visit HuwR's Homepage
well, I would disagree, since it is the avatar mod that requires you to add the height=100% then it is an issue with the avatar mod not a bug in the snitz code, the issue does not affect the base code in any way and it does not require the height attribute, the avatar mod does.

<
Go to Top of Page

Lon2
Junior Member

USA
151 Posts

Posted - 06 February 2009 :  14:30:42  Show Profile
That's fine, Huwr. Go ahead and move this topic over to mods so it may help others with the same problem. Feel free to edit my subject line accordingly, as well.<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07