Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Adam Bate

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Adam Bate got a reaction from Pezza4u in Photo gallery client can add to?   
    Hey Pezza4u,
     
    Yeah, my install was a little out dated. I had some time this morning to take a closer look on a fresh install. I have added a list of available sizes to the tutorial - thanks for the tip.
     
    I have also put up a solution for displaying the description. Here is the code you'll need:
     
    <div id="gallery">
    <?php foreach ($ph_sets['photoset'] as $ph_set): ?>
    <div class="photosets">
    <p><h2><?php print $ph_set['title']; ?></h2></p>
    <?php $photoset_id = $ph_set['id'];
    $photos = $f->photosets_getPhotos($photoset_id);
    foreach ($photos['photoset']['photo'] as $photo):
    $d = $f->photos_getInfo($photo['id']); ?>
    <div class="photos">
    <a rel="lightbox[]"
    href="<?= $f->buildPhotoURL($photo, 'medium') ?>"
    title="<?= $d['photo']['description'] ?>">
    <img src="<?= $f->buildPhotoURL($photo, 'square') ?>"
    alt="<?= $photo['title'] ?>" title="<?= $photo['title'] ?>" />
    </a>
    </div>
    <?php endforeach; ?>
    </div>
    <?php endforeach; ?>
    </div>
     
    The changes include the addition of the line, "$d = $f->photos_getInfo($photo['id']);" as well as changing the title attribute in the <a> tag to $d['photo']['description'].
     
    As I mentioned on the tutorial, it's a little inefficient due to having to lookup the description for every photo (needs to be done in the loop) so it might slow down load time of your site. Unfortunately there does not seem to be a way to grab this info for the entire photoset outside of the loop. Once they implement this (or I figure out that there is a way) I'll make the necessary changes.
     
    Hope this helps!
  2. Like
    Adam Bate got a reaction from Pezza4u in Photo gallery client can add to?   
    Just figured out the medium size issue. I didn't realize there were 2 "medium" sizes according to flickr, a 500 and a 640.
     
    I noticed the 640 as you said is the one with _z on the end.
     
    This is what you'll need to do:
     
    Edit the phpFlickr.php file and find the following lines:
     
    function buildPhotoURL ($photo, $size = "Medium")
    {
    //receives an array (can use the individual photo data returned
    //from an API call) and returns a URL (doesn't mean that the
    //file size exists)
    $sizes = array(
    "square" => "_s",
    "thumbnail" => "_t",
    "small" => "_m",
    "medium" => "",
    "large" => "_b",
    "original" => "_o"
    );
     
    You have two options. If you want all 'medium' results to be the 640 instead of the 500, simply change this line:
     
    "medium" => "",
     
    to:
     
    "medium" => "_z",
     
    Alternatively, you can try to add another line altogether, such as this:
     
    "med640" => "_z",
     
    Not sure the the latter will work as I didn't check the rest of the file, but I'm assuming it will.
     
    I didn't test this on a gallery, but I'm 99% sure it'll work.
     
    Cheers.
    Adam.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.