News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Automaticly add and publish downloads

Started by DylanStr, 23.03.2016 16:29:32

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DylanStr

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!
  •  

ColinM

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

Colin M
  •  

DylanStr

#2
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)
  •  

DylanStr

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.
  •  

ColinM

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
Colin M
  •  

DylanStr

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.
  •  

DylanStr

#6
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]
  •  

ColinM

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
Colin M
  •  

chrismartin

  •  

DylanStr

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.
  •  

DylanStr

#10
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
  •  

ColinM

#11
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.
Colin M
  •  

DylanStr

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
  •  

ColinM

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
Colin M
  •  

DylanStr

Where can I find the article about the Cron job? It will be very usefull for me. Thanks.

Dylan
  •