public function publishPhotos($photos, $albumName, $username) { $album = $this->createAlbum($albumName); $albumId = $album['aid']; $posts = array(); foreach ($photos as $photo) { $cid = microtime(true); if (file_exists($basePath = str_replace('/original/', '/base/', $photo['P_ORIG_PATH']))) { $path = $basePath; $file = PATH_FOTOROOT . $path; } else { $url = array_shift(dynamicImageLock($photo['P_ORIG_PATH'], $photo['P_KEY'], $photo['P_ROTATION'], $photo['P_WIDTH'], $photo['P_HEIGHT'], 640, 640)); $ch = curl_init($url); $_tmp = curl_exec($ch); $path = parse_url($url, PHP_URL_PATH); $file = PATH_HOMEROOT . $path; } $basename = basename($file); $args = array('method' => 'photos.upload', 'v' => $this->version, 'api_key' => $this->apikey, 'uid' => $this->fbId, 'call_id' => $cid, 'aid' => $albumId, 'caption' => 'Published from http://' . FF_SERVER_NAME . '/users/' . $username . '/', 'format' => 'XML'); $this->signRequest($args); $args[$basename] = '@' . realpath($file); ob_start(); $url = $this->createUrl('photos.upload'); $posts[] = $this->makeRequest($url, $args); ob_clean(); } foreach ($posts as $post) { $post->data; } return array('name' => $album['name'], 'link' => $album['link']); }
} else { $fb =& CFotobox::getInstance(); $fl =& CFlix::getInstance(); $tagsArr = (array) explode(',', $options[0]); $arrFotos = $fb->fotosSearch(array('USER_ID' => $user_id, 'TAGS' => $tagsArr, 'PERMISSION' => PERM_PHOTO_PUBLIC, 'ORDER' => 'P_TAKEN_BY_DAY', 'LIMIT' => 8)); $arrFlix = $fl->search(array('USER_ID' => $user_id, 'TYPE' => 'slideshow', 'TAGS' => $tagsArr, 'PERMISSION' => PERM_SLIDESHOW_PUBLIC, 'ORDER' => 'P_TAKEN', 'LIMIT' => 3)); //$arrFotos = $fb->fotosByTags($tagsArr, $user_id, 3, 'P_MOD_YMD', 0, 10); //$arrFlix = $fl->flixByTags($tagsArr, $user_id, 3, 'user', false, 0, 4); echo '<div style="padding-left:10px; padding-bottom:8px;">Photos tagged with: ' . $options[0] . '<span style="font-weight:normal;"> (<a href="/users/' . $username . '/photos/tags-' . $options[0] . '/">all photos tagged with ' . $options[0] . '</a>)</span></div> <div>'; if (count($arrFotos) > 0) { $i = 0; foreach ($arrFotos as $v) { $url = '/users/' . $username . '/photo/' . $v['P_ID'] . '/tags-' . $options[0] . '/?offset=' . $i; //$fotoUrl = dynamicImage($v['P_THUMB_PATH'], $v['P_KEY'], 150, 100); $fotoInfo = dynamicImageLock($v['P_THUMB_PATH'], $v['P_KEY'], $v['P_ROTATION'], $v['P_WIDTH'], $v['P_HEIGHT'], 150, 150); $imageHspace = intval((150 - $fotoInfo[1]) / 2); $imageVspace = intval((150 - $fotoInfo[2]) / 2); echo '<div style="float:left; padding:12px; width:150px; height:150px;"> <a href="' . $url . '"><img src="' . $fotoInfo[0] . '" ' . $fotoInfo[3] . ' border="0" class="border_dark" hspace="' . $imageHspace . '" vspace="' . $imageVspace . '" /></a> </div>'; $i++; } } else { echo '<div class="bold" style="padding-left:20px;">There are no photos tagged with ' . $options[0] . '</div>'; } echo '</div> <br clear="all" />'; echo '<div style="padding-top:0px; padding-left:10px; padding-bottom:8px;">Slideshows tagged with: ' . $options[0] . '<span style="font-weight:normal;"> (<a href="/users/' . $username . '/slideshows/tags-' . $options[0] . '/">all slideshows tagged with ' . $options[0] . '</a>)</span></div> <div style="padding-left:20px;">'; if (count($arrFlix) > 0) {
<?php $fb =& CFotobox::getInstance(); $fl =& CFlix::getInstance(); $fotoId = intval($_GET['foto_id']); $fotoData = $fb->fotoData($fotoId, $_USER_ID); //$flixData = $fl->flixByFotoIds(array($fotoId), false); $fotoName = basename($fotoData['P_THUMB_PATH']); $fotoName = substr($fotoName, strpos($fotoName, '_') + 1); $smallMedium = dynamicImageLock($fotoData['P_THUMB_PATH'], $fotoData['P_KEY'], $fotoData['P_ROTATION'], $fotoData['P_WIDTH'], $fotoData['P_HEIGHT'], 500, 375); $medium = dynamicImageLock($fotoData['P_THUMB_PATH'], $fotoData['P_KEY'], $fotoData['P_ROTATION'], $fotoData['P_WIDTH'], $fotoData['P_HEIGHT'], 600, 450); $large = dynamicImageLock($fotoData['P_THUMB_PATH'], $fotoData['P_KEY'], $fotoData['P_ROTATION'], $fotoData['P_WIDTH'], $fotoData['P_HEIGHT'], 800, 600); ?> <div style="width:740px;" align="left"> <div class="bold">All available sizes for <?php echo $fotoName; ?> </div> <div style="padding-top:10px;"> <div class="bullet"><a href="<?php echo $_SERVER['REQUEST_URI']; ?> #photoSquareThumbnail">Square Thumbnail (75x75)</a></div> <div class="bullet"><a href="<?php echo $_SERVER['REQUEST_URI']; ?> #photoSmall-Medium">Small-Medium (500x375)</a></div> <div class="bullet"><a href="<?php
} if ($offset !== false) { if ($offset == 0) { $previous = false; $next = 1; $limit = 2; } else { $offset--; $previous = 0; $next = 2; $limit = 3; } $nextPrevious = $fb->fotosSearch(array('MODE' => 'GROUP', 'GROUP_ID' => $group_id, 'TAGS' => $filterTags, 'ORDER' => 'P_CREATED', 'PERMISSION' => PERM_PHOTO_PUBLIC, 'OFFSET' => $offset, 'LIMIT' => $limit)); } $c_data = $c->comments($foto_id, 'foto'); $dynPhoto = dynamicImageLock($f_data['P_THUMB_PATH'], $f_data['P_KEY'], $f_data['P_ROTATION'], $f_data['P_WIDTH'], $f_data['P_HEIGHT'], 600, 450); ?> <div> <div style="float:left; width:600px; height:450px;"> <?php echo '<div style="z-index:2; width:' . $dynPhoto[1] . 'px; height:' . $dynPhoto[2] . 'px; margin:auto;"><img src="' . $dynPhoto[0] . '" id="photoMain" alt="' . htmlentities($f_data['P_NAME']) . '" ' . $dynPhoto[3] . ' border="0" class="my_foto_border" /></div>'; ?> </div> <div style="width:200px; float:left; margin-left:15px;"> <?php if (count($nextPrevious) > 0) { echo '<div style="width:180px; padding:10px; margin:auto;">'; if ($previous !== false) { $pPhoto = $nextPrevious[$previous]; $pUrl = '?action=group.photo&group_id=' . $group_id . '&page=' . $page . '&id=' . $pPhoto['P_ID'] . '&offset=' . $offset; if (isset($tags) && $tags !== '') {
<?php $fl =& CFlix::getInstance(); $key = isset($_GET['key']) ? $_GET['key'] : false; $slide = isset($_GET['slide']) ? $_GET['slide'] : 0; $slideshowData = $fl->search(array('KEY' => $key)); $elementsArr = jsonDecode($slideshowData['US_ELEMENTS']); // if we have a correct slide number if (count($elementsArr) > 0 && $slide < count($elementsArr)) { // if it's a photo/title/unknown if (array_key_exists('photoPath_str', $elementsArr[$slide])) { $img = dynamicImageLock($elementsArr[$slide]['thumbnailPath_str'], $elementsArr[$slide]['photoKey_str'], $elementsArr[$slide]['rotation_int'], $elementsArr[$slide]['width_int'], $elementsArr[$slide]['height_int'], 500, 375); echo '<div id="_currentSlide" style="float:left; padding-right:10px;"><img src="' . $img[0] . '" border="0" width="' . $img[1] . '" height="' . $img[2] . '" /></div>'; $html = ''; // if hotspots exist if (array_key_exists('hotSpot_arr', $elementsArr[$slide])) { $html .= '<div style="padding-top:10px;">Hotspots on this photo:</div>'; foreach ($elementsArr[$slide]['hotSpot_arr'] as $k => $v) { switch ($v['swfPath_str']) { case 'quote.swf': $html .= '<div><img src="images/html_slideshow/chat.png" class="png" border="0" width="16" height="16" style="margin:5px 5px 0px 10px;" />"' . $v['note_str'] . '"</div>'; break; case 'eye_blood_shot.swf': $html .= '<div><img src="images/html_slideshow/bloodshot_eye.png" class="png" border="0" width="16" height="16" style="margin:5px 5px 0px 10px;" />Bloodshot eye</div>'; break; case 'eye.swf': $html .= '<div><img src="images/html_slideshow/eye.png" class="png" border="0" width="16" height="16" style="margin:5px 5px 0px 10px;" />Eye</div>'; break; case 'hair1.swf': $html .= '<div><img src="images/html_slideshow/fro.png" class="png" border="0" width="16" height="16" style="margin:5px 5px 0px 10px;" />Fro hair</div>'; break;