Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Hide categories independantly for unregistered users  (Read 30945 times)

0 Members and 1 Guest are viewing this topic.

mil1616

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 2
Hide categories independantly for unregistered users
« on: June 15, 2009, 04:52:07 pm »

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
« Last Edit: June 29, 2009, 08:51:50 am by mil1616 »
Logged

barjo07

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Hide categories independantly for unregistered users
« Reply #1 on: June 28, 2009, 03:07:24 pm »

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?
Logged

Nibbler

  • Guest
Re: Hide categories independantly for unregistered users
« Reply #2 on: June 28, 2009, 03:11:17 pm »

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

barjo07

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Hide categories independantly for unregistered users
« Reply #3 on: June 28, 2009, 06:46:57 pm »

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.
Logged

barjo07

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Hide categories independantly for unregistered users
« Reply #4 on: June 28, 2009, 07:03:23 pm »

The table is called cpg1410_categories.
Logged

Nibbler

  • Guest
Re: Hide categories independantly for unregistered users
« Reply #5 on: June 28, 2009, 07:25:42 pm »

Find

Code: [Select]
$sql = "SELECT `visibility` FROM `cpg14x_categories` where cid = $cid";

change to

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

barjo07

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Hide categories independantly for unregistered users
« Reply #6 on: June 28, 2009, 11:46:09 pm »

Works like a charm. ;D Thank you!
Logged

Nibbler

  • Guest
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Hide categories independantly for unregistered users
« Reply #8 on: January 10, 2010, 12:43:07 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.