HTML Logo by World Wide Web Consortium ( Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS. ocPortal 9 is superseded by Composr 10.

Head over to for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.

standard AED module class....

Login / Search

 [ Join | More ]
 Add topic 
#91366 (In Topic #18384)

Community saint

How to phrase this….

I have figured out what 'ad' and 'ed' do, or go to (I think).. but what about 'ac' and 'ec'?   

I am editing a table, but one of the fields in that table is the id number in a different table, so I'm trying to set up to edit that second table…    I based all this on looking into the code and seeing that similar things that have 'category' editors do this as well…

Perhaps I need to go through the aed class a bit more..

Code (php)

        function misc()

                return do_next_manager(get_screen_title('OCREWARDS_TITLE'),comcode_lang_string('DOC_OCREWARDS'),
                                                /*       type                                                     page   params                                                                                                  zone*/
                                                // how do I add add/edit options for rtypes?

Back to the top

ad=add form
_ad=save the add
ed=choose what to edit
_ed=edit form
__ed=save the edit
ac=add form (category)
_ac=save the add (category)
ec=choose what to edit (category)
_ec=edit form (category)
__ec=save the edit (category)

The category ones are called via chaining aed_module classes together. The main aed_module class contains a reference to the class for managing categories, in $cat_aed_module

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Support me on Patreon
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top

Community saint

Ok.   For the rewards addon I am working on, I use ad, ed for the main table.

There is another table ('types') that keeps the type of rewards… the main table uses this one.

Should I be using ac and ec?   

My main module is "class Module_admin_ocrewards extends standard_aed_module"   then after the code to handle the main database (and all this works), I have :

"class Module_admin_ocrewards_cat extends standard_aed_module" …

Is that the correct methodology for the 'ac' and ec' to get to the right place?    

And do I just generate the forms in the _cat class  like I did for the main database?   

Back to the top

Community saint

The answer to my question above is "Yes".

Back to the top
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: