• Resolved Halil

    (@halilesen)


    I thought it would be nice to be able to show whether post and comment authors are online or not. What do you think about that? How can I add this and create the PHP code?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author axew3

    (@axewww)

    Yes, there is this ready:

     function w3all_get_phpbb_onlineStats() {

    https://plugins.trac.wordpress.org/browser/wp-w3all-phpbb-integration/trunk/functions.php#L707

    But i think it should be now improved (not checked).

    It has been dismissed, was used for a shortcode so to display online users.

    I can help you now, if it is necessary, to dramatically improve it 🙂

    Plugin Author axew3

    (@axewww)

    Thread Starter Halil

    (@halilesen)

    I matched them via email. But what I’m wondering is, can the phpBB ID of the wp user be known, or just the email?

    I think there’s a 1-minute limit. I should be able to see those who were online within the last 5 minutes, like the default phpBB setting, right?

    Thanks.

    By the way, I’ve made progress on the wp-phpbb post=topic synchronization. Most of it is done. And you were right, it’s quite challenging. It’s not a universal solution, but it can be adapted to my specific usage conditions and scenarios; it requires a lot of interactive thinking.

    Thread Starter Halil

    (@halilesen)

    I rewrote it to make the online list more customisable and to avoid disrupting the overall structure of the extension.

    .....
    $cutoff = time() - 300;

    $sql = $w3all_phpbb_connection->prepare(
    "SELECT session_user_id AS user_id, MAX(session_time) AS last_time
    FROM phpbb_sessions
    WHERE session_user_id > 0
    AND session_time >= %d
    GROUP BY session_user_id
    ORDER BY last_time DESC",
    $cutoff
    );
    ....

    I’m doing it using the extension’s link. It was very difficult, but I think this is important for my WP post-phpBB topic synchronization. As I said, it’s very difficult to do this for everyone, but I was able to implement it by providing a lot of parameters for my own specific theme and use case.

    Thank you.
    You helped me by inspiring me, and I learned many things thanks to this extension.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.