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


Permlink Replies: 18 - Pages: 2 [ 1 2 | Next ] - Last Post: 4 Mar 17, 14:09 Last Post By: jimberry
clicketyclick

Posts: 5
Registered: 3-Feb-2017
How to add my site's header and footer to an album
Posted: 26 Feb 17, 21:59
 
  Click to reply to this thread Reply
Well, I've searched the site, and what I've discovered is there is only one way to make an album look like a seamless part of an existing website, which is to use an iframes, of which I'm not a fan.

I have set up my skin to make php index files instead of html, so it seems I could edit one of the skin files and simply include the header and footer into each index page. I'm assuming that would be an edit to the page-header.inc and page-footer.inc files, but I don't know how to do that with javascript.

In php, I just
<?php include('../sitewide/header.htm'); ?>

In the index.htt file, I see
<ja:include page="page-footer.inc" />

So, I tried <ja:include page="../sitewide/header.htm" /> which I'm sure you already know didn't work. I then did a complicated find/replace with dreamweaver, which inserted these two php includes, but when I updated the album, these changes were overrwritten.

How can these two files be included so that my album actually look like its part of my site, and not an orphaned afterthought? I'm sure it's an easy fix, but I am a pre-novice when it comes to javascript.

Edited by: clicketyclick on 26-Feb-2017 22:02
RobM

Posts: 3,815
Registered: 4-Aug-2006
Re: How to add my site's header and footer to an album
Posted: 26 Feb 17, 23:52   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
Using skins, like responsive, that let you embed the album without an iframe is one option - though most of those skins are not actively supported by their developers.

Another option is to make your own skin based on your own header and footer, but obviously you need to know the basics of coding, that by the way is how I got involved with jAlbum.

Getting any other skin to conform to your existing design is unlikely to be 100% match. What skin are you currently using, try posting in that skin's forum for help and advice.
jimberry

Posts: 591
Registered: 30-Aug-2004
Re: How to add my site's header and footer to an album
Posted: 27 Feb 17, 09:07   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
Is the relative path '../sitewide/header.htm' only "relative" when you are in your Dreamweaver environment and not when you are in your jAlbum environment?

Are you are already using page-header.inc and page-footer.inc in your non-jalbum files?

Are these non-jalbum files created in Dreamweaver?

Do these "*.inc" files use Dreamweaver variables which are then replaced when Dreamweaver creates the PHP or HTML pages?

Can you attach examples of the page-header.inc and page-footer.inc files so someone can perhaps explain how to convert the Dreamweaver variables to jAlbum variables?

(Javascript might not be necessary for this)
davidekholm

Posts: 3,442
Registered: 18-Oct-2002
Re: How to add my site's header and footer to an album
Posted: 27 Feb 17, 10:52   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
I'm a fan of the "Responsive" skin approach and hope we'll see more skins that uses the same technique. Here's a sample: http://www.your-site-here.com/responsive/wordpress
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to add my site's header and footer to an album
Posted: 27 Feb 17, 12:53   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I'm a fan of the "Responsive" skin approach....

Perhaps jAlbum should support Responsive. It's not being developed, and forum questions about it are going unanswered.

[I] hope we'll see more skins that uses the same technique.

It looks like that will require a deus ex machina. ;)
clicketyclick

Posts: 5
Registered: 3-Feb-2017
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 16:01   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
Wow. I didn't expect so many answers and so quickly! Thanks guys.

I chose to make all my index files php instead of html, anticipating that including my two files would be possible.

RobM
I would like to try my hand at creating a skin, but at this point, I'm scrambling to move from one server to another, so I don't have time to spare on that yet. I just want to be able to include two php files into the photoblogger skin: header.php and footer.php. These two files are included on every single page of my site, and I can make a change to either and it is immediately changed on all pages. Except for my albums.

For this reason, I don't want to copy them, I want to include them.

Despite the fact that my images have long been viewed more by mobile devices than desktop computers, and that the Internet trend is away from desktop surfing and towards mobile, there are few skins here that support responsive images, swiping, and other mobile features.

http://bgr.com/2016/11/02/internet-usage-desktop-vs-mobile/ (just one of many sources)

Photoblogger supports both responsive and swipe. Other than being able to include my two files, it does what I need.

jimberry
- Both my sitewide directory and my jalbum directory are in my site's root.
- I'm using both the page-header.inc or the page-footer.inc (photoblogger's default) but have not made any changes to them.
- The non-jalbum files are created in Dreamweaver.

davidekholm and jGromit
Maybe instead of jalbum adopting the responsive skin, it would be a better approach to upgrade all supported skins to be fully mobile capable, and to be able to incorporate a simple php include. Both Mobile First and including header and footer files are Internet standards, so it wouldn't be tweaking anything that only a few would obtain benefits.

In the short term, can anyone tell me how I can translate <? php include into a <ja include or if it is even possible?

Thanks for your help.

Edited by: clicketyclick on 28-Feb-2017 16:01
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 16:48   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
clicketyclick wrote:
Maybe instead of jalbum adopting the responsive skin, it would be a better approach to upgrade all supported skins to be fully mobile capable....

Who do you think would do this?

I'll admit that I'm sandbagging you. The entire jAlbum staff at present consists of three people - they're handling all the core development, Turtle and Photoblogger development, responding to helpdesk messages, maintaining the online version of jAlbum. maintaining the iOS and Android apps, maintaining the website, administering the hosting, and taking care of all business matters. Anders even has to water the plants in the office.

Most of the skins are the creations of unpaid volunteer hobbyists who are answerable to no one, and who do their own thing.

...and to be able to incorporate a simple php include.

Not going to happen. The jAlbum hosting server does not support any server-side processing, so albums that have php includes couldn't be hosted here.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 16:57   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
clicketyclick wrote:
In the short term, can anyone tell me how I can translate <? php include into a <ja include or if it is even possible?

I think you're confusing two things that are completely unrelated. A php include happens server-side, at the time of a site visit. A ja:include happens in the application when the album is being built. It's just a quick and dirty way of busting up the coding into more manageable chunks, instead of having all of it in one place. It's also useful if you have repeated code, for example, the same <head> section on all pages.

But it's not a way of magically incorporating your own page content into an album. The problem isn't simply inserting your code - you could easily do that in Photoblogger, for example, by entering material on the Advanced tab. But you'll notice that there's no place in there to enter material to go at the top of the <body> section, which should be a tip-off.

You could edit page-header.inc to include your own stuff, but that wouldn't work. The reason is that the script that drives the page display assumes that it is completely in charge of where things go on the page. If there's "outside" material there, the page layout will be mangled.

Skins that don't use dynamic techniques to drive the layout are vastly easier to modify, but they also tend not to be fully responsive. That's the conundrum - responsiveness makes modification difficult.
clicketyclick

Posts: 5
Registered: 3-Feb-2017
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 17:39   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Hi jGromit -

This is clarification, not argumentative.

In response to your first answer, I didn't feel sandbagged at all. I have understood from the beginning that the staff is small, which is exactly why I suggested they not take over officially supporting yet another skin.

Since there is no arguing that mobile surfing, along with responsiveness, touch, and swiping is not only the future of viewing photos, it is actually the present of viewing photos. That is why I suggested that instead of focusing their limited time to prop up old and fading technology, they use their limited resources to support the present and the future, instead of the past.

In response to the second, "Not going to happen" overlooking that it sounds like "my way or the highway", I do recall one of the skins that do support php includes. Don't remember which, but whichever it was, it wasn't responsive, which is why I rejected it.

Since it isn't a requirement that albums be hosted on your servers, allowing php includes would benefit those who are self-hosting. I'm sure there is a simple if/then statement that could be included to prevent php includes on your servers, or to allow them anywhere else. Not arguing, as you clearly are cemented in this, but something for you to ponder at a future planning session.

As I said, I can do a convoluted search/replace with Dreamweaver to put my header and footer in, it's just a pain when the album is added or modified, as the new files generated by jalbum wipe out the ones I had recreated.

Edited by: clicketyclick on 28-Feb-2017 17:48

Edited by: clicketyclick on 28-Feb-2017 17:49

Edited by: clicketyclick on 28-Feb-2017 17:50
clicketyclick

Posts: 5
Registered: 3-Feb-2017
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 17:48   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I'm not confusing anything. I'd have to know something about javascript to be confused. Rather, I am completely ignorant about it.

It isn't magic to include anything in a website. It's coding and separation of code and layout. And even the way jalbum builds sites, incorporating a header and footer file above and below the album would not screw up the layout. The two files would just "float" above and below the jalbum generated files.

Again, I don't want to waste time with your thinking I'm trying to change your minds there, just presenting my point of view.

I think the solution to my requirements is to stick with my find/replace workaround to put the header and footer files in, and to put them where I want them to be, since although this is clunky, I understand from your replies that there is no other way.

Thanks for your time and clarification, and don't think that my disagreements with you are personal, nor do they reduce my appreciation of what you guys have put together.
JeffTucker

Posts: 8,039
Registered: 31-Jan-2006
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 18:28   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
clicketyclick wrote:
Since there is no arguing that mobile surfing, along with responsiveness, touch, and swiping is not only the future of viewing photos, it is actually the present of viewing photos.

Oh, I think there's a lot of arguing that.

If you're aiming at display on a 4" phone, there's really no reason to bother with something like jAlbum at all, IMO. What you want is something more like the jAlbum iOS and Android apps, that produce a simple thumbnail layout and then show one image at a time. There's just no room for fancy headers, logos, thumbstrips, borders, lengthy captions, EXIF information, and so on. you might as well just use Instagram or Flickr.

And if you're aiming at the phone visitor, you might as well get rid of the pricey DSLR, too. At that size, phone pics are more than good enough. And forget about selling images - who would be foolish enough to choose their wedding photos based on proofs viewed on a phone?

I don't think it's possible to come up with a single album design that's going to work equally well on a phone and on a 27" monitor. That's why most commercial websites either detect that you're visiting with a small device and redirect you to a different page entirely, or provide you with an app that doesn't even attempt to mimic the "real" website. They don't try to produce a single site design that's infinitely adaptable to viewport size.

I think that proclaiming the death of the desktop PC is misguided. It's like arguing that there's no reason to manufacture speakers any longer because everyone is going to use earbuds. Those who care about the quality of sound will not be happy with earbuds. Those who care about the quality of images will not be happy with a matchbox monitor.

You can watch a football game on your phone, right? Does that mean that big flatscreen TV's are headed for the scrap heap?
clicketyclick

Posts: 5
Registered: 3-Feb-2017
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 18:48   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
OK. I've already admitted I know nothing about javascript coding, and still very little about .jalbum, and continue to stand by that.

However, I am a professional photographer, and have been for 10 years, as well as coding website for the same amount of time, so I am happy to argue with you about both of those if picking an argument is what you're looking for.

1. The albums I've already created look acceptable to me on a phone, a tablet, and a 19" computer monitor with the photos I've taken with a DSLR, and resized for web display. I then send high resolution files to my clients via a CD, as they are the ones who paid for the photos. The low res files are online for the people at the events to share on social media, or use for their own purposes.

2. My site (using my header.php file) CAN detect what size viewport is accessing a page and adjusts its display accordingly.

3. I never was "proclaiming the death of the desktop PC". I just know from viewing my own sites's analytics that more people view photos on mobile devices than desktops. I also sent a link from one of many sites that are not proclaiming death. They are reporting that more people are viewing sites from a mobile device.

4. Twitter Bootstrap 3 and beyond are focusing on "mobile first" design. Why would such a large company do that if it wasn't true that mobile devices are powerful forces in the web design world?

5. I think football games are a huge waste of time and money, but that doesn't mean I'm going to scrap my Pixel phone and flatscreen TV.

Like it or not, your "ain't going to happen" beliefs are only true in the jalbum world. The rest of the internet is more responsive (pun intended) to the way people are viewing websites.

I have found my own workaround and posted it in my previous post, so I'm happy. If you want to continue this discussion, lets move it to a more appropriate area of the forum where it would be considered more signal and less noise.

Dschuwi

Posts: 296
Registered: 12-Nov-2003
Re: How to add my site's header and footer to an album
Posted: 28 Feb 17, 22:47   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
I am afraid I am a bit lost what exactly you are after.

If it is simply about inserting your own additional code at either the top or bottom of each generated page's <body> section, then you can save these files as header.inc or footer.inc and let my skin Classic Aligned 2 do this automatically.

See jAlbum > Settings > Classic Aligned 2 > Special
jimberry

Posts: 591
Registered: 30-Aug-2004
Re: How to add my site's header and footer to an album
Posted: 1 Mar 17, 01:46   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
clicketyclick wrote:
... ...
As I said, I can do a convoluted search/replace with Dreamweaver to put my header and footer in, it's just a pain when the album is added or modified, as the new files generated by jalbum wipe out the ones I had recreated.

If I understand correctly, you would like to have your header and footer included server-side so that when you make changes you will not have to regenerate all pages, but just upload the changed header and/or footer.

You can't actually translate a "php include" into a "ja:include" as they are different concepts (php include is done server-side, ja:include happens before the page is uploaded to the server).

I have not used PHP for a number of years so i'm a bit rusty, but if you can supply the source code for one of your PHP pages that currently includes the header and footer I will try to find a way to add that "<? php include" into a jalbum skin so that you don't have to "do a convoluted search/replace with Dreamweaver" to modify each album page after it is created by jalbum.

... I do recall one of the skins that do support php includes.
BluPlusPlus or Aeneid, probably

(...edit...)
Have you tried editing index.htt to replace
<ja:include page="page-header.inc" />
with
<?php include('../sitewide/header.php'); ?>

It might be a s simple as that.
(I don't currently have PHP on my laptop, so I can't test this without uploading to my host server)

Edited by: jimberry on 01-Mar-2017 10:08

(... further edit)
It appears that you should not replace the existing page-header.inc and footer.inc files - they are NOT options but integral parts of the index file, containing the starting <body> and the closing </body>.
Instead, try inserting your php include header.php statement as the first item after "<body>" in "'page-header.inc" and your include footer.php statement as the last item before the closing </body> in "page-footer.html"

Edited by: jimberry on 01-Mar-2017 11:26
Laza

Posts: 1,732
Registered: 6-Sep-2005
Re: How to add my site's header and footer to an album
Posted: 1 Mar 17, 08:25   in response to: clicketyclick in response to: clicketyclick
 
  Click to reply to this thread Reply
I agree with you: mobile first design should be the base today. My new skins utilize this approach: Photoblogger, and the upcoming Turtle Two are both based on Zurb Foundation, just like the new jalbum.net site.

Unfortunately jAlbum was made more than a decade ago when nobody thought mobiles will one day be able displaying web pages. Most of our skins - made by enthusiasts - were made for desktops therefore, and I'm afraid we can't offer them any incentives to renew their skins. Perhaps some kind of Wordpress theme development model could work...

Fitting a skin like Turtle for mobiles is a huge task - I'm rewriting almost every bit of the code - it's dated anyway. I have no time for other's skins besides giving support and making the graphics and promo materials too.

You can inject your PHP calls through the "Settings / Photoblogger / Advanced / HTML" boxes. (Now I see the Body top hook is missing from the GUI.)
Legend
Forum admins
Helpful Answer
Correct Answer

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