PHP - Magpie Php Flickr
I am trying to pull in the latest Flickr images from my account and using magpierss to parse the feed.
I am successfully creating a ul list of the images using the code below, but I cannot see how to size the images, can anyone help. The $item['description']; line produces: Username posted a photo: FlickrImage <? require_once 'magpierss/rss_fetch.inc'; $url = ''; $rss = fetch_rss( $url ); echo '<ul>'; foreach ($rss->items as $item) { $href = $item['link']; $title = $item['title']; $img = $item['description']; echo "<li><a href=$href>" . $img . "</a></li>"; } echo "</ul>"; ?> Similar Tutorialshttp://ahy4life.com/test2/press.php I am following the tutorial below: http://www.adambate.com/how-to-add-a-flickr-based-photo-gallery-to-your-website-phpflickr-lightbox/ I am encountering errors when I introduce the code below. Not sure what is causing it. The flickr photo set is named 'AHY' . php and js <CODE> <script type="text/javascript" src="photos/lightbox2.05/js/prototype.js"></script> <script type="text/javascript" src="photos/lightbox2.05/js/scriptaculous.js?load=effects,builder"></ script> <script type="text/javascript" src="photos/lightbox2.05/js/lightbox.js"></script> <?php require_once("photos/phpFlickr-3.1/phpFlickr.php"); $f = new phpFlickr("b16911dd0ec59f16ed66e80711edbdaf"); // API $user = "ahy4l@yahoo.com"; $ph_sets = $f->photosets_getList($user); ?> </CODE> <CODE> <!-- Photo Gallery --> <div id="gallery"> <?php foreach ($ph_sets['AHY'] 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['AHY']['photo'] as $photo): ?> <div class="photos"> <a rel="lightbox[]" href="<?= $f->buildPhotoURL($photo, 'medium') ?>" title="<?= $photo['title'] ?>"> <img src="<?= $f->buildPhotoURL($photo, 'square') ?>" alt="<?= $photo['title'] ?>" title="<?= $photo['title'] ?>" /> </a> </div> <?php endforeach; ?> </div> <?php endforeach; ?> </div> The CSS I use for this is: #gallery { position: relative; float: left; width: 600px; padding: 0px 15px 10px 15px; } .photos { position: relative; float: left; display: block; padding-bottom: 10px; } .photosets { clear: both; padding-top: 1px; } .photosets h2 { color: #000; } </CODE> hello dear php-experts, well today i have a question regarding the organizing photos in flickr -favs how to do that ? i have 1500 favorites. now i want to organize them into certain " subfolders " or directories question: is this possible? any ideas - i look forward note: i have seen that i am able to download all favs automatically _ great thing but that is another story. |