MyBB Community Forums

Full Version: Recent posts sql error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

i am using an old plugin called Recent Posts Forum Index which is for mybb 1.6, i changed the compatibility to 1.8 in the php file. However, when i enable the plugin i receive a mybb sql error as a user. (as a admin who is able to see every forum, it works)

I am aware that there is a plugin which is similar to this called recent threads, but this one is more suitable to what i want, because it is ignoring the forums, which are not visible for guests/users. The 1.8 plugins only give the possibillity to exclude forums and/or groups, but by this way, i can use this plugin for users too and not just for the private forums.

I don't know how to fix this, but i was hoping someone would know. I would appreciate it much. Smile

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE t.fid NOT IN (6) AND t.visible = '1' GROUP BY t.tid ORDER BY t' at line 9
Query:
SELECT t.tid, t.fid, t.subject, t.lastpost, t.lastposter, t.lastposteruid, f.name, u.usergroup, u.displaygroup FROM mybb_threads AS t INNER JOIN mybb_forums as f ON (f.fid = t.fid) LEFT JOIN mybb_users AS u ON (t.lastposteruid = u.uid) WHERE t.fid NOT IN (1,3,4,7,14,6) WHERE t.fid NOT IN (6) AND t.visible = '1' GROUP BY t.tid ORDER BY t.lastpost DESC LIMIT 5
so why dont you get the 1.8 plugin and disable it so that the guest, awaiting activation group cant see it?
The thing is, i want them all to see, also the registered users should see.

I have some forums which are only visible to certain groups, but i wanna use the plugin for every forum and group, but so that the users see the recent 5 or x amount threads of the forums they are able to see and the special groups can see the recent threads from everything included.

The 1.8 plugin doesnt allow that, it only lets you restrict it for one group or ignore certain forums.