Hide albums from latest and random - Page 2 Hide albums from latest and random - Page 2
 

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 albums from latest and random

Started by NeoID, November 29, 2005, 07:37:36 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.


Joachim Müller

Quote from: donnoman on December 30, 2005, 02:12:24 AM
I'm of the opinion that hooks should only change between major revisions like 1.4 and 1.5.

I also think that we need to rethink the placement of some of the existing plugin hooks, and we need more consistency in naming.  The place to make these changes are in the devel version, not stable.
Donnoman is absolutely right, that's something we agreed upon: no hooks (which would equal a new feature) will be added for an existing release to avoid confusion what version of a plugin will work with which version of coppermine. Only bug-fixes are permitted to be added to the cvs of a stable release. New features must only be added to the devel branch.

txspaderz

I'm trying to do this:  I want to keep from displaying one whole category.  I have a NSFW Gallery, that I don't want to be shown on the main page only.  I have blocked all the albums, but now when I go to that particular category, where I have blocked all the albums, I get an error: 
Critical error
There was an error while processing a database query 

Any suggestions?

Tranz

I just noticed today that the plugin causes the items in excluded album not to show up even when viewing the album: http://takethu.com/thumbnails.php?album=73

If I uninstall the plugin, the thumbnails show up. I downloaded the plugin again and did a diff and the only difference to my code is the list of excluded album ids.

Stifler


donnoman


Stifler


Nibbler

Try this code as codebase.php. It suppresses the filters when viewing the albums directly and is coded more simply.


<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.2
**********************************************/

if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

$thisplugin->add_filter('plugin_block','remove_meta_albs'); //index.php

if (!$_GET['cat']) {
$thisplugin->add_filter('post_breadcrumb','remove_meta_albs'); //thumbnails.php
if (!is_numeric($_GET['album'])) $thisplugin->add_filter('displayimage_init','remove_meta_albs'); //displayimage.php (MODDED PLUGIN HOOK)
}

function 
filter_meta_album() {

global $META_ALBUM_SET,$ALBUM_SET;
    
    
$unwanted_albs=array(45);
$META_ALBUM_SET.= ' AND aid NOT IN ('.implode(',',$unwanted_albs).')';
    if (
defined('DISPLAYIMAGE_PHP')) $ALBUM_SET $META_ALBUM_SET;
}

function 
remove_meta_albs($return) {
    
    static 
$run_once;
    if (!
$run_once) {
        
filter_meta_album();
        
$run_once=true;
    }
    return 
$return;
}

studeo

Thanks, That works better except for one issue.

If the excluded album is the ONLY album of a given member, when you click on that gallery from the index the latest addition and random image block under that album report "No images to display" You can click the one main album thumbnail to get to the thumbnail page however.

Thank You.

Prowler9

Ok well I installed and did everything it says to do and I only have one problem.  Well when I click pictures in the filtered album i get No image to display. Is there something else I need to edit?? If so let me know thanks again for your time reading this post

donnoman

I just released Unwanted_Metas 2.0 that eliminates the need for  modding displayimage.php and has fixed all of the known issues, and includes a graphical interface to select the albums.

http://cpg-contrib.org/board/index.php?board=31.0

studeo

Thanks for a new plugin.  If I may comment: The selection list only lists my own albums and shared albums....Some of the excludes I would do are uselessly large member galleries...they are not listed in the drop-down list...where can I add their album ID to the code manually since I cannot select them automatically?

Thank You Donnoman

donnoman

unwanted_metas 2.1

12-03-2006 Added support for removing user albums
12-03-2006 Widened the configuration list box

http://sourceforge.net/project/showfiles.php?group_id=132063&package_id=213644

If you are looking for support on a cpg-contrib plugin the best place to get it (because I check there more often) is on the cpg-contrib forums

http://cpg-contrib.org/board/index.php?board=31.0

studeo

Very nice plugin! Extremely useful.

One point though: If I exclude a user album and its 'the only' album by that user, no images are displayed on their album page except for the main gallery image at the top table. It makes sense that the album is excluded from all meta albums (random, latest). Is there anyway to isolate the exclusion to take effect on the index page only so it is not global?

Thanks again for the nice plugin!

Studeo

Prowler9


Joachim Müller

Quote from: studeo on December 03, 2006, 11:21:42 PM
One point though: If I exclude a user album and its 'the only' album by that user, no images are displayed on their album page except for the main gallery image at the top table. It makes sense that the album is excluded from all meta albums (random, latest). Is there anyway to isolate the exclusion to take effect on the index page only so it is not global?
Why do you reply here? Donnoman told you were to turn for support. ::)