[c2project] List and load files in any web folder with php

Post your work in progress addons and get feedback

Post » Sat Sep 13, 2014 11:00 am

It's created as construct project with a simple ajax conditions to load available files in any web folder capable of running php script.

What it's for?
Automated loading data files in a web folder. For example: plugins for application, maps for games or items contained in a separate files.

Files:
- preview prettyminimal.com/projects/fileLoader/01
- c2project prettyminimal.com/projects/fileLoader/01/[c2project]fileLoader.capx
- php script prettyminimal.com/projects/fileLoader/01/myfiles/list.txt - change the name to list.php


What's required:
- Running PHP server for generating file list
- Web folder on the same server for publishing construct application (ajax does not allow cross domain requests)
- Web folder with any files to be loaded into our application

Screen:
Image

How it works:
1. App sends request to list.php file
2. list.php generates Json with file list from the same folder
3. App receives Filenames in Json and loads them into dictionary object as file0 = "aaa.txt", file1 = "bbb.txt" and so on
Last edited by Antraxis on Tue Sep 16, 2014 7:11 am, edited 5 times in total.
B
4
S
1
Posts: 20
Reputation: 392

Post » Sun Sep 14, 2014 10:05 am

Would this work with Node-Webkit projects ?
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Tue Sep 16, 2014 7:15 am

spongehammer wrote:Would this work with Node-Webkit projects ?


It works event better on Node-Webkit project, It allows application to load files both from localhost and remote servers (cross domain requests).

[edit] I added downloadable project files in description for your projects ;)
B
4
S
1
Posts: 20
Reputation: 392

Post » Tue Sep 16, 2014 8:49 am

@Antraxis

Excellent, thanks :)
B
51
S
16
G
9
Posts: 1,098
Reputation: 11,252

Post » Fri Feb 20, 2015 11:49 pm

404'd links here? Is this abandoned/deprecated?
Image
B
14
S
3
G
1
Posts: 61
Reputation: 1,003


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest