How to fixed missing forum_t table - not sure / Online advanced info menu by TheMadMonk / Forums


  • NEW FROM LAST VISIT:

    Original:

    $qry="SELECT ft.*, fp.thread_name as post_subject, fp.thread_total_replies as replies, u.user_id, f.forum_name,f.forum_id, u.user_name, f.forum_class
    FROM #forum_t AS ft
    LEFT JOIN #forum_t as fp ON fp.thread_id = ft.thread_parent
    LEFT JOIN #user as u ON u.user_id = SUBSTRING_INDEX(ft.thread_user,'.',1)
    LEFT JOIN #forum as f ON f.forum_id = ft.thread_forum_id
    WHERE ft.thread_datestamp > ".$lvisit. "
    AND f.forum_class IN (".USERCLASS_LIST.")
    AND ft.thread_parent = 0
    ".$viewed."
    ORDER BY ft.thread_datestamp DESC LIMIT 0, ".$pref['onlineinfo_forumnum'];

    replaced:

    $qry = "
    SELECT t.thread_name AS parent_name, t.thread_id as parent_id,
    f.forum_id, f.forum_name, f.forum_class,
    u.user_name, lp.user_name AS lp_name,
    t.thread_id, t.thread_views as tviews, t.thread_name, t.thread_datestamp, t.thread_user,
    tp.post_thread, tp.post_user, t.thread_lastpost, t.thread_lastuser, t.thread_total_replies
    FROM #forum_thread AS t
    LEFT JOIN #forum_post AS tp ON t.thread_id = tp.post_thread
    LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
    LEFT JOIN #user AS u ON tp.post_user = u.user_id
    LEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id
    WHERE find_in_set(forum_class, '".USERCLASS_LIST."')
    AND t.thread_lastpost > {$lvisit}
    ORDER BY tp.post_datestamp DESC LIMIT 0,".intval($pref['onlineinfo_forumnum']);

     

  • UPDATED FROM LAST VISIT:  (file updated.php)

    original:

    $qry = "SELECT ft.*, fp.thread_name as post_subject, fp.thread_total_replies as replies, u.user_id, f.forum_name,f.forum_id, u.user_name, f.forum_class
    FROM #forum_t AS ft
    LEFT JOIN #forum_t as fp ON fp.thread_id = ft.thread_parent
    LEFT JOIN #user as u ON u.user_id = SUBSTRING_INDEX(ft.thread_user,'.',1)
    LEFT JOIN #forum as f ON f.forum_id = ft.thread_forum_id
    WHERE ft.thread_datestamp > ".$lvisit. "
    AND f.forum_class IN (".USERCLASS_LIST.")
    {$viewed}
    ORDER BY ft.thread_datestamp DESC LIMIT 0, ".$pref['onlineinfo_forumnum'];

    replaced (from e_list.php in forum plugin)

    $qry = "
    SELECT t.thread_id, t.thread_name AS parent_name, t.thread_datestamp, t.thread_user, t.thread_views, t.thread_lastpost,
    t.thread_lastuser, t.thread_total_replies, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name
    FROM #forum_thread AS t
    LEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id
    LEFT JOIN #user AS u ON t.thread_user = u.user_id
    LEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id
    WHERE find_in_set(f.forum_class, '".USERCLASS_LIST."')

    {$viewed}
    ORDER BY t.thread_lastpost DESC LIMIT 0,".intval($pref['onlineinfo_forumnum']);

    code from LIst New is ignoring user visit

     

  • There is still this in new.php

    (it works just because update, on new site there is error - user table was changed too)

    //Mark all threads as read
    if (e_QUERY == 'mark_all_as_read')
    {

    unset ($u_new);

    $qry = 'thread_lastpost > '.USERLV;
    if ($sql->db_Select('forum_t', 'thread_id', $qry)) {
    while ($row = $sql->db_Fetch()) {
    $u_new .= '.'.$row['thread_id'].'.';
    }
    $u_new .= USERVIEWED;
    $sql->db_Update("user", "user_viewed='".$u_new."' WHERE user_id='".USERID."' ");


    header("location:".e_SELF);
    exit;
    }
    }

     

  • Is not better to link to forum stats instead double everything?

    topposterreplies.php

    toppoststarter.php

    MAIN DIFFERENCE:  this plugin count all threads and posts,  forum stats just those with view access

    and in new.php there are maybe next 4 queries with forum_t

     

Moderator(s): CaMer0n, Jimako
Search just forum
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.


  • Jimako
    Jimako  2 weeks ago

    Just playing with google custom search. It's searching this site, e107.org and github with e107 in repository name.

  • Jimako
    Jimako  1 month ago

    If you use any my theme: with version 2.2.0 there are core changes - comments and social icons - if you find problem, just tell me.

  • Jimako
    Jimako  4 months ago

    @wrxxy I am ill, sorry cant log in gitter from mobile. Try ask at main room, nothing except update was changed.

  • Jimako
    Jimako  5 months ago

    @wrxxy I got notification from gitter but I am off until Monday. I am not able to log in gitter. Answer is add it to existing gitjub issue.

  • Jimako
    Jimako  7 months ago

    I will be on holiday until end of November. So no answers from me until then.