Page 1 of 1

Tag plugin: how to show max number of tags?

Posted: Wed Nov 09, 2005 1:04 pm
by zoran
Hi all,

How would I show a maximum number of tags using the tags plugin? Can't find it in the configuration, but I might be looking in the wrong place? The tags list is to be growing to be a bit large. Most popular in the primary view and a 'read more' link to the whole list would be nice.

Best, Zoran

Re: Tag plugin: how to show max number of tags?

Posted: Wed Nov 09, 2005 1:45 pm
by garvinhicking
Sadly such a config option does not exist yet, so one would need to patch that functionality into the plugin...

Inside serendipity_plugin_freetag.php you can patch the generate_content() function. You need to modify this SQL:

Code: Select all

        $query = "SELECT tag, count(tag) as total FROM {$serendipity['dbPrefix']}entrytags GROUP BY tag ORDER BY tag";
like to:

Code: Select all

        $query = "SELECT tag, count(tag) as total FROM {$serendipity['dbPrefix']}entrytags GROUP BY tag HAVING total > 2 ORDER BY tag LIMIT 20";
?

Regards,
Garvin

Re: Tag plugin: how to show max number of tags?

Posted: Wed Nov 09, 2005 2:36 pm
by zoran
I've mailed you a patched version.

Posted: Sun Nov 13, 2005 8:25 pm
by MySchizoBuddy
beside the related tags features. It would be nice if there was a heading
"Posts tagged adobe" and also "2 posts tagged"
just like you have on technorati (http://technorati.com/tag/adobe)

Posted: Mon Nov 14, 2005 12:17 am
by garvinhicking
I think this is already listed in the plugin's Todo-list at the top of the file. But nobody has implemented it yet :)

Regards,
garvin

Posted: Fri Nov 18, 2005 10:48 pm
by MySchizoBuddy
is it possible to not show the tags on the main page but only show it on the extended entry page