I am not a programmer but I am attempting to use Fabrik to provide additional functionality to a Joomla package that I have loaded on my website. The package is Alphauserpoints which is a reward system for users engaging in the website.
Alphauserpoints (aka Altauserpoints) has a feature called "medals" where an admin (or automated process) can award users a medal. I want to add on a feature where the users can admin their own medals (award, delete, modify).
To do this I need to pick up information from the following tables.
jos_users - to get the Joomla username and ID,
jos_alphauserpoints - to get the Alphapoints user id (which is different to the Joomla ID, the Joomla ID is in a field within the table row.
jos_alphauserpoints_medals - each entry represents a medal that a user has, so from zero entries to X entries depending on how many the user has. Contains the medal type and the Alphapoints user id.
jos_alphauserpoints_rank - defines the medal types.
So I have successfully got a List working (to show the medals the logged in user has) and a Form (to allow the editing/deletion/modifying of medals.
To pick up the data I need to display, I use the join "Join" function within the data tab of List.
I am confused about the "ORDER" of the join and its effect on the operation of the list/form.
If I use jos_users as the "primary" entry ( ID>>Alphapoints ID>>Alphapoint Medals>>Alphapoint Rank) then all the displays work but any delete function works on the jos_users table, deleting the user instead of the medal.
If I use alphauserpoints_medal as the "primary" entry then ADD/MODIFY/DELETE works just fine except in the case where the user has no medals in the first instance when I get a "Duplicate ENtry for id=0" entry when adding. I presume this is because there is no userid reference in a blank new medal to follow through the joined tables to get the real user id.
Basically the "master" userid is jos_users and I want to add/delete/modify info in the medals table without affecting the other tables, including starting from a zero medal point.
Any advice on the ordering/setup I need to do this. I feel I am really "close but no medal" to coin a phrase.
Alphauserpoints (aka Altauserpoints) has a feature called "medals" where an admin (or automated process) can award users a medal. I want to add on a feature where the users can admin their own medals (award, delete, modify).
To do this I need to pick up information from the following tables.
jos_users - to get the Joomla username and ID,
jos_alphauserpoints - to get the Alphapoints user id (which is different to the Joomla ID, the Joomla ID is in a field within the table row.
jos_alphauserpoints_medals - each entry represents a medal that a user has, so from zero entries to X entries depending on how many the user has. Contains the medal type and the Alphapoints user id.
jos_alphauserpoints_rank - defines the medal types.
So I have successfully got a List working (to show the medals the logged in user has) and a Form (to allow the editing/deletion/modifying of medals.
To pick up the data I need to display, I use the join "Join" function within the data tab of List.
I am confused about the "ORDER" of the join and its effect on the operation of the list/form.
If I use jos_users as the "primary" entry ( ID>>Alphapoints ID>>Alphapoint Medals>>Alphapoint Rank) then all the displays work but any delete function works on the jos_users table, deleting the user instead of the medal.
If I use alphauserpoints_medal as the "primary" entry then ADD/MODIFY/DELETE works just fine except in the case where the user has no medals in the first instance when I get a "Duplicate ENtry for id=0" entry when adding. I presume this is because there is no userid reference in a blank new medal to follow through the joined tables to get the real user id.
Basically the "master" userid is jos_users and I want to add/delete/modify info in the medals table without affecting the other tables, including starting from a zero medal point.
Any advice on the ordering/setup I need to do this. I feel I am really "close but no medal" to coin a phrase.