List of categories and files on same page

Phoca Download - download manager
hug
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 08 May 2013, 22:55

List of categories and files on same page

Post by hug »

Hi!

Lately I have been getting into developing both websites and components, so I know how hard it can be. I'm very impressed of your work.

What I'm wondering about Phoca Download is this:
Can I somehow list all categories and their files on the same page?
Like this:
Category 1:
File1.ext
File2.ext
Category 2:
File3.ext
File4.ext
With all their download/preview buttons etc? (perhaps with feature of categories being collapsible and user-defined order)

Right now I only find listing categories, which links into a "closed" view of that category. I want all my categories (or the selected ones) to be listed and their respective files. Or I can list files within a selected category, but no overview of the whole thing.
I want to have a file archive listed within different sections/titles, on the same page. Is it possible?

I can create some kind of more specific example/image if needed. But to clarify right away, think of something like this:
https://www.phoca.cz/download
But within each of the boxes "Phoca Gallery/Download" etc. there could be files listed instead of subcategories. Both in a simple view that requires less space (with maybe a small direct download button beside a link to file details), and then perhaps in an extended view with one category box with full file details/buttons, and then the next category listed below in a new box.

(I have also looked at your modules and plugins, but none seems to do this. Although if I manually listed the files using the plugin I guess I could do something like:
Category 1:
{altphocadownload view=file|id=280alt}
{altphocadownload view=file|id=281alt}
etc. or with a php script loop, but then I would need to know all the IDs from somewhere? to make it automatic.)

Best regards,
Hug
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48571
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of categories and files on same page

Post by Jan »

Hi, there is no such feature as default. The explanation is very easy. MEMORY issues. In fact I cannot make an program where users can list all the categories and all the files at once - on one site. Of course if you know, your server is able to manage the count of categories and files you need, then you can customize it directly for your server. But as default, when you don't know on which server the Phoca Download will run and which amount of files and categories user will build (this can be e.g. many thousands - which will of course stop site loading), it cannot be set.

So in Phoca Download, as default, there is a categories view (list of categories), category view (list of files with default pagination) - to customize it - to display categories and files on one site, you need to be aware because of memory issues. :idea:

Jan
If you find Phoca extensions useful, please support the project
hug
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 08 May 2013, 22:55

Re: List of categories and files on same page

Post by hug »

Thanks for the reply Jan!

Yes, that makes sense. I can definitely see how it could be problems with memory, but that would of course be the webmaster's own decision. Just like someone could do a loop to list ID 1 to 1000 in the plugin. Or why not 1000 files in one category. Of course you do have pagination to prevent the latter case, but someone could still pick "All" and run into the same problem. So while I understand where you are coming from on this issue I think it can be run into with the default/current options as well.

Having the files sorted into sections/categories when listed (e.g. 3-3-3), instead of just posted in a big pile (e.g. 9), I don't see how it would make that big difference on this. Maybe that extra query to check category ID/name for the file and sort it under the right section in the template view could put some extra strain on the server, memory or browser, but not while it's within reasonable limits and design from the webmaster? Also I guess each of the sections could have pagination too or some display limit that can only be changed after a confirmation by the admin that he/she understands the potential risk if there's too much? I think most who would want a feature like this wouldn't like 100 categories with 10 files each listed on one page, in my case there are like 20-50 files maybe and I want maybe 5 categories/sections or so, instead of a long list of unrelated files.

I also noticed that in your restaurant menu system you kind of list the menu into sections and all in one page, in a somewhat similar way to what I would like the file archive to look like.
( https://www.phoca.cz/restaurantmenudemo/en/bill-of-fare )
Of course that's plain text and an image in some lists but adding a link or small button for each item, would that make it that much more heavy to run? (I know I can create a list like this with the plugin but then I would need to manually keep track of IDs when updating a file etc.)

You are way more experienced in the development of these things than me so perhaps there's something I'm not thinking off. Sorry if that is the case.

(Small off-topic side note: on https://www.phoca.cz/joomla3demo/category/4-dog shouldn't there be 32 images? No pagination?)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48571
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: List of categories and files on same page

Post by Jan »

Hi, yes, there are 32 images, but the pagination is disabled because of the demo site.

PRM is different to PD - you can have e.g. 500 categories in PD but mostly in PRM there are cca 15 groups in the menu. And there are no subcategories - the most memory probem is the tree of categories - you can do unlimited tree of categories in Phoca Download which can be really a memory expensive. In PRM, item has 4 columns, in PD items have cca 15 columns, etc. etc. :idea:

Of course if you know, on your server, there will be not so much categories, etc., the customization can work Ok there, but you cannot do it as default and then let other users to use it (as they then can run it on different servers with many categories, subcategories, etc.) :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply