Re: Getting forum page number
I tried the shortcut method, it returned an error: `bbPress database error: [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 ’01:46:48 ORDER BY topic_time DESC’ at line 1]
SELECT count(topic_id) as position FROM tvcforum_topics WHERE forum_id=6 and topic_time<=2008-12-09 01:46:48 ORDER BY topic_time DESC`
Regarding the last bit of code you posted – there’s actually a function already present in one of the bb-includes files that does the same thing – get_page_number()
.