p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   CSS and Forums (http://p2p.wrox.com/showthread.php?t=62727)

ViagraFalls October 8th, 2007 03:56 PM

CSS and Forums
 
Css has been giving me trouble tonight. I tried making the left and right columns a bit wider. After buttloads of frustration for not getting anywhere, I discovered my left column wasn't getting wider because I didn't refresh my page.

However, I'm having some issues with the right column. Specifically, if I make it wider, it almost looks as if it falls behind the maincontent. I.e. the search button is only shown half.

Also, i don't think I played with the width on my actual uploaded site yet (www.entropiaonline.com), but if you look real close, you can see there's a tony little line of gray at the edge of the right-hang column. I assume that never was visible, because it has/had the same colour as the rightcol had before. However, as you can see, I changed the colours, and now that shows. I tried mucking aorund with it a little bit, but also, again, to no avail.

I haven't had time to dig into the AJAX thing yet. I kept getitng new errors and popups, but now those errors only occur after being logged in for about ten minutes, without any activity. Very weird. Still no clue where to look for a session-time parameter or option.

Also, I've been looking into forums. My users are used to vBulletin, and compared to that, TBH forums stink. I've pondered just coding a lot myself, but frankly I'd rather spend my time on other parts of the site. Heck, if users would pick too big a picture as avatar (my users will want their own pictures), the completely forum layout is messed up as it is :(

I've found a few available forums, though (all ASP.NET), and I'd even be willing to go as far as tieing into vBulletin and just copying my user's login stuff in there, and installing some PHP host.

What's your thoughts? I'm most likely going to try and install a few of the forums I found, and let my test-team play around in them to see what they think covers their needs best. I'm more than willing to look into generating the database code, but it's the UI parts of self-generated forum addons that worries me most. I suck at layout, to be honest, and the fact my missus happens to have a keen eye for that kind of stuff doesn't exactly help :p

Cheers,

Peter

http://entropia-online.blogspot.com/

Maxxim October 8th, 2007 04:20 PM

Now you are talking...
In past I eared you saying that it is easy implement some things into TBH forums... Like parent-child category... treeviews etc! I gave you same time to fall in reality! :)
I know because I made an all new forum for asp.net 1.1!
It all can be done but... it take some time!

Quote:

quote:Also, I've been looking into forums. My users are used to vBulletin, and compared to that, TBH forums stink. I've pondered just coding a lot myself, but frankly I'd rather spend my time on other parts of the site. Heck, if users would pick too big a picture as avatar (my users will want their own pictures), the completely forum layout is messed up as it is :(
Don't worry...
for the avatar image, use something like this:

Code:

<%# checkImage(Eval("AvatarUrl")) %>

// write some CheckImage(urlString) function that will check if the image with is bigger than 110px (for example) if it is... then resize to 110px

For the other images in forums you can do one of two things:
by css like:

Code:

<div class="postContent">
<%# Eval("Message") %>
</div>

css:
.postContent{
width:445px; /* td width */
overflow:auto;
word-wrap: break-word;
}
//this css lines are very usefull! Because if some user post an url with 100 characters without spaces, your design will be corrupted!
//overflow:auto;word-wrap: break-word; avoid that making an horizontal scroll just for that div!

The second choice (my choice is a little javascript):
You can use css together, just for avoid bigwords/urlLinks without spaces
Code:

  function resize_images()
  {
    for (i = 1; i < document.images.length; i++)
    {
      while ( !document.images[i].complete )
      {
        break;
      }
      if ( document.images[i].width > 445 )
      {
        document.images[i].width = 445;
      }
    }
  }
//-->
        </script>
...
<body onload="resize_images()">

But now we have a problem... with masterpage we can't acess to the body in order to write:
Code:

<body onload="resize_images()">
But the javascript function is very usefull and works in my forum!
If you have a method to run this function with masterpages please tell me

I hope it helped!

Max


Maxxim October 8th, 2007 04:25 PM

BTW, vbulletin is a paid php forum!

Why don't you use a free yetAnotherForum ASP.NET/C# forum?

I studded YAF and i think that it is one very good forum!




ViagraFalls October 9th, 2007 12:51 AM

I looked at YAF and wasn't overly impressed with it, tbh.

I've downloaded a free forum, programmed by Frans Bouma (called Hnd), I found instantasp, and a forum by jotbit. Especially instantasp seems to offer similar functionality as vB. And frankly, I'm not too worried if I have to put down a few hundred bucks. The way I see it is that if I have to spend time developing the stuff myself, and then calculate back the amount of time, my guess is I could just as well start working in a Chinese Sweatshop (for those not familiar, this hints at places (mostly run in China) where people do boring stuff for minimum wage all day).

Cheers,

Peter

http://entropia-online.blogspot.com/

Maxxim October 9th, 2007 06:57 AM

lol

It's a matter of taste... I prefer YAF than vBulletin!
YAF is incredible faster! You have various themes to change your design and it's easy to personalize more stuff if you want!
But... this is just my opinion!
Quote:

quote:
The way I see it is that if I have to spend time developing the stuff myself, and then calculate back the amount of time, my guess is I could just as well start working in a Chinese Sweatshop (for those not familiar, this hints at places (mostly run in China) where people do boring stuff for minimum wage all day).
I understand your point!But for me is different! I don't use TBH for my necessity! I use TBH because i want to improve my knowledge!
WebDevelopment it's not my area... I'm a civil Engineer!
So... as I intended to have a megaPortal, with a forum, I decided to make my own!

But I understand you! You just want a forum were people talk, nothing more and you don't want to take much time to implement it!

BTW... If you don't mind to put down some hundred bucks, you can give some of them and I give a 100% personalized forum in asp.net 2 total integrated with TBH!

:) I'm joking


ViagraFalls October 9th, 2007 09:12 AM

Actually, your assumption is not right ;)

I chose TBH because I intend to do massive amounts of code, and I want a proper framework to do it under. For the moment, what matters to me is ensuring my userbase will have a top-notch forum to work against (as they are used to that kind of stuff), but the minute that the forum is finalised, I'll continue work on other functionality. (I'd have prefered to finish everything in one go, but circumstances force me to now really quickly find a forum solution).

Basically, this site I'm currently working on will be a testcase for me. I have quite a few plans for later on, all of which will use a framework extremely similar (but much more feature-rich) than TBH.

Cheers,

Peter

http://entropia-online.blogspot.com/

kherrerab October 9th, 2007 09:39 AM

there is also snitz forums and dmg forums


ViagraFalls October 9th, 2007 01:04 PM

Thanks, kherrerab. I'll be sure to check those out, too :)

In the meantime, I still fail to see why I cannot make the rightcol broader. It has an absolute position, with right set to 0. I did not set any width to the centercol, so why, when I make the rightcol broader, doesn't it work?

Anyone who might know? *pouties*

Cheers.

Peter


http://entropia-online.blogspot.com/

ViagraFalls October 9th, 2007 03:01 PM

For those interested, I ended up solving my avatar picture issue by adding some more properties to the fileupload control.

I added one to indicate a MaxFileLength (default to 22 * 1024), and one to indicate ImagesOnly defaulting to true.

Then, after verifying the user did select a file to upload with a size bigger than 0, I added the following bit of code:

if (filUpload.PostedFile.ContentLength > MaxFileLength)
{
   lblFeedbackKO.Text = "File is too big! The maximum filesize is: " + MaxFileLength.ToString() + " kb";
   lblFeedbackKO.Visible = true;
   return;
}

if (PicturesOnly)
{
   if (filUpload.PostedFile.ContentType != "image/gif" ||
   filUpload.PostedFile.ContentType != "image/jpg" ||
   filUpload.PostedFile.ContentType != "image/jpeg")
   {
      lblFeedbackKO.Text = "Images only, please!";
      lblFeedbackKO.Visible = true;
      return;
   }
}

and Bob's my uncle.

http://entropia-online.blogspot.com/

Maxxim October 9th, 2007 03:50 PM

Peter, didn't you liked the javascript code that I gave you?

I have this validator too!
I control the image.size (kb) and the image width...

But remember that some peoples have their avatar image hosted somewhere else and then You don't have a way to solve this!
Unless you use the code that I gave you!

One more thing:
Try to insert on your post message this:

http://www.sdfasdfasdf.com/sadfasdfa...shdfjklhasdjkf

With css scripts that i gave you you solve this.
But try for yourself!
I remember that I lost one day trying to solve this!


All times are GMT -4. The time now is 04:08 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.