Page 6 of 7

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Sat Aug 19, 2017 8:47 pm
by alex4orly
I always upload the PDF's using FileZilla,
No idea how to make a page that includes your extension without WWB, how do I do that?

Cheers

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Sun Aug 20, 2017 5:55 pm
by alexmasss
As I described you in my previous post, please see the demo http://www.alexmas.cloud/scanfolder
It works both on desktop and mobile. If you want to open the Pdf directly on smartphone you may use Prestigio ebook reader.

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 7:03 am
by alex4orly
Alex,

I visited your demo and as expected of course it works fine.
In the previous extension I used with WWB (PHP Directory Listing) which as you probably know is no longer supported, the scrip was placed in the root directory of the website, and the Folder where the PDF files were had to be specified in the extension as "./pdffolder" to indicate that the files are in a directory under the root folder.

With your script, it seems that the script and the PDF files are expected to be in the same sub-directory? or am I wrong.
I tried that too but all that I see is the top and bottom bar of the script without the files listed

I used initially your sample project, then I uploaded the script php file maually... nothing helped - I click on a file and it does NOT open the pdf.
So I will try again :
1) I load the script file called dirlist.php into the root of my website
2) I have the pdf files in a subfolder called "previousnewsletters"

WHat should I configure the scrip to point to? I do it all manually, forget WWB for a moment...

Cheers

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 8:24 am
by alex4orly
I will tell you one more thing, in your example, when I view source of the page there is an item that looks like this

<a href="?dir=folderscan/">
folderscan </a>

On my page, this item does NOT exist... Why?

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 8:30 am
by WWBman
FWIW:
Out of curiosity I replicated your structure in a test folder called dirlist.php under the root and then created the previousnewsletters folder under dirlist.php containing 3 pdf files.
"root"/dirlist.php/previousnewsletters/2013_11.pdf
"root"/dirlist.php/previousnewsletters/2014_01.pdf
"root"/dirlist.php/previousnewsletters/2015_11.pdf

Added the extension to the page (no layers or anything).
Published All to dirlist.php and it worked fine i.e. the pdfs displayed when clicking in the list.
So can you see anything different from yours?
http://wwb.batcave.net/dirlist.php

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 8:49 am
by alex4orly
I must be doing something wrong here, your example works perfectly.
I have the following
root
In there I have all my set files
I also have a file (NOT A FOLDER) called dirlist.php (I renamed what you had in your project as index.php to dirlist.php) becasue my real index.php is something else...
In the configuration of my dirlist.php script, i nominated '.' as the folder location of the script
Now - how do I tell the script WHER / In which folder are my PDF newsletters? there is no configuration for this in the scrip?

1) When you say, "Published ALL, what do you mean? There is only ONE source file dirlist.php
2) In your sample project - there is a FOLDER called "Files" what is this?

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 9:27 am
by WWBman
I mean "Publish all files" in wwb Publish Web Site dialog box.
In your sample project - there is a FOLDER called "Files" what is this?
I don't see this anywhere!! :?

This is my project file, it'll be interesting if you can see any difference to yours.
http://wwb.batcave.net/dirlist.php/PHP% ... 20Scan.wbs

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 9:57 am
by alex4orly
Downloaded your project file, yes - it doesn't have a folder named "Files" in it...
Renamed index.php to dirlist.php - didn't change anything
Uploaded the file disrlist.php and dirlist.css (created by the project) into the folder "previousnewsletters"

Have a look what I get : http://www.nmaa-rc.org.au/previousnewsl ... irlist.php

All the PDF files are in that same folder, but none shows in the list

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 10:50 am
by WWBman
I don't understand why you have now created previousnewsletters in the root.
Just as a test, create a folder in the root called test1 (or anything else).
Use my project asis and publish all files to test1 using the built-in wwb publish.
Create a folder in test1 called previousnewsletters.
Copy some pdf files to previousnewsletters.
See if that works.
I guess the problem may be where you put the html and folders and what they are called.

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 11:15 am
by alex4orly
I don't have a html
I have dirlist.php which is renamed from your index.php

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 11:20 am
by WWBman
I meant html genericly.
If you have time just try my project and if that works for you then it must be the placement/naming of your html/files/folders.
I realise the time difference between us!

EDIT:
I reckon the problem is with the file dirlist.php; rename it to anything else.
Or, I would rename the folder to dirlist instead of dirlist.php.

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 9:50 pm
by alex4orly
Hello again,

It finnaly got to me what the problem is - the file MUST be called index.php, this is the only way way you can point to a folder and it will start that page by default, I realized it from your examples - in those examples there is a url that has in it only the folder, without pointing to a filename.php.

So here it is : http://www.nmaa-rc.org.au/news/

And becasue I can't have 2 files with that name in the root / home folder, it MUST be placed into its own folder and within that folder make a subfolder where the files are stored, and specify that subfolder name in the top configuration option of index.php

Questions :

1) How do I change the default sorting to be decending?
2) How to make the columns width to be fixed, not stretch to the full width of the screen?

Cheers

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Mon Aug 21, 2017 10:30 pm
by WWBman
Excellent, glad you got it working.
Alas, I can't answer your 2 questions.

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Tue Aug 22, 2017 8:02 am
by WWBman
On second thoughts! :-)

1. To get the order descending
change:
private $__sortOrder = 'asc';
to:
private $__sortOrder = 'desc';

in the php file about line 126.
*****************************************************************
But beware it will have to be changed after each Publish.
*****************************************************************

2. Have you tried using a layer, as specified in Help (except I used centre instead of stretch)?
http://wwb.batcave.net/dirlist.php

Re: PHP Directory Listing (FREE) - NEW VERSION/NEW NAME

Posted: Wed Aug 23, 2017 12:05 am
by alex4orly
Thanks, I will try that

Cheers