Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #51 (permalink)  
Old May 15th, 2007, 02:04 PM
plb plb is offline
Authorized User
 
Join Date: Jan 2007
Location: Oakland, CA, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ignore all that avatar code I posted before. It creates a serious bug. If you have an UploadFile ascx control in your user profiles you can't register. Th UploadFiles control throws a security exception for unregistered users.

I ripped all of it out of my current project. I will think about this again.

Pat

http://weboperahouse.com
  #52 (permalink)  
Old June 28th, 2007, 01:02 PM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Any of you worked in these issues ? :

- private messages between users.
- show users that are online in the forum
- statistics
- diferent topicimages for topics written more recent than last visit
- polls
- search engine
- different moderators for different forums. They can edit all topics, but only on the forum that they are moderate.

?

I made all this in thePhille v1...
I need to implement this stuff in beerhouse. If any of you made this, please tell me
  #53 (permalink)  
Old June 29th, 2007, 12:01 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

Quote:
quote:Originally posted by plb
 Ignore all that avatar code I posted before. It creates a serious bug. If you have an UploadFile ascx control in your user profiles you can't register. Th UploadFiles control throws a security exception for unregistered users.

I ripped all of it out of my current project. I will think about this again.

Pat

http://weboperahouse.com
how can it be... works fine in my site.

  #54 (permalink)  
Old July 2nd, 2007, 12:44 PM
plb plb is offline
Authorized User
 
Join Date: Jan 2007
Location: Oakland, CA, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I havn't gotten around to fixing this. If it works for you it gives me hope.

http://weboperahouse.com
  #55 (permalink)  
Old July 23rd, 2007, 11:40 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: , , .
Posts: 131
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kherrerab Send a message via Yahoo to kherrerab
Default

this topic should be sticky

  #56 (permalink)  
Old August 24th, 2007, 06:32 PM
Authorized User
 
Join Date: Aug 2007
Location: Moscow, , Russia.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there!
Can anyone post the "tbh_Forums_UnCloseThread" procedure? The link to the archive where it supose to be is dead...

Thanx!

  #57 (permalink)  
Old August 24th, 2007, 06:40 PM
Authorized User
 
Join Date: Aug 2007
Location: Moscow, , Russia.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by 99mary
 Choice avatar with loading on server if to whom will be necessary

UserProfile.ascx

<asp:FileUpload ID="filUpload" runat="server" />&nbsp;
<asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Add" CausesValidation="false" />

UserProfile.ascx.cs

     protected void btnUpload_Click(object sender, EventArgs e)
     {
         lblFeedbackKO.Visible = false;
         lblFeedbackOK.Visible = false;
         if (filUpload.PostedFile != null && filUpload.PostedFile.ContentLength > 0 && filUpload.PostedFile.FileName != string.Empty)
         {
             try
             {
                 // if not already present, create a directory named /Uploads/<CurrentUserName>
                 string dirUrl = (this.Page as MB.TheBeerHouse.UI.BasePage).BaseUrl +
                     "Uploads/" + this.Page.User.Identity.Name;
                 string dirPath = Server.MapPath(dirUrl);
                 if (!Directory.Exists(dirPath))
                     Directory.CreateDirectory(dirPath);
                 // save the file under the user's personal folder
                 string fileUrl = dirUrl + "/" + Path.GetFileName(filUpload.PostedFile.FileName);
                 string _inputFile = fileUrl;
                 string contentType = filUpload.PostedFile.ContentType;
                 int contentLength = filUpload.PostedFile.ContentLength;
                
                 if (contentType != "image/pjpeg" && contentType != "image/gif" && contentType != "image/jpeg" && contentType != "image/x-png")
                     {
                         lblFeedbackKO.Visible = true;
                         lblFeedbackKO.Text = "Only GIF, JPEG and PNG image types are supported.";
                        
                     }
                 else

                         if (contentLength > 25000)
                         {
                             lblFeedbackKO.Visible = true;
                             lblFeedbackKO.Text = "Avatar images must be less than 25K in size.";

                         }
                         else
                         {
                             System.Drawing.Image image = System.Drawing.Image.FromStream(filUpload.PostedFi le.InputStream);
                             if (!((image.Width > 0 && image.Width <= 100) && (image.Height > 0 && image.Height <= 100)))
                             {
                                 lblFeedbackKO.Visible = true;
                                 lblFeedbackKO.Text = "Avatar images must be no larger than 150 by 150 pixels.";

                             }
                             else
                             {
                                 filUpload.PostedFile.SaveAs(Server.MapPath(fil eUrl));
                                 txtAvatarUrl.Text = fileUrl;
                                 lblFeedbackOK.Visible = true;
                                 lblFeedbackOK.Text = "File is successfully added.<br /> For change necessary to save profile.";
                             }
                         }
                        
                 }
            
             catch (Exception ex)
             {
                 lblFeedbackKO.Visible = true;
                 lblFeedbackKO.Text = ex.Message;
             }
         }
     }




I have following in my window: The name 'Directory' does not exist in the current context.
Also You did not said that it is necessary to locate the two <asp:Label> named OK & KO. Please, post the whole code-behind file for this feature.


  #58 (permalink)  
Old September 14th, 2007, 07:22 AM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by jimibt
 OK,

Finally, the latest version of this forums/posts thing. this release includes both the new layout for the Forum listing as per previous messages, toghether with the much vaunted Priority flag for top level posts (can only be applied by admin/editors of course!!).

ok, grab yourself the code here:

http://www.worldindependentnews.com/...UpdateV1.3.zip
Jimi, I saw that you have foruns and subforuns, right?
But who do you manage them into your admin pages?

I entered on your site with sampleeditor account but I only see, for example, 5 or 7 "GENERAL FORUMS" etc...



  #59 (permalink)  
Old September 14th, 2007, 09:03 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Quote:
quote:Originally posted by Maxxim
 
Quote:
quote:Originally posted by jimibt
Quote:
 OK,

Finally, the latest version of this forums/posts thing. this release includes both the new layout for the Forum listing as per previous messages, toghether with the much vaunted Priority flag for top level posts (can only be applied by admin/editors of course!!).

ok, grab yourself the code here:

http://www.worldindependentnews.com/...UpdateV1.3.zip
Jimi, I saw that you have foruns and subforuns, right?
But who do you manage them into your admin pages?

I entered on your site with sampleeditor account but I only see, for example, 5 or 7 "GENERAL FORUMS" etc...
max,

at the moment, i don't!!. i plan to do the admin stuff at the end (a bad plan perhaps, but at present, i use sql scripts to manage some of the more esoteric stuff) of this project, so i'll update you on that in 6-8 weeks :)

jimi

http://www.originaltalent.com
  #60 (permalink)  
Old September 14th, 2007, 05:13 PM
Friend of Wrox
 
Join Date: Mar 2006
Location: , , Portugal.
Posts: 310
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok!

Thanks jimi!

I want to implement n-level subforums... With hierarchical format... If you had something I thought that I could had a look.!
But no problem... I start from zero!


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Extensions ilegend .NET Framework 3.5 1 September 19th, 2008 03:32 AM
Some Extensions plb BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 July 29th, 2008 11:57 AM
PHP Extensions Dnigma Pro PHP 0 June 22nd, 2006 12:41 AM
File Extensions nbnelson C# 2 August 25th, 2003 12:09 PM
converting Forum.aspx to Forum.ascx (help) drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 11th, 2003 12:27 PM



All times are GMT -4. The time now is 10:42 PM.


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