Architecture :: Creating A Comments Page For Users To Review And Comment On An Article?

Dec 12, 2010

I am trying to create a comments page for users to review and comment on an article. I have 2 buttons on each comments posted by users; "Like" and "Don't Like". I am stuck with how to track which user voted already for a given comment. I am thinking of two options and would like to know if they are they way to go or is there a better solution.

Option 1: I have created a table in my database with stores, the comment id, the userid of the user who rated it and the value "like" or "don't like". So each time I have to query my table to find out if this user indeed vote for a given comment. The table unfortunately grows exponentially!!

Option 2: I store the commentid, userid, and "like" or "don't like" value in a cookie on the client's machine. I read the cookie and find out if the user has already voted on a comment. This is proving to be VERY quirky with cookie expiration, growing cookie size and also multiple users on the same machine.

In either way, my test case of ~1500 users, and 2 Million comments, this is getting to be HEAVY on both methods. Is there anything better?

View 3 Replies


Similar Messages:

C# Article / Review Backend - Add Images In Text

Jul 29, 2010

I'm constructing a new cms with the option to create reviews and articles (blog items). Now if the user wants to write a review he/ she will want to add a lot of images in the text. Now my question to you is , what would be the best option to include those images (with keeping in mind that a CDN can be used later). I was thinking of the following methods:

Break an article in multiple blocks, each block can then include a picture and text. Just add the picture in the text via WYSIWYG editor (easiest option but not so versatile) Upload images separately and include them via tags in article text. Like Title{img_1}Content

View 2 Replies

Web Forms :: Article Blog Website With Category Comments

Sep 20, 2012

I have a following requirement:

1. Create a blog with content and images.

2. Category for blogs

3. Comments on each blog

4.  Monthly Archives, Recent Blogs and Recent comments. 

View 1 Replies

Forms Data Controls :: Show The Number Of Comments From An Article On A ListView ?

Mar 16, 2010

I have a Listview showing all articles. And i'd like to show the number of comments that... that article has.

Shall i call a method inside the listing ?

Then on my code behind i started implementing the following code:

[Code]....

Where on my listview shall i call this function ? SHould i return an int ?

View 3 Replies

How To Provide Ability For Users To Comment On Webpage

May 28, 2010

I need a few options on how I will allow a user to post simple text comments to my website page(s). I will require login to post comments in order to prevent spam posters.

I'm using Visual Web Developer 2010 to design my website. I'm not real familiar with it and do not know if it includes the tool I need to accomplish this task easily.

View 42 Replies

Architecture :: Text - Upload Images Related To Article

Dec 10, 2010

The user can write articles and upload images related to that article. Let's say that there is a form that collect the article text and, under it, there is a FileUpload control for images. Here, I have a question. What if the user has uploaded some images and then he closed the browser, before submitting, cancelling the operation? the images have been uploaded to the server wasting space!

one solution I've figured out is to store "ImageInfo"s in a list, and store the list in the Session object. And when the user submit the article, the images in the list should be marked as "related" and then inserted. and in the Session_End event I should delete every image does not have the "related" mark.

View 6 Replies

Architecture :: Generic Comments Module (Database Design And Implementation)

Feb 10, 2010

I am in the process of redesigning our main product, a knowledge database system for clients to access clinical and specialist advice articles. There is a requirement to add "Social Networking" to this allowing users to connect and post remarks etc...

This is somewhat similar to the Facebook wall scenario - where Articles, Photos, Groups, Products, Events, ActivityFeed can all have comments. I am at a lose as to the database design I would need to implement this. All comments must allow for Moderation/Approval/Spam Reporting etc...

I originally thought a individual table for each Comments entity ex: ArticleComment, ProductComment would work as the comments themselves are not all directly related. Each table having the same exact columns. But this makes life abit awkward as then this creates a separation between something that for all purposes is the same i.e. They are all comments.

The other design idea was to have a single Comment table with an "arc" type relationship to related tables with FK references back to the source.

The other option was to have a single Comment table with an Object Type and XID but this breaks the rules of relation and does not all for referential integrity.

I am at a lose and don't know what to do. I have asked over at SQLCentral.com and all I have done is raised more questions than answers about what to do.

Design 1: This would require exact copies of this table for all the entities.

-- Photo Comments --
CREATE TABLE dbo.PhotoComment
(
CommentID int IDENTITY(1,1) NOT NULL,
PhotoID int NOT NULL,
Body ntext NOT NULL,
ReportedAsSpam bit NOT NULL CONSTRAINT [DF_PhotoComment_ReportedAsSpam] DEFAULT (0),
IsSpam bit NOT NULL CONSTRAINT [DF_PhotoComment_IsSpam] DEFAULT (0),
IsApproved bit NOT NULL CONSTRAINT [DF_PhotoComment_IsApproved] DEFAULT (1),
CreatedDate datetime NOT NULL,
CreatedBy uniqueidentifier NOT NULL,
UpdatedDate datetime NOT NULL,
UpdatedBy uniqueidentifier NOT NULL,
IsDeleted bit NOT NULL CONSTRAINT [DF_PhotoComment_IsDeleted] DEFAULT (0),
CONSTRAINT [PK_PhotoComment] PRIMARY KEY (CommentID),
CONSTRAINT [FK_PhotoComment_PhotoID] FOREIGN KEY (PhotoID) REFERENCES dbo.Photo(PhotoID),
CONSTRAINT [FK_PhotoComment_CreatedBy] FOREIGN KEY (CreatedBy) REFERENCES dbo.aspnet_Users(UserId),
CONSTRAINT [FK_PhotoComment_UpdatedBy] FOREIGN KEY (UpdatedBy) REFERENCES dbo.aspnet_Users(UserId)
)

Design 2: The "Arc" relationship

CREATE TABLE dbo.Comment
(
CommentID int IDENTITY(1,1) NOT NULL,
CommentType char(1) NOT NULL CHECK(CommentType IN ('A','I','E','G','U','P')),
Body ntext NOT NULL,
ReportedAsSpam bit NOT NULL CONSTRAINT [DF_Comment_ReportedAsSpam] DEFAULT (0),
IsSpam bit NOT NULL CONSTRAINT [DF_Comment_IsSpam] DEFAULT (0),
IsApproved bit NOT NULL CONSTRAINT [DF_Comment_IsApproved] DEFAULT (1),
CreatedDate datetime NOT NULL,
CreatedBy uniqueidentifier NOT NULL,
UpdatedDate datetime NOT NULL,
UpdatedBy uniqueidentifier NOT NULL,
IsDeleted bit NOT NULL CONSTRAINT [DF_Comment_IsDeleted] DEFAULT (0),
CONSTRAINT [PK_Comment] PRIMARY KEY (CommentID),
CONSTRAINT [FK_Comment_CreatedBy] FOREIGN KEY (CreatedBy) REFERENCES dbo.aspnet_Users(UserId),
CONSTRAINT [FK_Comment_UpdatedBy] FOREIGN KEY (UpdatedBy) REFERENCES dbo.aspnet_Users(UserId),
CONSTRAINT [UC_Comment_CommentID_CommentType] UNIQUE (CommentID, CommentType)
)

-- Article Comments --
CREATE TABLE dbo.ArticleComment
(
ArticleID int NOT NULL,
CommentID int NOT NULL,
CommentType char(1) CONSTRAINT [DF_ArticleComment_CommentType] DEFAULT 'A', CHECK (CommentType = 'A'),
CONSTRAINT [PK_ArticleComment] PRIMARY KEY CLUSTERED (ArticleID, CommentID),
CONSTRAINT [FK_ArticleComment_ArticleID] FOREIGN KEY (ArticleID) REFERENCES dbo.Article(ArticleID),
CONSTRAINT [FK_ArticleComment_CommentID] FOREIGN KEY (CommentID) REFERENCES dbo.Comment(CommentID),
CONSTRAINT [FK_ArticleComment_CommentID_CommentType] FOREIGN KEY (CommentID, CommentType) REFERENCES dbo.Comment(CommentID, CommentType)
)

Design 3: The one that breaks the rules

CREATE TABLE dbo.Comment
(
CommentID int IDENTITY(1,1) NOT NULL,
ObjectType char(1) NOT NULL, /* A = Article, P = Photo etc... */
XID int NOT NULL, /* Would be the ID of the main entity being queried. */
Body ntext NOT NULL,
ReportedAsSpam bit NOT NULL CONSTRAINT [DF_Comment_ReportedAsSpam] DEFAULT (0),
IsSpam bit NOT NULL CONSTRAINT [DF_Comment_IsSpam] DEFAULT (0),
IsApproved bit NOT NULL CONSTRAINT [DF_Comment_IsApproved] DEFAULT (1),
CreatedDate datetime NOT NULL,
CreatedBy uniqueidentifier NOT NULL,
UpdatedDate datetime NOT NULL,
UpdatedBy uniqueidentifier NOT NULL,
IsDeleted bit NOT NULL CONSTRAINT [DF_Comment_IsDeleted] DEFAULT (0),
CONSTRAINT [PK_Comment] PRIMARY KEY (CommentID),
CONSTRAINT [FK_Comment_CreatedBy] FOREIGN KEY (CreatedBy) REFERENCES dbo.aspnet_Users(UserId),
CONSTRAINT [FK_Comment_UpdatedBy] FOREIGN KEY (UpdatedBy) REFERENCES dbo.aspnet_Users(UserId),
CONSTRAINT [UC_Comment_CommentID_ObjectType_XID] UNIQUE (CommentID, ObjectType, XID)
)
-- Ex: Get all comments for article ID 23.
SELECT * FROM Comment Where ObjectType ='A' and XID = '23'

View 1 Replies

How To Make The Blog Comments Posted By Users Safe

Mar 10, 2011

I'm in the process of creating a blog engine on my website. Nothing fancy. The user will register some basic information, including the comment itself that is the issue of this question.Inside the comment field, the user can write some text, but there are currently nothing stopping him from writing anything harmful there, that would mess up the page when rendering it with comments

View 2 Replies

C# - Efficiently Removing Naughty Words From Users Comments?

Oct 25, 2010

I have an ASP.NET app that accepts users comments and them in a SQL database. I want to make sure that I weed out any "naughty" words so I can keep my app respectable. Problem is that I'm finding there are LOTS of these words. ;>My question is, what's the most efficient way to do this processing? Should I have a table in SQL and write a stored proc that does the work? Should I do it with c# and Regex in memory on the web server? Are there other options? Has anyone else successfully done this kind of text scanning at scale? If y, what worked?

View 4 Replies

SQL Server :: How To Get Most Active Users Who Insert New Articles And Wrote Comments

Jan 14, 2011

I would like show top active users in my Index page. How I can get most active users who insert new articles , and wrote comments?

How I can get latest 10 records in table A?

View 5 Replies

Architecture :: Providing Users With Unique Home Page Like In Facebook?

Oct 29, 2010

I am trying to provide each user with his/her own link to my website link we have in facebook e.g www.facebook.com/user_name.

How can we do this.

View 2 Replies

Social Networking :: Display Facebook Comments And Allow User To Post Comments To Wall

May 7, 2013

How user post comment on my website  using gmail ,fb,yahoo ,hotmail account ...

how to apply this.. [URL] ....

View 1 Replies

Making A Comment Page?

Sep 6, 2010

i want to make a comment page but i don't know where to start or how to do this. The member of my page must make a comment about videos, articles etc.

View 3 Replies

Create PDF From Article Page?

Feb 9, 2010

I have a article page, in the top right corner i have small icon like pdf, when click that i have to create pdf and open. i have seen fews link, those just showing static html creattion.

View 7 Replies

AJAX :: Implement A Comment Box, Such That The Page Doesnot Reload?

May 26, 2010

i thought of a textbox and a submit button,when submit button clicked comment extracted from textbox and saved into the database using sql.and displayed in literal.but all this is server sided,please help by providing example script for the following,please note i googled and googled but cannot find a satisfy easy and efficient answerOnMouseClickextract text from textbox saving it to a variable send the variable value to server instructing it to save the value in a db in a particular field of a particular table.simple words,facebooks comment box and the status updates box how are they implemented,thousands and thousands of them use it, still it doesnot get slow no postbacks observed to page reloading etc.

View 4 Replies

Comments Forum In A Web Page

Oct 10, 2010

i have this forum page on my website. I want when users leave comment, the old comments should be at the bottom and new comments at the top. The code for that is below:

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"
DeleteCommand="DELETE FROM [forum] WHERE [Postingid] = @Postingid"
InsertCommand="INSERT INTO [forum] ([UserName], [TheDateTime], [Subject], [Message]) VALUES (@UserName, @TheDateTime, @Subject, @Message)"
SelectCommand="SELECT * FROM [forum] "
UpdateCommand="UPDATE [forum] SET [UserName] = @UserName, [TheDateTime] = @TheDateTime, [Subject] = @Subject, [Message] = @Message WHERE [Postingid] = @Postingid">
<DeleteParameters>
<asp:Parameter Name="Postingid" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="TheDateTime" Type="String" />
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Message" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="UserName" Type="String" />
<asp:Parameter Name="TheDateTime" Type="String" />
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Message" Type="String" />
<asp:Parameter Name="Postingid" Type="Int32" />...........................

View 1 Replies

MVC :: Details & Comments Post On Same Page

Nov 11, 2010

I have a details page, which lists the selected Restaurant. I want to be able to add comments at the bottom and display them. I have managed to add comments but only on a different page, i am struggling to get both the datails and the Comment create on the same form. This is what i have:

Controller
[Code]....

View Model
[Code]....

View
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BestRestaurant.ViewModels.RestaurantDetailsViewModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Details</h2>
<fieldset>
<legend>Fields</legend>
<div>R_ID</div>
<div><%: Model.Restaurant.R_ID%></div>
<div>R_Name</div>
<div><%: Model.Restaurant.R_Name %></div>....................

View 1 Replies

Displaying Comments And Images On Web Page

Sep 9, 2012

I am new in vb.net ... I am working on a project where users are able to post comments and also to be able to upload images. I am able to save the comments and also able to save the images to the database as a binary.

I am able to show the comments thru a listview as a user adds the comments, but how can i show the comments and the images. this would be similar like "Facebook"

View 1 Replies

Forms Data Controls :: How To Display Image For Every Article In My Page

Mar 28, 2011

i need to display image for every article in my page (articles information in data base ) and i have control panel to add,delete,edit articles how to display image for every article i made fileupload that store images in folder ,but when i insert article's title,details, image name ,the image does n't appear in page

i wrote ImageUrl='<%#Eval("image")%>'

View 1 Replies

AJAX :: Code Comments Functionality Into A Web Page

Apr 19, 2010

how I would code a comments functionality into a web page. So a user can leave a comment on a page and rate it, out of 5, for instance. How would this look in terms of C Sharp??

View 1 Replies

Architecture :: Creating .net Forms On The Fly Not Using InfoPath?

Jan 25, 2011

I'm currently looking into a project where specific users can create web forms on the fly and save them as templates whcih are data bound.I know InfoPath has this ability; but you need SharePoint unfortunately we do not have this. I have looked into XForms, but found nothing helpful within the .net arena.Has anyone done something similar or know of a product within the .net arena which could be used.

View 1 Replies

Facebook Comments Plugin Not Working On Aspx Page?

Jan 24, 2011

I'm trying to get the facebook comments plugin working on my aspx page..but it is not appearing on the page.

I am using the Facebook.NET api from codeplex for authorization. I inserted the code that was generated from the Facebook Comments plugin page...

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId={MyApp's ID}&amp;xfbml=1"></script>
<div>
<fb:comments numposts="15" width="425" publish_feed="true"></fb:comments>
</div>

I can see that the script is retrieved by inspecting the resulting html code in firebug...but can't figure out why the plugin is not being rendered...

View 1 Replies

Architecture :: Creating A DB Connection In My DAL Class File?

Feb 17, 2010

Below is my class file.

[Code]....

View 1 Replies

Architecture :: Creating A Simple Backend Without A Database?

Feb 11, 2010

I want to start creating sites with simple backends! I don't know much about databases though and I don't want to jump straight into creating sites with databases anyway. So I want to find out what the best way of creating a simple backend without using a database is.

I have an asp.net webpage which is a prices page detailing the prices of services at a hair salon. The prices change every 6 months so I want to give the client a simple backend so he can update the prices himself. The backend will just be a table of inputs populated with the current prices which can be changed and then click 'save changes' to update the site.

Now what is the best way of implementing this?

A) In the prices page, hard code an html table, within each cell code a <span> tag with an id for the price that will go within the span tag like id="menscut" and within the span tag hard code the price of the service. Then wirte a C# class called 'edit' that is used when the 'save changes' button is clicked on the backend page. When 'save changes' is clicked the 'edit' class parses the prices.aspx page and finds <span id="menscut">£20</span> and then changes it to <span id="menscut">£22</span> (or what ever new price has been entered in the backend) and then saves the new edited prices.aspx page over the old one on the server.

or

B) Don't hard code prices into the prices.aspx but instead store the prices in a seperate .txt or .xml file. Every time the prices.aspx page loads it runs a class called 'populate' which extracts the prices from the .txt file or .xml file and inserts them into the table in the prices.aspx page. And now the edit class instead of editing the prices.aspx page it edits the .txt or .xml file.

So which of those ways is better, or if they are fairly even pegged what are the pros and cons of each?

Or are there any other options I haven't thought of?

View 3 Replies

Architecture :: How To Handle Multiple Users Changing Same Data

Mar 24, 2010

I have a form which allows users to modify data, what's the best way to handle that so if two or more users try to make an update i get the data in there properly without overriding the new stuff. for example if name and bday are in the form, user1 changes name but not bday, same time user2 accesses the form, the original name and bday are there, user1 saves, but when user2 saves, since he had the original name value the original is saved over the first.

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved