Welcome, Guest
Username: Password: Remember me

TOPIC: Flypage and comment section

Flypage and comment section 03 Oct 2012 17:04 #4252

Hi i was creating a component that has a flypage with information from the DB. I should possible that user can comment the information in the flypage. But i don't know how it is possible to create it.
I know how to link tables and i have create a seperated table for the comments. But how can i display it on the frontpage and user are possible to create/edit comments.

Thanks for the Help
The administrator has disabled public write access.

Re: Flypage and comment section 15 Nov 2012 22:49 #5398

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Well, a comment would be a completely separate entity so you would need to call your comments model/form into the same page i.e. 'import' your comments form into the view file.

Lots of other posts about similar design consideration... Please have a search around the forum ;)

Best of luck,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Flypage and comment section 21 Nov 2012 10:53 #5555

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I would say :

Have a Table 'Comments'

A Comment has a FK to an item.

2 solutions :

1° The simpliest, if you ONLY have to do this on fly page.
-> Your 'Fly' page of 'Item',
is now a 'Form' page of 'Comment'

-> This form receive a value for 'Item'
do it with a filter, so this filter value will be recieved through url. (&filter_item=xxx)

-> For the moment, let the combo for item selection, then transform it in hidden field, when everything works

-> Merge the item fly inside the form page.
If the filter_item is setted, load an item model based on this ID and the fly shows up with theses informations.

-> Below, in the form, you keep your text zone for filling up a comment.

-> This technique can be used to edit the comment.

Try this first, because the second way is more complex and can be done in 2 different ways.
The second solution is better because cleaner. You stay in the Item view to add a comment and is it better than going to a 'Comment' view. Much better.

If you are experienced in dev, choose the second technique, and let's talk about it.
If you are in hurry, do this one explained here, wich you can realize in 20 minutes.

The best here is AJAX, anyway. Because Joomla has difficulties to receive multiparts forms in native, so Ajax is a good workaround, and nice user experience.

Have fun. I am busy, but enjoy to help.
The real meaning of life. ;-)
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.099 seconds

Get Started