cornernote / yii-audit-module

Track and display usage information including page requests, database field changes, php errors and yii logs.
https://cornernote.github.io/yii-audit-module
Other
22 stars 13 forks source link

I ran the application, but the field does not work? #16

Open vinao opened 10 years ago

vinao commented 10 years ago

Could someone help me??Please

cornernote commented 10 years ago

Hello,

To track field changes add AuditFieldBehavior to your CActiveRecord behaviors() functions.

class Post extends CActiveRecord
{
    public function behaviors()
    {
        return array(
            'AuditFieldBehavior' => array(
                // Path to AuditFieldBehavior class.
                'class' => 'audit.components.AuditFieldBehavior',

                // Set to false if you just want to use getDbAttribute and other methods in this class.
                // If left unset the value will come from AuditModule::enableAuditField
                'enableAuditField' => null,

                // Any additional models you want to use to write model and model_id audits to.  If this array is not empty then
                // each field modifed will result in an AuditField being created for each additionalAuditModels.
                'additionalAuditModels' => array(
                    'Post' => 'post_id',
                ),

                // A list of values that will be treated as if they were null.
                'ignoreValues' => array('0', '0.0', '0.00', '0.000', '0.0000', '0.00000', '0.000000', '0000-00-00', '0000-00-00 00:00:00'),
            ),
        );
    }
}

Let me know if it's still not working.

chiragjindal commented 9 years ago

i ran the application /audit and all buttons display i.e. error,field,log,request but when I click the buttons the requested page does not open. Maybe it is not redirecting to that page?

cornernote commented 9 years ago

Hello @chiragjindal,

This is really difficult to debug with so little information. Add me to skype (username cornernote) and I will help you via teamviewer.