• Resolved teeboy4real

    (@teeboy4real)


    Hello,

    Please how can I disablee all gamipress logs, I dont want any logs recorded in database since I used code to award points. I want all gamipress logs Patterns to be disabled.

    // Award 50 ngx-tokens when a post is published
    function gamipress_award_tokens_on_post_publish($new_status, $old_status, $post) {
        if ('post' !== $post->post_type) {
            return;
        }
        if (!is_user_logged_in()) {
            return;
        }
    
        $current_user_id = get_current_user_id();
        $user_roles      = get_userdata($current_user_id)->roles;
    
        // Exclude site admins and authors
        if (in_array('administrator', $user_roles) || in_array('author', $user_roles)) {
            return;
        }
    
        if ('publish' === $new_status && 'publish' !== $old_status) {
            gamipress_award_points_to_user($current_user_id, 50, 'ngx-tokens', '+50 tokens for publishing a new post');
        }
    }
    add_action('transition_post_status', 'gamipress_award_tokens_on_post_publish', 10, 3);

    I use example code above to award points but I dont want recording of logs in database.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Dioni Sánchez

    (@dioni00)

    Hi @teeboy4real,

    I’m sorry but there is currently no option in GamiPress to disable logs.

    In case you are using custom code. I am so sorry but we do not offer support for customizations like that since our main focus is the development and maintenance of GamiPress, AutomatorWP and all official add-ons.

    Anyway, any WordPress custom development agency or freelancer can handle it for you.

    If you do not know one, we recommend checking our list of trusted experts that can estimate any type of job for you here: https://gamipress.com/customizations/

    Thread Starter teeboy4real

    (@teeboy4real)

    Thanks for the feedback, honestly I don’t want any custom development, the code I provided is just an example for explanatory purpose only.

    It really is disappointing that gamipress does not have a simple settings option or filter to disable logs.

    So now I need to go and hire a developer just to disable logs, this is really disappointing.

    Plugin Author Dioni Sánchez

    (@dioni00)

    Hi @teeboy4real,

    Thanks for your reply.

    Logs can be used by add-ons to implement features such as time periods in shortcodes or limitations on events. Disabling them would make some functionality unavailable.

    Thread Starter teeboy4real

    (@teeboy4real)

    I am not using any add ons, I also think disabling logs should be a choice end users should make since they can test things out from their end.

    Having this option to disable logs in settings with a button would be great, all you need to add is a big red warning message beside the button informing users that (Logs can be used by add-ons to implement features such as time periods in shortcodes or limitations on events. Disabling them would make some functionality unavailable.)

    Let end users make the choice by themselves

    Plugin Author Dioni Sánchez

    (@dioni00)

    Hi @teeboy4real,

    Thanks so much for your suggestion.

    We will consider it to include in future updates.

    Hi,

    I was reading this by “accident” – and was wondering if I delete the Logs – will I lose things on my site?

    I have over 1.000.000 entries, and they bloat my DB.

    So I thought – ok – time to empty the Logs. But now I′m not sure any more.

    Can you please tell me, what you mean with “Disabling them would make some functionality unavailable” – so delete them too?

    Thanks for your answer in advance.

    Mikkel

    Plugin Author Dioni Sánchez

    (@dioni00)

    Hi @mikkelcrunch,

    If the logs are deleted, the users’ earnings will not be lost: Points, Achievements or Ranks.

    Logs are used for functionalities such as time periods or the times a user has made a profit. For example, if you have an achievement with the step “User comment a post 5 times”, it is necessary for the user to write 5 comments to obtain the step. Logs are used to keep track of those comments.

    Thread Starter teeboy4real

    (@teeboy4real)

    Hi

    Please can you provide an ETA for when this setting or filter will be available to disable logs. This logs have basically made my site extremely bloated with DB entries and it’s really frustrating.

    If it’s not possible kindly let us know so we can find an alternative solution and delete this plugin.

    Thanks

    Plugin Author Dioni Sánchez

    (@dioni00)

    Hi @teeboy4real,

    Currently the logs are necessary for the correct functioning of GamiPress. I’m sorry but I couldn’t tell you when a change of the type you request can be published.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to disable gamipress logs’ is closed to new replies.