18
I'm still working on my first big XOOPS module, but I encountered another problem:
I want to enable Comments on certain items. I have a page, a.php, which should be called like 'a.php?a={code}', where code is a string (not an integer, a 'varchar' of 10 digits/characters (so it *can* be an int, but isnt necessarily so)). I cannot change this 'code' thing, its an ID I need to query other services.
Now I did what is in the Wiki: I added
$modversion['hasComments'] = 1;
$modversion['comments']['itemName'] = 'a';
$modversion['comments']['pageName'] = 'a.php';
to my xoops_version.php, copied the mylinks comment files to my module root, added everything to my template,...
Now when I try to add a comment, it's never displayed. I took a look in my database (xoopscomments). Everything seems to be correct over there, except 'com_itemid'. I guess this one should be the $_GET['a'] thing, isnt it?
Problem is: if I want to add a comment on page 'a.php?a=596002564', the value '16777215' is stored as com_itemid, because that column is of type mediumint(8) UNSIGNED, which isn't the right thing for my application (should be varchar(10)).
Is there any way to get around this problem? And if there is none (except changing the layout of the xoopscomment table), is it safe to do so?
Greetz, Ikke