Update a gallery webpage via Dropbox? - php

I'd like to know if the following situation and scripts are at all possible:
I'm looking to have a photo-gallery (Javascript) webpage that will display in order of the latest added to the Dropbox folder (PHP or Python?).
That is, when someone adds a picture to the Dropbox folder, there is a script on the webpage that will check the Dropbox folder and then embed those images onto the webpage via the newest added and the webpage will automatically be updated.
Is it at all possible to link to a Dropbox folder via a webpage? If so, how would I best go about using scripts to automate the process of updating the webpage with new content?
Any and all help is very appreciated, thanks!

If you can install the DropBox client on the webserver then it would be simple to let it sync your folder and then iterate over the contents of the folder with a programming language (PHP, Python, .NET etc) and produce the gallery page. This could be done every time the page is requested or as a scheduled job which recreayes a static page. This is all dependent on you having access to install the client on your server.

You can try this : http://forums.dropbox.com/topic.php?id=15885

You can use the (alpha) tool autodrop, wich is just that: a simple gallery frontend that uses images in Dropbox.
As said: alpha. I am still developing it, rewriting it and making it a little prettier and nicer.
Written in Ruby, using dropbox, sinatra and HAML gems. So you will need a host that supports Ruby apps.

Related

How to find the web site page add on the page of public web site

I want to get the notification if the company public web site add the document on there web sites. I need to do this for around 400 public sites. As every site will have different document directory, i will make the database for all sites directory information in Mysql at my local server.
Example1
http://www.hubpower.com
The documents directory is placed in on the following path
http://www.hubpower.com/wp-content/themes/hubco/pdf/
There are further two documents link in the above folder:
http://www.hubpower.com/wp-content/themes/hubco/pdf/3Q2K17%20Result.pdf
http://www.hubpower.com/wp-content/themes/hubco/pdf/1910-financial-results-announcements-(dec-2015).pdf
Example2
http://www.pk.abbott/investor/investor-information.html
There are two documents directories is placed in on the following path
http://dam.abbott.com/en-pk/documents/pdf/investors/
http://dam.abbott.com/en-pk/investor-relations/
Here are the documents links:
http://dam.abbott.com/en-pk/documents/pdf/investors/Q12017.pdf
http://dam.abbott.com/en-pk/investor-relations/2016Q3.pdf
http://dam.abbott.com/en-pk/investor-relations/Abbott_A_R_2016.pdf
http://dam.abbott.com/en-pk/investor-relations/AR2015.pdf
If website add any more pdf documents on above path, I would like to have notification on email plus further download the new documents from website directory to my local server.
Please advice some solution to achieve this goal. I prefer working with
Restful, PHP, Angularjs, Nodejs, python,Javacript
Thanks & regards
you can use any Website Content Changes tool like Chrome Plugin Visualping which can email you.
Form this Answer
In general, you will need to poll the website if there are no other possibilities like a news feed. You can't force them to provide such a service.
For Wikipedia in detail, there are live update IRC streams, one for each project. Wikistream is such an app that reads the feed, you can view it's open source node.js code at github.
You can use nodejs and the request module to get the html for every 400 pages you are mentioning, then you parse it with cheerio, then you use mysql module to put all the data into your database, you can also check if the data you scraped already exist in your database, if yes, you do nothing, you can do this like once a day

Angular2 & MAMP integration

I am currently using AngularCLI to generate an app for me. When starting npm serve is starts its own server. However, i need to integrate PHP / MAMP and thus it uses it's own web server.
What is the best way to link the two? Very little info on Google but I am probably not searching for the right terms.
first of all, to host your app on a mamp-server you just need to:
ng build --prod
and then copy the files in the dist-folder to the root of your web-server.
But Im guessing that you then want to read and write from the database.
This is my recommendation:
Dont put php-tags in your html, make web-services
e.g. make php-scripts that get data from the database and outputs the as json, then use HTTP to get the data to your Angular-app.
Add root url (hostname) into build js links in index.html,index.html not understand to .css .js files in build folder in hosting time.

Is there any way to use a Joomla site into an app using PhoneGap?

I am new in PhoneGap,
I have a Joomla Site, I want to create a PhoneGap App using that Joomla site. so is this possible ? if yes than how can i implement it ?.
You can use. But you have to create web services for request and responses. Because Phonegap will not run PHP script. So you can create webservices to access Joomla functionality via JSON responses from your joomla. You can get the JSON data via jQuery in your phonegap app.
and someone said PGBuild will convert webpage into phonegap app. You can try it also.
I have succeeded creating an application as follows:
Design your Joomla page so it's responsive and renders correctly on your mobile;
Download the whole thing with wget
Edit all urls and make them point to the right (local-remote) locations.
I saved all css, images, js locally so the page would load even offline; then changed all the links so they point to the remote host;
All forms should point to the remote host;
Most modules and components were changed so after the initial display (local) they will load the updated info in the frame.
Popups won't be available, so you'll need heavy workarounds for facebook integration etc.
Also, if you plan to use any phonegap features, they will only be available if you load the library inside your downloaded page; this will force you to change all calls to ajax (no document.location.href calls are possible since you'll lose the phonegap javascript).
The first time you load the page from the server it will take forever to load. Ensure you have proper caching set up otherwise you'll just lose your customers.
My advice is to start with an ajax project at the very beginning, it will save you lots of headaches.
Keep in mind, if you plan to use iframes, forget it. They work lousily on iphones, and debugging is nearly impossible. Simply take your time to plan a real phone app in javascript & using Ajax for the calls.
You don't need any webservices in Joomla for loading content, simply use:
&tmpl=component
when you need the content of a module.
Additionally, for blogs and lists, Joomla makes RSS feeds available so you shouldn't need too much coding to achieve this.
I have limited myself to ajaxifying the modules, which makes caching more efficient on the server and the interfaces appear more dynamic.

How to post images to users' wall (or in folders/albums) on Facebook (2013)

I am using Facebook's PHP SDK. I looked here (official documentation by Facebook) for help. It is not working for me because I am using images hosted externally but if I try to upload files hosted within my server then it works fine.
Is there any new way to do this. Please try to explain both (Posting to feed and to some folder/album). Sorry for this question but others here were of no help to me.
Please suggest any PHP editor that is compatible with Facebook's API. (Auto-completion etc.)
Stack is normally for solving small issues (think using = rather than > in a query) not a complete project.
Have you attempted writing this code yourself, if so what errors is it spitting out? rather than saying it doesn't work.
If the images are stored somewhere out there, you need to download them to your server and upload them to FB. You can't just tell FB an URL of an image, it's not working like this.
In order to upload fotos, you may use the "photo post" Method on the FB API. And it wants the binary data of the image. You may link an input and an output stream to that (what I would prefer using Java since no storage is needed).
Since your code is working with locally hosted images, just encapsulate that part and make the external image an internal one first.

Dreamweaver's build app function in cs 5.5 breaks if there is php code?

For javascript and html files only, Dreamweaver's build app for android function seems to work great in cs 5.5. But when any php code is put in (for authentication, or for ajaxing in web service returns ) it seems that the android app just displays broken php code instead of executing it. When building the app, Dreamweaver won't even let you use a root php file in the project; it only seems to only accept html files.
Am I doing something wrong? Building apps out of web language-based files seems a lot less useful if server-side code isn't allowed.
Are there any other alternatives? Titanium studio looks really complicated, but I'm willing to read the docs if it's worth the time.
http://help.adobe.com/en_US/dreamweaver/cs/using/WSeffff8bffc80208478c8d43312e240fe0ad-8000.html
Indeed it only packages HTML, CSS and Javascript into an Android or iOS package.
I'm afraid you'll have to learn real Android development if you want something more complex.
Dreamweaver will package the files up just like you asked, however, the destination system is what runs the code. Android doesn't execute the PHP within the app. Your app has to connect with a remote server that is to handle the log in. Thinks of two separate apps, one on the phone and one on your server.
Android doesn't execute the PHP within the app. This is because PHP is a server side client and Not client side. Unless they create some inbuit servers within phones from which native apps can tap into. One option you can use is to use html files and within them, create links to php files which are in online servers so as to have your scripts executed.

Categories