This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Pages: 1 - Last Post: 22-Aug-2019 09:45 Last Post By: davidekholm
jGromit

Posts: 7,279
Registered: 31-Jan-2006
Option for local preview from localhost
Posted: 22-Jul-2019 22:17
 
  Click to reply to this thread Reply
There are now three skins - Photoblogger, Projector, and Tiger - that can't be previewed locally in a browser. Firefox was still usable until recently, but that one is now off the list.

For a variety of reasons, I don't use the integrated browser. Among other things, at least one of my skins, Pluto, fails to display properly because the integrated browser can't handle the CSS. Pages that want to open things in a new tab, like a map, also fail, because the integrated browser has no tabbing. Last but certainly not least, the integrated browser has no developer's console, which is fatal.

I got tired of uploading things like Tiger test albums, tinkering, uploading again, and so on, so I finally installed XAMPP which, like WAMP, runs an Apache server on the PC. Got it right the first time, and like magic, I can preview a Tiger album without uploading it. Under Preferences, Album, I chose Under web directory as the output location, and entered the location of the XAMPP directory as the Web directory - in my case, C:\Users\jefft\xampp\htdocs.

It all works like a charm - test albums land under htdocs, I can preview them with FIrefox without uploading, and when I delete the entire project, the whole thing goes away without complaint.

Just one piece of the puzzle remaining. When I hit F12, jAlbum feeds the following URL to Firefox:
file:///C:/Users/jefft/xampp/htdocs/test/index.html
What I want, of course, is:
http://localhost/test/
So, what I'm after is another checkbox under Preferences, Album, directly below Web directory, labeled Use localhost. This would replace the URL that gets fed to the browser when you hit F12. In short, it should grab the value shown in Output directory and replace the portion that matches the entry for Web directory with http://localhost/

Sorry to be long-winded, but I wanted you to understand how I got to this point.
davidekholm

Posts: 3,551
Registered: 18-Oct-2002
Re: Option for local preview from localhost
Posted: 23-Jul-2019 23:15   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Good idea. While we're at it, how about if jAlbum gets to serve these web pages using its embedded web server? It would solve the problem with local browsing being prevented on modern browsers. Sadly firewalls might try to block jAlbum from starting its local web server though...
jGromit

Posts: 7,279
Registered: 31-Jan-2006
Re: Option for local preview from localhost
Posted: 23-Jul-2019 23:23   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I've never played with the jAlbum web server component, so can't really comment.

The beauty of something like XAMPP is that you can install the whole package if you like, including MySQL, Perl, and so on. Since it's Apache, which is common on shared hosts, you can mimic a lot of the "real" environment of your web host. But I did, indeed, have to tell my firewall to let XAMPP run a server. Just a one-click fix, happily.
MarkusD

Posts: 458
Registered: 13-Apr-2006
Re: Option for local preview from localhost
Posted: 16-Aug-2019 10:49   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Good idea. While we're at it, how about if jAlbum gets to serve these web pages using its embedded web server? It would solve the problem with local browsing being prevented on modern browsers. Sadly firewalls might try to block jAlbum from starting its local web server though...
As jGromit wrote it's not possible to preview an album with FF for example anymore. Using XAMPP could be one solution, or using your web server on your NAS, if you have one. I use that to preview an album with FF locally without uploading it to the internet.

Using the build in web server of JA sounds very promising. This would solve the problem without any further action for the JA user. Looking forward for this feature in the near future. Thanks.
davidekholm

Posts: 3,551
Registered: 18-Oct-2002
Re: Option for local preview from localhost
Posted: 21-Aug-2019 22:38   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Support for previewing using an embedded web server has now been added to v18.4 b2: http://jalbum.net/forum/thread.jspa?messageID=335152&#335152
jGromit

Posts: 7,279
Registered: 31-Jan-2006
Re: Option for local preview from localhost
Posted: 21-Aug-2019 23:57   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Even cleaner than my feature request - no need to install anything mysterious.

This pretty much removes my need for XAMPP. Still a good app for someone wanting to mess around with server-side goodies, but even if I wanted to do that, I have an otherwise unused domain on my web host where I can tinker with it "live."
davidekholm

Posts: 3,551
Registered: 18-Oct-2002
Re: Option for local preview from localhost
Posted: 22-Aug-2019 09:45   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Even cleaner than my feature request - no need to install anything mysterious.

This pretty much removes my need for XAMPP. Still a good app for someone wanting to mess around with server-side goodies, but even if I wanted to do that, I have an otherwise unused domain on my web host where I can tinker with it "live."


Yes, I think, for the vast majority, this will be better. If jAlbum is to generate preview links to an external but local web server, it would need to know under what name it has been shared too. Now we control this and simply use the album name.

Oh, the embedded Jetty server is very capable of server side processing too (but it's not a php server naturally), if we'd eventually want to go that route.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums