close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Follow Up Questions: For my Premiere Ticket

Thread began 8/23/2011 10:46 pm by Sly Verano | Last modified 9/30/2011 7:57 am by Jason Byrnes | 3923 views | 9 replies |

Sly Verano

Follow Up Questions: For my Premiere Ticket

Hi Guys,

How can i display who's comment is that and the profile picture of the one who comment to that

profile page, and also displaying the date and time of that of the comment. another is how can i add a REPLY

to that particular comment.

Because Ray only teach me the basic, how to display the user's comment to that profile page.

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

In the comments table, you should have a column that relates the comment to the user that posted it. You would need to create a join query to return the users information, along with the comment.

I dont know the structure of your users table of the structure of your comments table, so cannot giver you the exact SQL query to use, but it would be something along the lines of:

SELECT users.firstName, users.lastName, users.profilePic, comments.*
FROM comments
INNER JOIN users ON comments.userID = users.userID

then to display that on your comments page you can use the bindings panel to bind the userFirslt name and last name column, and add an image tag to show their profile picture:

<img src="path/to/images/<?php echo $row_RecordsetName['profilePic']; ?>" />


to show the date the comment was made, your comments table would need to have a date column that stored the date, then use the bindings panel to add the binding for the date just like the others.

Sign in to reply to this post

Sly Verano

Hi Jason,

Thanks for the response. It's sounds clear into my mind now.

-------------------------------------------------------------------

But, How could I do the REPLY to that comment ? Should I create another table which is

tbl_reply ? Or another field for the comment table ?

Thanks in Advanced.

Sign in to reply to this post

Jason ByrnesWebAssist

in the comments table you would need to a reply column, and a primary key column.

if it is a regular comment, set the value of the reply column to 0. if it is a reply comment, set the value of the reply column to the ID from the primary key column for the comment that is being replied to.

Sign in to reply to this post

Sly Verano

Okay Thanks Jason,

Just let me clarify it.

In my comment table I will also add reply column and another primary key for that reply column. Right ?

So therefore their are two primary keys in the comment table. The first is the comment_id and the second is the reply_id. Right ?

Yes it is a reply comment, but what do you mean I will set the value of the reply column... blah blah blah ... ? Can you elaborate it well. I didn't understand what to do want to tell.

Thanks in Advanced Again ... :)

Sign in to reply to this post

Jason ByrnesWebAssist

no, only one primary key column in the table, not 2.

in the replyID column, you will store the value from the primary key column of the comment it is a reply to.

lets say you have a comment record where the comment_id column is "22"

to create a reply to that comment, in the new comment record that is created, the replyId column will get the value "22"

the reply ID column is used to tell it which comment the reply relates to.

Sign in to reply to this post

Sly Verano

Oh I see. Thanks a lot.

----------------------

  to create a reply to that comment, in the new comment record that is created, the replyId column will get the value "22"

the reply ID column is used to tell it which comment the reply relates to.  



but how could the reply_id column get the value of "22" ?

Thanks In advanced Again.

Sign in to reply to this post

Jason ByrnesWebAssist

you would need to have a hidden form element, set the hidden form element to the value of the parent comment, when the reply button is clicked, trigger an insert record behavior to insert the reply comment.

In the insert record behavior, set the reply_id column to use the value from the hidden form element.

Sign in to reply to this post

Sly Verano

Hi Jason,

I already have my recordset to view the comment and it's already on a repeat region,. and

now I will create the reply to that comment. my problem is when I attached a new HTML

Editor inside that repeat region. THe html editor did'nt repeat ... only at first comment

contains the new HTML Editor and the rest of the comments doesn't have that new

HTML Editor that I attach (the new HTML Editor is for my Reply to Comment)....

-------------------------------------------------------------

can you teach me what is the proper set-up in building a reply to comment ...

Thanks a Lot

Sign in to reply to this post

Jason ByrnesWebAssist

the HTML Editor should not be in a repeat region.

next to each comment, you would have a link to another page to replay to it. This link will send the comment ID as a querystring variable.

on the next page, have the HTML Editor text box to enter the reply, and a hidden form element that is set to capture comment ID form the querysting.

in the insert record behavior, set the reply_id column to use the hidden form element. and the comment column to use the HTML Editor instance.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...