Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2007, 02:14 PM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Jimi!

You said a very good truth...
Share the code only matters if someone have some time to "join" our pieces!
I think I made a good job on my hierarchical articles and Forums(with private messages, Polls, etc...) but my site is customized for my needs! And my needs are different from yours and Peter, and oooshola, and kherrerab, etc
Unfortunately all this resumes in "money"... I have a child with 4 years to feat... and a place to mantain! I don't have time to do a similar application who can glad all users like Marco was intended to do!
But marco was paid by that book, and the end-user application was not so good as I expected... (If it was you don't see me here so many times :) )

But If someone is interested I could share all my work!
Unfortunately i erased all my "TehBeerHouse" connections... I renamed my files and some classes, because from TBH i just used some "core good methods"...

For example, all my textSite is written in Portuguese language!

From the past 3 days I'm working on CSS layout! I have a relation love/hate with css! :) It's needed to have a good result that work with Firefox and IE at least, but when I finished I promise here that I will use my Flash Software to film me navigate on my site! If some of we want to improve something that i had seen on my future video I'll help!
I give the code and the help to someone who wants to connect this with TBH in order to everybody could understand... (I need to finish my css layout/Change from Portuguese to English and conclud my Forums)

The problem it's that I have a hundred ideas to implement on TBH but I'm a little timeless
 
Old October 13th, 2007, 09:02 AM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

Quote:
quote:
You might want to say something to Jim, don't know if he would set you up a special thread here or something but it might be worth a shot =]
I think this makes sense. In terms of practical organization though, would it make more sense to make this a separate forum here, like "TheBeerHouse Modifications"? I think as 1 thread, it might get overwhelming and confusing. Let me know if that is what all of you are looking for and if so, I'll create a new forum.

BTW, responding on another bit of this thread, about whether or not Marco is interested in what all of these great loyal readers and TheBeerHouse users have to say: yes, he is, but this forum is by far and away the single most active book forum we have. It's great to have so many interested readers. So, Marco isn't able to follow the forum but I digest and pass along the most interesting ideas from time to time (I sent him 2 more this morning!). And, as you have probably noticed, Eric the tech editor spends a ton of time in the forum and I've also hired a 2nd technical editor from the forum faithful. (Did you all know that's how I found Eric to begin with? He was doing such a great job answering questions on the ThePhile and the first book I felt like I had to hire him if he'd let me.<g>) Having tech editors from the forum working on the book is another way the best ideas get digested and fed back to Marco as suggestions for each chapter where appropriate. Hope this helps!

Jim Minatel
Acquisitions Director
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Wrox online library: http://wrox.books24x7.com
 
Old October 15th, 2007, 01:56 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Jim,

A subforum sounds great. I'd love to nominate jimis Forum and Search functionality to be on there for sure. One minor issue I can see, though, is that most likely a lot of us will end up adding a lot of functionality combined. I.e. We not only alter the forums, and add the search functionality, but we also implement the above-mentioned picture resizing control (working on something right now), etc. I think that when something like this would be enabled, we should try to ensure we also link to any "other" modifications required to implement a single new feature, to ensure that any cross-mod functionality would be picked up by users.

Peter

http://entropia-online.blogspot.com/
 
Old October 15th, 2007, 02:02 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

To get back to the original idea of the thread. I'll see what I can do regarding a control to handle image resizing.

As a request of my own, I would love hearing ideas on how to implement something like the following (I posted this in another thread already, but perhaps adding it here works, too).

I want to be able to "group" things. I.e. I'm going to write code to deal with private messages real soon. With a little effort, it will be similar (though much more simple to start off with) to the vBulletin code. Now if I want to check my "inbox" of, say, 50 messages max, I'd like to be able to group the messages. Ie:

[Today's messages]
Message 1
Message 2
[Yesterday]
Message 3
Message 4
[Last week]
Message 5
Message 6
Message 7
Message 8
etc.

I can easily do the grouping by in SQL code. However, my problem lies in not being able to figure out how to implement tose category holders. It's easy enough to return the recordset, but it's the UI bit that's got me baffled. How could I place the category headers in a way that ensures they work properly (and possible my users can choose to collapse them to hide the underlying messages), without returning multiple recordsets?

Anyone got any ideas? The same technique would/could be used when classifying other hierarchical data across the site.

Thanks!

http://entropia-online.blogspot.com/
 
Old October 15th, 2007, 07:41 AM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Peter!

I'm having my private messages on wheels! It's the easy thing to do comparing to "new posts since last visit" that i'm working about right now!

Let's see your example:
1: I think that nobody receive so many private messages
2: You don't need to group by date in sql select!
3: I didn't use a messages limit! I used "allmessages delete after 2 months the Addeddate"

Let me explain:
2: I have a procedure that select all my messages with "toMember = Me.User.Identity.Name"... order by "addeddate"
  Then, when you bind your messages inside a repeater You could and should give different color to Repeater/GridView depending the message.AddedDate.
  The normal way is % Eval("AddedDate") % but you could have a function in codeBehind to define the date and depending on that you define all repeater/gridview item (cell..)
 For example: % CheckDateEval("AddedDate")) %
Code:
        Public ReadOnly Property getDate(ByVal mydate As DateTime) As String
            Get
                If Not CType(data, DateTime) = DateTime.MinValue Then
                    Dim Hours As String = Format(myDate, "HH:mm")
                    Dim TotalDate As String = Format(myDate, "ddd dd MMMM yyyy").ToString & " " & Hours
                    Dim currentDay As DateTime = DateTime.Now 
                    If myDate.Date = currentDay.Date Then
                                    Return "Today at " & Hours
                    ElseIf myDate.Date = currentDay.AddDays(-1).Date Then
                                    Return "YesterDay at " & Hours
            Else : Return TotalDate
            End If
                Else : Return "-"
                End If
            End Get
        End Property
You don't need to complicate with SQL group and hierarchy select!
If you want databind different repeaters depending on date you could have the principal list and then filter the dates you want and bind the repeater/gridview you want!

 
Old October 15th, 2007, 07:49 AM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

BTW, my Pmsg class is:

        Private _isRead As Boolean = False
        Private _toMember As String = ""
        Private _authorNumPosts As Integer = 0
        Private _title As String = ""
        Private _body As String = ""
(and ID, AddedDate, AddedBy from Base Forum)

The defaultValue for IsRead is 0(false).
When the user read this message on the page (ReadPmsg.aspx) update your pmsg table (update IsRead from 0 to 1 on Pmsg table)
With that, when user bind all pmsg he can see with different image which are old and new...

Don't forget security procedures... :
In all pages from the mailbox: you should always make samething like this:

Dim pmsg as new bll.Forums.Pmsg = bll.Forums.Pmsg.getPmsgById(request.querystring("p msgid"))
If Not Me.User.Identity.Name.ToLower = pmsg.toMember.toLower then
 response.redirect("Default.aspx")
End If
 
Old October 15th, 2007, 07:58 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Maxxim,

I can assure you that 50 PMs is not going to cut it for my users ;) Also, I want them to perceive my website as highly reliable, so I would not want to autmatically delete PMs if they haven't indicated they want to delete it. (On another note, I plan on encrypting the body of the messages in order to boost their feeling of security). Yes, my end-users are a paranoid bunch of talk-happy people that do love their privacy ;)

I'll have to check out your code tonight. However, the setup i supplied above wasn't neccessarily meant only for private messages. I also intend to use it to indicate ForumCategories, and most likely in multiple other parts of the website.

Thanks :)

Peter


http://entropia-online.blogspot.com/
 
Old October 15th, 2007, 08:09 AM
Friend of Wrox
 
Join Date: Mar 2006
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unfortunately i don't have my forums ready yet, because if I have you could see and get some ideas!

I have this on Forums:
 Categories
  Forum
   SubForums

On my Forum/Default.aspx (your ShowForums.aspx) I have:

[repeater datasourceID = "categories"]
  [repeater item]
    [div = categoryTitle]
    [gridView Datasource=% GetForumsInCategory(ID)%] //This ID is the categoryID /]
  [/repeater item]
[/Repeater]
[datasource name="categories" -> get all categories]

Codebehind:
Code:
        Protected Function GetForumsInCategory(ByVal categoryID As Integer) As List(Of BLL.Forums.Forum)
            Return BLL.Forums.Forum.GetForums(categoryID) 'forumsByCateg
        End Function
The getForums( byval categoryID int) only connect to DB once, because if it already exist on cache extrate from that list only the forums that have categoryID = currentcategoryID

I hope you understand my "draw"...
 
Old October 15th, 2007, 08:43 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maxxim,

That sounds about right... I'll have to give that a go some time soon. So little time, so much to do :)

Thanks,

Peter

http://entropia-online.blogspot.com/
 
Old October 15th, 2007, 12:41 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

Maxxim,

Did you create a seperate forum categories table? Or are you "reusing" the one from articles? (I'll most likely end up getting a new one for it).

Just wondering :)

Peter

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









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