1
Mox20
Declaring several pages of comments in a xoops_version
  • 2009/11/5 12:40

  • Mox20

  • Just popping in

  • Posts: 16

  • Since: 2008/12/13



Hello,

I am trying to do me a small module, everything goes well and all thanks to the doc, but I block on one thing: the comments!

I proceed as below, but it works on a page, or video.php photo.php.

[code] $ modversion [ 'hasComments'] = 1;
$ modversion [ 'comments'] [ 'itemName'] = 'video_id';
$ modversion [ 'comments'] [ 'pageName'] = 'video.php';

$ modversion [ 'comments'] [ 'itemName'] = 'photo_id';
$ modversion [ 'comments'] [ 'pageName'] = 'photo.php';

$ modversion [ 'comments'] [ 'callbackFile'] = 'include / comment_functions.php';
$ modversion [ 'comments'] [ 'callback'] [ 'approve'] = "mymodule_com_approve";
$ modversion [ 'comments'] [ 'callback'] [ 'update'] = "mymodule_com_update"; [/ code]

It should perhaps be like this?
[code] $ modversion [ 'comments'] [1] [ 'itemName'] = 'photo_id';
$ modversion [ 'comments'] [1] [ 'pageName'] = 'video.php';

$ modversion [ 'comments'] [2] [ 'itemName'] = 'photo_id';
$ modversion [ 'comments'] [2] [ 'pageName'] = 'photo.php'; [/ code]


Sorry for my bad English, it is google translation.

Thank you in advance for your answers.

2
Mox20
Re: Declaring several pages of comments in a xoops_version
  • 2009/11/6 20:29

  • Mox20

  • Just popping in

  • Posts: 16

  • Since: 2008/12/13


Up

3
ghia
Re: Declaring several pages of comments in a xoops_version
  • 2009/11/6 22:37

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think there is only one item to comment on available per module. See Wiki and tutorial.

This should mean that you have in some way to unify your video and photo items in one table, so that the id of a photo and video are not doubled.
An added type field could then distinguish what is a video or photo and then join a second data table or use the appropriate fields in the record.
Also video.php and photo.php has to be united as eg show.php, which could do an include of (a slightly modified) video,php or photo.php depending on the type field of the item.

Login

Who's Online

413 user(s) are online (293 user(s) are browsing Support Forums)


Members: 0


Guests: 413


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits