The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download Folder/PDFs
#2
Userspice is primarily designed to control access to PHP files, but that doesn't mean it can't help.

Essentially what you want to do is to create a new page called userfiles.php or whatever you want to call it. Once you go into "manage pages" in the admin panel, that page will be controllable by userspice, so you can decide who has access to it.

THEN you basically want that userfiles.php to retrieve a list of files in a directory and turn them into links. There is a php command called scandir. It is explained in the bottom answer to this question.

http://stackoverflow.com/questions/15774...ectory-php

Once you have that variable $files, it's probably pretty easy to do a foreach loop and turn each of those filenames into a link.

I hope that helps.
  Reply


Messages In This Thread
Download Folder/PDFs - by sbarbee - 08-18-2016, 02:04 PM
Download Folder/PDFs - by mudmin - 08-18-2016, 02:33 PM
Download Folder/PDFs - by sbarbee - 08-18-2016, 03:09 PM
Download Folder/PDFs - by mudmin - 08-18-2016, 03:20 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)