forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: ScHwErV on March 15, 2007, 01:18:20 am

Title: Exclude galleries with CMPFetch
Post by: ScHwErV on March 15, 2007, 01:18:20 am
Ive read through the instructions, I even did a grep on the folder and didn't find anything to exclude a gallery or galleries from CMPFetch.

I know I can include galleries by their identity, but then I would have to include all the new ones that get created by users when I only want to exclude a few "personal" ones.

Is this possible?
Title: Re: Exclude galleries with CMPFetch
Post by: vuud on March 15, 2007, 02:24:56 am
Ive read through the instructions, I even did a grep on the folder and didn't find anything to exclude a gallery or galleries from CMPFetch.

I know I can include galleries by their identity, but then I would have to include all the new ones that get created by users when I only want to exclude a few "personal" ones.

Is this possible?

Well, by design - if a gallery is not public (as in requires some sort of rights to view) cpmFetch should skip it.  I will only grab photos that people could see anyway.

That being said, there is no way currently to exclude galleries, but as a feature goes - would not be hard to add.  I don't think.

But I have been wrong before.

If I implemented it, I would add it to the SQL generation code in cpmfetch_dao.php that when checking categories or albums would check for a ! in front of it.  So cat=35,36,!37 would be from 35 or 36, but not 37.

Hmmm. But that does not exist yet

Does my first statement solve your problem?

Title: Re: Exclude galleries with CMPFetch
Post by: ScHwErV on March 15, 2007, 01:09:11 pm
I appreciate you taking the time to answer.  I am glad to hear that its not something that I was just missing.

Unfortunately no, and maybe I am going to be alone in this, but with my current setup, I cant set that gallery as private.

I use CMPFetch to display pictures on my front page.  Generally my gallery is full of nature photos and the like, but I keep pictures in my gallery of my son and my family.  These things don't really have anything to do with the "theme" of my site, but I do need them publicly visible.

If it would be possible, it would be a great feature to the script.  Would add a lot more flexibility for implementation.
Title: Re: Exclude galleries with CMPFetch
Post by: vuud on March 15, 2007, 02:13:26 pm
I appreciate you taking the time to answer.  I am glad to hear that its not something that I was just missing.

Unfortunately no, and maybe I am going to be alone in this, but with my current setup, I cant set that gallery as private.

I use CMPFetch to display pictures on my front page.  Generally my gallery is full of nature photos and the like, but I keep pictures in my gallery of my son and my family.  These things don't really have anything to do with the "theme" of my site, but I do need them publicly visible.

If it would be possible, it would be a great feature to the script.  Would add a lot more flexibility for implementation.

Yeah, I have added it to my list of things to do - fundamentally I think it is a good idea, and will do it at some point.

Just not sure when.

If I think of another way CPG can fill your need I will post it...  usually there is some way around it.

Title: Re: Exclude galleries with CMPFetch
Post by: vuud on March 15, 2007, 02:18:29 pm
Yeah, I have added it to my list of things to do - fundamentally I think it is a good idea, and will do it at some point.

Just not sure when.

If I think of another way CPG can fill your need I will post it...  usually there is some way around it.



Took a look at your site...

Aside from agreeing with the whole internet hunting speech, you only have about six users that post...

You could always code your CpmFetch to source from "owner=Kat,andydf,SNOWHITE...  etc:  And leave you off the list.  Of course that bumps all your entries...

At least until I get, or someone donates code...

Also, if I do code it are you willing to test it?  I mean really test it out?  That is where most of my time gets spent, so if I can offload it, that helps!


Title: Re: Exclude galleries with CMPFetch
Post by: ScHwErV on March 16, 2007, 02:08:59 am
The site is small now, but I finally have some good inbound links and I passed 80 thousand unique visitors last month.  I hope to keep adding users in time.

Anyways, I am willing to test anything you can toss at me.
Title: Re: Exclude galleries with CMPFetch
Post by: rroy1900 on March 31, 2008, 10:01:52 pm
I think I have a workaround for this.

Grab a list of all the albums and use it to build up your source variable.

-Rob

Code: [Select]
$source = 'album=';
$AlbumArray = $objCpm->getAlbumListFrom($source);
foreach ($AlbumArray as $Val)
{     
     if(($Val['pAid'] == 40) or ($Val['pAid'] == 39))
     {
     }
     else
     {
          $source .= $Val['pAid'].",";
     }
};
$source = substr($source, 0, -1);
Title: Re: Exclude galleries with CMPFetch
Post by: capecodgal on March 31, 2008, 11:15:46 pm
I also would love something like this  ;D

At the moment my method is a bit ridiculous... but I just list out all the cats I do want to display in my fetch code and leave out the ones I do not. Like this where I skipped cat #7:

Code: [Select]
"cat=2,3,4,5,6,8,9:album=0"

But the idea of being able to say I want everything except for !7 would be fabulous