Using PHP within added page

Discussion in 'aMember Pro v.4' started by rked, Oct 24, 2012.

  1. rked

    rked New Member

    Joined:
    Jun 11, 2007
    Messages:
    29
    Can PHP be used on a page created within Amember?
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    No, this is disabled by security reasons.
  3. regis

    regis aMember Pro Customer

    Joined:
    Aug 29, 2006
    Messages:
    40
    I am trying to extend my application into the zend framework because of the advantages but not sure how to go about it yet...

    I know I can add my own functionality into am/application/configs/site.php - and also create plugins at am/application/default/plugins/misc/myfile.php

    I also know there is also ability to create your own custom modules under am/application/mymodule/
    (just copy structure from am/application/aff/)

    My question is for more advanced applications with multiple CRUD pages which is the best method to try and develop?

    Create your own plugin and use site.php? Or create your own Module under am/applications/mymodule/?

    Thanks!
  4. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    I'd recommend to create new module. It will take time to learn but you will be able to do virtually anything.

    Regarading CRUD - Zend Framework provides no component for it, hopefully we have implemented our own. Look at Am_Grid_Readonly and Am_Grid_Editable and many usage examples in aMember code. It will also require to include a bit of JavaScript code (by default forms are ajax'ed).
    If you have any questions, feel free to ask.
    regis likes this.
  5. regis

    regis aMember Pro Customer

    Joined:
    Aug 29, 2006
    Messages:
    40
    Thanks Alex, as usual you have a great answer to a complex problem.

    Cheers,

    Sean.
  6. regis

    regis aMember Pro Customer

    Joined:
    Aug 29, 2006
    Messages:
    40

    Is there documentation anywhere that lays out a basic starting module?

    I have tried by copying the aff module but it seems to break amember or give errors in the error logs...
  7. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021

Share This Page