Multiple Phoca Download instances

Phoca Download - download manager
Josvanreenen
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Nov 2010, 17:31
Location: the Netherlands

Multiple Phoca Download instances

Post by Josvanreenen »

Hi there,

I was wondering whether it is possible or not to run multiple instances of the Phoca Download component :idea: . This is based on a tiny problem I have, so I'd like to post that one here, for perhaps I am looking in the wrong direction:

Background:
The PD component is running perfectly, within annual issues we have multiple categories holding files. :twisted:
We use this component to allow visitors to view our journal with its quarterly releases. Hence the years are actually issues within the PD component and the quarterly "issues" of the journal are the PD categories. So... every article published in the journals "issue" is placed within the corresponding category of the corresponding year.

The problem:
We used the component for a while now and decided we also want to facilitate a different journal with the same functionality and structure. Besides that we want to facilitate downloads not related to any journal. As we use the "Issue List" menu option for the first journal, every section is automatically presented, so we cannot add i.e. Manuals as issue with types as categories, for it would automatically show up in the view of the first journal, where it doesn't belong... :x

Our solution:
We thought about it for a while... :!: ... :?: and since we want to use the same functionality for a different journal as well, we came up with a number of solutions:
  1. we change all :shock: categories to reflect the year as well, so for example in issue 2009, category issue_1 will become category 2009_issue_1 with its files. When we have done that, all categories can be bundled in 1 issue, being the journal.
    Then we can make the menu point to 1 specific issue, giving us a large category view sorted by year. :roll:
  2. Instead of changing anything we install another edition of PD, for the other journal. Of course that would mean different databasetables and systemfolders are needed as well. We could then have the same "fancy" issue view to show the years and within them the releases still being the categories.
  3. We could build our own site-structure with a lot of issue or even category-specific links to fake :x a seperation between journals and just use the component as we used it before...
My question:
is 2 possible? I know 1 is and I don't like 3 at all....
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multiple Phoca Download instances

Post by Jan »

Hi, I am sorry but I cannot confirm if this can be possible as have not tested such solution(s) yet :-(

Jan
If you find Phoca extensions useful, please support the project
Josvanreenen
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Nov 2010, 17:31
Location: the Netherlands

Re: Multiple Phoca Download instances

Post by Josvanreenen »

too bad, perhaps you can tell me about the construction of the module. I can think about thinks like a specific tree structure on which i could add "_1" as suffix as well as to the table structure, but then i need to change the installer as well and whatś most important I need to know whether or not i can make the forms point to the correct components so the files don spread accross wrong tables...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multiple Phoca Download instances

Post by Jan »

Hi, sorry I don't underastand:
I need to know whether or not i can make the forms point to the correct components so the files don spread accross wrong tables
what you mean with forms point

You need to set maybe some if clause then to sql so only the files which should be displayed will be loaded from the table
If you find Phoca extensions useful, please support the project
Josvanreenen
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Nov 2010, 17:31
Location: the Netherlands

Re: Multiple Phoca Download instances

Post by Josvanreenen »

sorry for not being unambiguous :x

I meant the following 3 aspects:

On install code should be stored in a different folder
On install tables should be stored with different names
On runtime the forms within the new folder need to point to the new tables

On runtime it does not matter where the files are not located, while dubbles will result in an error anyways...

So, I need to know where the components folder is referenced to, and I need to know where in the sql the tables are pointed to, and I need to know where in the code the tables are referenced to.

I hope this helps... :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Multiple Phoca Download instances

Post by Jan »

Hi, maybe you should see some guide for MVC in Joomla!

- sql queries are handled in models (just see models folder)

- path is set in Phoca Download Helper - in getPathSet method (folder for Phoca Download can be set in parameters)

- tables are defined in tables folder (see administration - Phoca Download folder: administrator/components/com_phocadownload/tables ...)

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