Change in the categories view, would pay well Change in the categories view, would pay well
 

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

Change in the categories view, would pay well

Started by ralfs, August 18, 2006, 03:59:00 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ralfs

Hi,

I posted an equal thread already earlier this year. Meanwhile I have surrounded my problem several times, and I have hopefully reduced the effort needed to solve it.

What I want:
I want to avoid showing empty categories. Because of the access right structure in our database up to 50% of all categories/subcategories are empty and it is really annoying to see these.

What I did so far:
I installed the CPGOcat plugin from Paver. This makes sure that the page with the root view shows already all included albums, no matter how deep they're placed.

The starting point:
Wouldn't it be possible to take that statistics of the contained albums and if this value is zero, not to generate the table row when building the table?
Unlike my last request I don't need any change in the access rights structure of categories, I just want to suppress the output of one table line.

You can have a look to our gallery here:
-- edit: taken out --

I don't know the amount of money normally paid for these jobs, I also cannot estimate, if this job would take one hour or three days, so please contact me with a rough estimation and the amount of money this would cost.

Kind regards,
Ralf Sauter

My email address is -- edit: taken out --

Joachim Müller

I don't get the concept behind this: what's the use of pre-made categories in public galleries if they are empty? Regular (non-admin) users won't be able to populate them with albums (that's an admin-only feature), so there's no use to create those categories in advance. Just create the categories when you need them (i.e. when you actually have albums and subsequent files that are meant to be uploaded in the next step).
I understand that you're using a plugin that will import pics from a folder/file structure, so subsequently my question would be "why do you have empty folders inside your folder structure?". I don't want to be a spoil-sport, and of course you're welcome to ask for freelancers to look into this, but I doubt that anyone will come up with a solution as requested, since it would need a huge amount of queries to check if a category is actually populated with albums and at least one file, leaving your gallery dead-slow.
I strongly suggest reviewing your scheduled workflow.

Joachim

P.S. I used to operate db speakers in the past as a technician - great stuff (you're probably aware of this already ;))!
P.P.S. For reference: the other thread you refered to is Need help - album / cat access restrictions

ralfs

Hi GauGau,

Quote
I don't get the concept behind this: what's the use of pre-made categories in public galleries if they are empty?
Thinking error: they are all populated with albums. But I have several types of users: Press people only having access to the Promotion Category,
Distributors having access to a bit more areas (my test login belongs to the distributors group), co-workers of the company have access to the party and meetings section and last not least members of the PR / Marketing team, who have access to all albums. So I can't see any strange approach in this ..

QuoteI understand that you're using a plugin that will import pics from a folder/file structure, so subsequently my question would be "why do you have empty folders inside your folder structure?"
Ahem - no, I don't use such a plugin. Having a folder/file structure on the server makes the uploader's work much more easy because it's clearer. Additionally it is an absolute must because  of the pictures filenames: every filename is something like IMGxxxx.JPG, and the day will not be far when the first double would show up and overwrite existing files when uploading. So I want to have a folder for every album. And again: every folder is filled: either with a subfolder or with album(s).

QuoteI doubt that anyone will come up with a solution as requested, since it would need a huge amount of queries to check if a category is actually populated with albums and at least one file, leaving your gallery dead-slow.
I know that there is a bunch of queries needed. As I use that CPGOcat plugin, I have these queries already. All in all the database stores around 5000 pictures in 130 albums and it is still very fast. The stats results could probably be stored somehow - then there wouldn't be a need to start the queries twice. Who says that there couldn't be additional fields in the SQL database where I can define something by hand? Or even better: storing the statistics in the database and updating it when 'batch adding' files? I know quite well that this will only be a dirty solution, but without including the categories into the access restriction system, I can only try to tinker with results instead of changing the cause.

Kind regards,
Ralf

Joachim Müller

OK, I understand your point - sorry for drawing the false conclusions. However: permissions by category (instead of permissions by album) have been requested and discussed in the past. Quite a number of people (both experts as well as newbies) have tried to come up with a solution for the current core code. They all have failed or given up. I'm not saying that it's impossible, but it will be hard, as this requires a major re-write of coppermine. That's why the dev team decided to delay this often-requested feature into the distant future (might go into cpgNG).
Of course anybody is welcome to prove me wrong. The only feasable option would be adding some if/them switches into the code, with the permission by category hard-coded into those switches. You will of course lose all flexibility and subsequently upgrading will be hard to impossible.

ralfs

Hi,

Would any of the moderators here tag this thread done?
BMossavari wrote a lovely plugin for me - I can recommend his work to 100% for all others looking for programming help.

Thank you again, Borzoo!

Regards,
Ralf

Sami

Ah , I jsut missed this post , and see it Now !
Thank you Ralf for recommandation ;)
Can I post a modified version of that plugin to the board for everyone ?
‍I don't answer to PM with support question
Please post your issue to related board

ralfs

Quote from: Sami on October 02, 2006, 08:06:48 PM
Can I post a modified version of that plugin to the board for everyone ?

Hmm - I don't want to offend Borzoo. Well, I initiated and requested this, I found a programmer and paid him. But it is still his code and we are here in the board 'Paid help'. So if he declares this thing open, he should state something here ...

Kind regards,
Ralf


Joachim Müller

You bought the code, so it is yours to commit to the community - that's what Sami asked for: he's willing to publish the code if you agree (as it is legally yours). So you don't have to do any work, you just have to agree if it's OK for you if Sami is going to release the code as plugin. We call this "sponsoring": you pay a coder to create some customization that you need. If you're happy with the coder's work and you want to give something back to the community, you allow the coder to publicly release the code that has initially been created for you only.
That's part of what makes the open source community ticking: people (both programmers as well as customers) donate code to the community.
I could understand perfectly well if you want to keep the code for you exclusively, and legally as well as morally, this would be totally OK.
Just for clarification: we kindly ask you to allow Sami to publish the code he created for you. There's nothing for you to gain except an honourable mention. Looking forward to your reply.

ralfs

Hello.

Before any false impression comes up: I would have no problem at all to donate the code. I just thought it would be kind also to ask Borzoo. I can live with the fact that I paid for it and the others not.

Meanwhile a few other questions have been raised in my mind:
1. Why is Sami thanking for recommendation?
2. Why 'modified' code? What modification?
3. Does he have the code already? From who?
4. Is Sami in the end Borzoo himself? This would explain much, also the caption underneath his avatar, which I just discovered ...

Don't expect miracles from this plugin, it cannot be more than a workaround, but a really cool one. If you want to get a short description of how it works, tell me. From my side it is ok to make it public.

Cheers,
Ralf

Abbas Ali

All this confusion is becuase ralfs is thinking that Sami and Borzoo are two different people. Well they are NOT, Sami is Borzoo. This should answer most of the questions raised by ralfs.
Chief Geek at Ranium Systems

Sami

Ralf , Sorry for confiusion !
Yes I'm Borzoo , I've just promoted to Sami (Dev Team member) ;)

@all:
As Ralf said , the plugin is only for visual (show/hide) permission on categories based on group
- It doesn't apply permission on files under that category.
‍I don't answer to PM with support question
Please post your issue to related board