• Resolved lnikj

    (@lnikj)


    4.6.1 / 1.4.02

    Pressing delete just leads to ‘Deleting …’ showing until a page refresh and a banner at the top of the page:

    Deletion failed: Are you sure you want to do this?Please try again.

    Is it safe to just zap the directory by FTP or is there stuff in the database (which I have no phpmyadmin access to unfortunately).

    Thanks.

Viewing 15 replies - 16 through 30 (of 41 total)
  • Repair Forums doesn’t resolve it.

    Plugin Author Jake Hall

    (@geekserve)

    @tronix-ex,

    Can you confirm [bbp-stats] and [bbpas-activity] return the same data? (They are shortcodes, pop them on a page somewhere)

    • This reply was modified 7 years, 11 months ago by Jake Hall.
    • This reply was modified 7 years, 11 months ago by Jake Hall.

    [bbpas-activity] return nothing while [bbp-stats] returns the exact counts

    Plugin Author Jake Hall

    (@geekserve)

    Hi @tronix-ex,

    Can you enable the shortcode within Forums > bbPress Advanced Statistics > Extras > Enable Shortcode and give it another shot.

    Thanks.

    `

    Now it shows so the results are below:

    [bbp-stats] counts:
    Topics 328
    Replies 5,146

    [bbpas-activity] counts:
    Threads: 328, Posts: 333

    • This reply was modified 7 years, 11 months ago by tronix-ex.
    Plugin Author Jake Hall

    (@geekserve)

    So for some forums this is working.

    Others, such as your own, it isn’t. I have actually create a test plugin for this, would you mind installing it and letting me know what it returns? Simply add the code below to your functions.php file:

    <?php
    function bbp_get_stats_bf() {
         $stats = bbp_get_statistics();
         return "Replies: ." . $stats['reply_count'] . "<br>Topics: " . $stats['topic_count'];
    }
    
    add_shortcode( 'bbp-get-stats', 'bbp_get_stats_bf' );
    

    All it will do is fetch the stats, and, return them in a shortcode. Once you install this, can you add the shortcode ‘bbp-get-stats’ to the others you’ve setup and get back to me? Can I also have a link to your forum if possible?

    Thanks,

    ok I’ve added the function and it returns exact counts.

    here is the demo url 1st is the bbp-stats 2nd is the bbpas-activity and 3rd is bbp-get-stats.

    • This reply was modified 7 years, 11 months ago by tronix-ex.
    Plugin Author Jake Hall

    (@geekserve)

    hi @tronix-ex,

    thanks for that. honestly not sure where this is going AWOL. I’ll take a look into it tomorrow a little more, however, I can’t replicate this bug so it’s essentially guesswork.

    what version of PHP do you have installed?

    also – I didn’t manage to see the link. if you’d like to keep it private, email it to me ??

    thanks,

    Hi Jake @geekserve,

    I’ve figured it out explained below.

    Edited this file:
    bbpress-improved-statistics-users-online\includes\public\class.online.php

    Changes on Line number 397
    $stat_replies to $stats['reply_count']

    and all done..

    Thanks Jake for such a great plugin once again, I hope the bug will help other peoples also.

    • This reply was modified 7 years, 11 months ago by tronix-ex.
    • This reply was modified 7 years, 11 months ago by tronix-ex.

    Here is the forum URL

    https://danishgardi.pk/whos-online/

    Plugin Author Jake Hall

    (@geekserve)

    Hi @tronix-ex,

    Glad you managed to suss that – do note with the change you have made you will not be able to count the original post within each topic in the stats.

    Could you do me a quick test? Before I push this fix out, can you update class.online.php with the following code and let me know if it works?

    Replace:
    $stat_replies = ( ( $this->parent->option['bbpress_statistics_merge'] == "on" ) ? ( $stats['reply_count'] + $stats['topic_count'] ) : $stats['reply_count'] );

    with:

    $stat_replies = $stats['reply_count'];
                    
                    if( $this->parent->option['bbpress_statistics_merge'] == "on" ) {
                        $stat_replies = $stats['reply_count'] + $stats['topic_count'];
                    }
    

    and change the variable you changed earlier back to $stat_replies? That should hopefully fix the issue fully!

    – Jake

    No its now showing a wrong count.

    Plugin Author Jake Hall

    (@geekserve)

    Hi @tronix-ex,

    Do you have the option bbPress Statistics Merge enabled?

    Really bizarre this issue, I would very much like to resolve it.

    – jake

    Yes its checked.

    Plugin Author Jake Hall

    (@geekserve)

    @tronix-ex,

    Can you uncheck it and see what happens. That will then display the replies.

    It seems to be an issue when adding the replies and topics… could you try this code with the option ticked and let me know what happens?

    $stats = bbp_get_statistics();
                    
                    $stat_replies = $stats['reply_count'];
                    
                    if( $this->parent->option['bbpress_statistics_merge'] == "on" ) {
                        $stat_replies = ( intval($stats['reply_count']) + intval($stats['topic_count']) );
                    }
                    
                    $HTMLOutput["forum_stats"] = $this->shortcode_tool_build_title( __('Forum Statistics', 'bbpress-improved-statistics-users-online'), false );
                    
                    if( $this->parent->option['bbpress_statistics'] == "on" ) {
                        $HTMLOutput["forum_stats"] .= '<span class="bbpas-title">' . __('Threads', 'bbpress-improved-statistics-users-online') . ": </span>{$stats['topic_count']}, " 
                        . '<span class="bbpas-title">' . __('Posts', 'bbpress-improved-statistics-users-online') . ": </span>{$stat_replies}, "
                        . '<span class="bbpas-title">' . __('Members', 'bbpress-improved-statistics-users-online') . ": </span>{$stats['user_count']}<br>";
                    }

    Thank you

Viewing 15 replies - 16 through 30 (of 41 total)
  • The topic ‘Cannot Delete Plugin’ is closed to new replies.