Hide categories independantly for unregistered users Hide categories independantly for unregistered users
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Hide categories independantly for unregistered users

Started by mil1616, June 15, 2009, 04:52:07 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mil1616

Hello

This plugin allows you to hide categories from unregistered users in the index page.
You can specify in the category manager which categories you want to hide and which not. There is a new field in the category editor.


Unzip it in the plugins folder and install it through the plugin manager.

There are two language file: english and french.


Bug fixed: Database name

barjo07

I run 1.4.24. I installed the plug-in, activated it and then called catmgr.php (the new version) but got an error message "There was an error while processing a database query".
I had a look in the database, the new field is there. When I set visibility to 1 in the db the category is indeed hidden.
But catmgr.php does not work anymore. Any clue?

Nibbler

Enable debug mode in config and post the actual mysql error you get.

barjo07

While executing query "SELECT `visibility` FROM `cpg14x_categories` where cid = 0" on 0

mySQL error: Table '*****.cpg14x_categories' doesn't exist
---------------------------------------------------------------------------------------

Note: the prefix of the table was hidden by me because it would give too much detail about the database.

barjo07


Nibbler

Find


$sql = "SELECT `visibility` FROM `cpg14x_categories` where cid = $cid";


change to


$sql = "SELECT `visibility` FROM {$CONFIG['TABLE_CATEGORIES']} where cid = $cid";

barjo07



Joachim Müller

Added German language file and some minor header adjustments to the plugin and added the package to our download section at sourceforge.net: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_smart-catlist_v1.1.zip/download
I'm not very fond though about what the plugin does - the database modifications appear tricky to me. Thanks for the contribution, but I can not recommend this plugin.