jDownloads Support Forum

Other Themes => Joomla - General Topics => Topic started by: DylanStr on 23.03.2016 16:29:32

Title: Automaticly add and publish downloads
Post by: DylanStr on 23.03.2016 16:29:32
Hello all,
I'm new to jDownloads and  a complete beginner in building with Joomla.
I'm creating a simple portal where users have to login to search for pdf documents and download them. I want to be able to automaticly upload those pdf document to my downloads folder in my websites directory. I also want those files to be automaticly published on my website. Is it even possible? I hope someone can explain how to do it. Thanks!
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 23.03.2016 22:36:38
Hi
The basic answer is Yes.

The way you do the uploading depends on whether you plan to upload new info from the Admin side (backend) or from the User side (front end).

If for example you use the Back End then you can set the Configuration - Monitoring tab - 'Automatically publish Downloads?'
Also I would advise setting Configuration - Monitoring tab -'Download directory monitoring?' to No.
You can then upload files using an ftp program - I use FileZilla' to upload files into the relevant "Categories" - these are subdirectories starting from the jdownloads directories in the Joomla! root.  Note it is best if you create the set of top level categories using the Categories panel in the jD backend.

At the present time after first installing jD you probably have all the permissions for Download set to Public.  To fix go to the Options  button on the jD Control panel and set the Public permissions to Inherited )PS NEVER use Deny)

There are several articles in te Documentation which cover the above in more detail.

If you do not understand then please ask in this topic.

Colin
PS you will need a menu item  of jD type List All Categories.  Set the view Access of that menu item to Registered so only logged in users will see it.

Colin

Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 24.03.2016 08:32:38
Colin Thanks a lot for your fast reply.
I'm going to set it up today so I will get back to this topic once I tested it.
Thanks!


edit: Sorry btw I'm uploading from the Admin side (Backend)
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 24.03.2016 14:10:23
Ok I have it working now. It seems that I need to manually monitor scan for new files. I would rather do it automaticly but I have thousands of PDF's to add in my download folder. I assume that would cause problems with things going really slow right?

There is one more thing i'd like to ask. I want to modify the search form in a way that it can only search for the exact filename (exact phrase). So only one file needs to come up everytime someone searches for it. ie: Someone searches for file 12345678, then file 1234567891011 doesnt need to come up in the results, only file 12345678.

So I want to remove all the search options and only show the actual search box itself. Is that all possible?

Thanks for your time Colin.
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 24.03.2016 14:58:36
Hi
Now that you have it working you could set the monitoring to automatic, or alternatively to set up a CRON job to run periodically.  The key is not to 'overload' your server.  Putting up say 100 pdfs and manually initiating a monitor should be no problem.  People have uploaded many more than that but I always suggest caution as I prefer to do somethig simple!! Also if you know where your server is located in which part of the world and the probable target areas then doing something at a less active time would be an idea.

The search form has an 'Exact Phrase' mode so your users could use that method if needed.  If you are prepared to modify code then you could preselect that option as the default, and remove any other choice.  Suggest you experiment initially.  We are always open to suggestions, particularly if the person can assist in coding etc!!

Colin
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 24.03.2016 15:28:26
Yes I want ''exact phrase'' to be the only option available. I assume I need to edit the .php file of the jDownloads search form right?
That would be very hard to do I think. Because i'm completely new to all of this.
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 24.03.2016 16:02:32
I managed to use the Joomla search form for searching in jDownloads, and I was able to delete all the search options in the form that way :)

There is only one thing, I also want to remove the ''amount of results'' info and button, and just force it to show All.
Please see the attachment for what I mean.

Do you know if that's possible?

[gelöscht durch Administrator]
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 24.03.2016 17:07:01
Hi
As you are using the Joomla! Search form I do not know but inevitably I suspect it would mean modifying the code, but maybe there are other search options.

Also check the various Search Plugins to see if there is a search limit.

There are numerous File Search extensions that might suit, including free ones.  JiFile looks like a fairly flexible one, you can actually specify the root directory to search. 

Colin
Title: Re: Automaticly add and publish downloads
Post by: chrismartin on 27.03.2016 05:54:34
That sounds pretty cool 8)
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 29.03.2016 09:11:24
Yes I think I need to modify the code, but I won't try that, because I will probably mess it up. I will check some other search forms, thanks for the suggestions.
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 30.03.2016 08:23:00
Colin do you know what the maximum amount of downloads is for jDownloads?
I have 16.000 pdf files that I want to have on my website. Is this amount going to cause problems?

Dylan
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 30.03.2016 13:10:03
Dylan
That should not be a problem, the database index is an 11 decimal digit field.  Obviously you need careful design of your category structure to minimise search times. But the most important would be the web server being a good one, not from jD view but from users view point - but I guess you know that anyhow.

Colin
EDIT Think the largest one I know about is around 50k entries.
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 30.03.2016 14:23:43
Thanks a lot for all your answers to my questions. I am going to use only 1 catagory for all the 16k files, so I assume that's best for performance right? I also would like to set a Cron Job for the monitoring, because Auto Monitor is not good for this amount right?
I am going to do some tests and I will let you know if it all works. If I manage to get it all up and running on a linux server I am going to donate to the jD project for removing the Powered by jDownloads footer and supporting the team behind jD :)

Dylan
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 31.03.2016 21:23:00
Hi
If you put all your 16k Downloads in one category then if you use menu link like show all categories, list single gategory it will make a long paginated list.  But I amot sure which is optimum route!!

Setting up a Cron job to activate the monitoring periodically is fine.  I have a half finished article on it!!

Colin
Title: Re: Automaticly add and publish downloads
Post by: DylanStr on 04.04.2016 10:00:46
Where can I find the article about the Cron job? It will be very usefull for me. Thanks.

Dylan
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 04.04.2016 23:10:45
Dylan
Article not ready yet as I hve not tested so I am loath to give you something that may not work. 
You could ask your hosting service what you should do, also there are some Joomla! extensions that will do a Cron for you

The url you need is  found by copying link in the 'Check Download area now' is something like the following "<your site>/administrator/components/com_jdownloads/helpers/scan.php?key=o0ut47eIWH5QD44N8QLwyRmRE" where the key part is unique to a site.

Colin
Title: Re: Automaticly add and publish downloads
Post by: wdb2021 on 02.04.2021 09:09:50
Thanks for the various explanations of each person, it was very helpful to read.
Title: Re: Automaticly add and publish downloads
Post by: ColinM on 03.04.2021 11:45:51
Hi
For reference the article on CRON jobs ishttps://www.jdownloads.net/documentation-for-v3-9/faq-v3-9/automatic-publication-at-scheduled-times-cron-jobColin