Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin: bb-Topic-Views


_ck_
Participant

@_ck_

Ah I know what it is after studying the code a bit.

They never planned on $topic_id being null or not set, so it’s being inserted into the query as blank.

mysql is getting something like

SELECT meta_value FROM $bbdb->topicmeta WHERE topic_id = AND meta_key='views'

see the blank before AND? It’s unacceptable to mysql, needs to be a value.

hack

function get_view_count ( $topic_id )

and

function initialize_view_count( $topic_id )

and make a new first line for each that says

if (!$topic_id) return;

Should be a dirty workaround until the author can take a look.

Skip to toolbar