[geeklog-modules] Where Do Plugin Comments Go?

Joat Dede w9c at earthlink.net
Mon Mar 17 18:39:06 EST 2003


Can plugins add comments to GL's comments table or is that one
reserved for stories and polls only?  After going through the
core code, it appears it wouldn't harm anything to add comments
from other plugins into it.

Where are we suppose to add search capability for comments --
inside search.php or self-contained in the plugin?  If it's the
latter, then this section here in the function searchform will
pull up user uids on all comments including those inserted by
other plugins (if we're allowed to add to that table).  This only
becomes an issue though if the visitor selects the type
"comments" and the user never made any to stories and polls.  I'm
not sure if this would cause a fatal error or a no results found
message.

    if ($_CONF['contributedbyline'] == 1) {
        $searchform->set_var('lang_authors', $LANG09[8]);
        $searchusers = array();
        $result = DB_query("SELECT DISTINCT uid FROM
{$_TABLES['comments']}");
        for ($i = 1; $i <= DB_numRows($result); $i++) {
            $A = DB_fetchArray($result);
            $searchusers[$A['uid']] = $A['uid'];
        }

Joat




More information about the geeklog-modules mailing list