<?php /** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $albums = new OssnAlbums(); $photos = $albums->GetUserProfilePhotos($params['user']->guid); echo '<div class="ossn-photos">'; echo '<h2>' . ossn_print('profile:photos') . '</h2>'; if ($photos) { foreach ($photos as $photo) { $imagefile = str_replace('profile/photo/', '', $photo->value); $image = ossn_site_url() . "album/getphoto/{$params['user']->guid}/{$imagefile}?size=larger&type=1"; $view_url = ossn_site_url() . 'photos/user/view/' . $photo->guid; echo "<li><a href='{$view_url}'><img src='{$image}' class='pthumb'/></a></li>"; } } echo '</div>';
<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ echo '<div class="ossn-photos">'; $albums = new OssnAlbums(); $photos = $albums->GetAlbums($params['user']->guid); $albums->count = true; $count = $albums->GetAlbums($params['user']->guid); $profiel_photo = ossn_site_url("avatar/{$params['user']->username}/larger"); $pphotos_album = ossn_site_url("album/profile/{$params['user']->guid}"); $profile_covers_url = ossn_site_url("album/covers/profile/{$params['user']->guid}"); $profile_cover = ossn_site_url("cover/{$params['user']->username}/1"); //show profile pictures album echo "<li>\n\t<a href='{$pphotos_album}'><img src='{$profiel_photo}' class='pthumb' />\n\t <div class='ossn-album-name'>" . ossn_print('profile:photos') . "</div></a>\n\t</li>"; //show profile cover photos echo "<li>\n\t<a href='{$profile_covers_url}'><img src='{$profile_cover}' class='pthumb' />\n\t <div class='ossn-album-name'>" . ossn_print('profile:covers') . "</div></a>\n\t</li>"; if ($photos) { foreach ($photos as $photo) { if (ossn_access_validate($photo->access, $photo->owner_guid)) { $images = new OssnPhotos(); $image = $images->GetPhotos($photo->guid); if (isset($image->{0}->value)) { $image = str_replace('album/photos/', '', $image->{0}->value);
<?php /** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $albums = new OssnAlbums(); $photos = $albums->GetUserCoverPhotos($params['user']->guid); echo '<div class="ossn-photos">'; echo '<h2>' . ossn_print('profile:covers') . '</h2>'; if ($photos) { foreach ($photos as $photo) { $imagefile = str_replace('profile/cover/', '', $photo->value); $image = ossn_site_url() . "album/getcover/{$params['user']->guid}/{$imagefile}?type=1"; $view_url = ossn_site_url() . 'photos/cover/view/' . $photo->guid; echo "<li><a href='{$view_url}'><img src='{$image}' class='pthumb'/></a></li>"; } } echo '</div>';
<?php /** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $album = new OssnAlbums(); $image = $params['entity']; $name = $album->GetAlbum($image->owner_guid)->album->title; $img = str_replace('album/photos/', '', $image->value); ?> <div class="ossn-photo-view"> <h2> <?php echo $name; ?> </h2> <a href="<?php echo ossn_site_url("album/view/{$image->owner_guid}"); ?> "> <?php echo ossn_print('back:to:album'); ?> </a> <br/> <table border="0" class="ossn-photo-viewer"> <tr>
<?php /** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $add = new OssnAlbums(); if ($add->CreateAlbum(ossn_loggedin_user()->guid, input('title'), input('privacy'))) { redirect(REF); } else { redirect(REF); }
<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ $guid = input('guid'); $album = new OssnAlbums(); if ($album->deleteAlbum($guid)) { ossn_trigger_message(ossn_print('photo:album:deleted')); redirect(); } else { ossn_trigger_message(ossn_print('photo:album:delete:error'), 'error'); redirect(REF); }
/** * Viatges "handler" * @pages: * view, * add * * * @return diferent contents */ function trip_page_handler($trip) { $page = $trip[0]; if (empty($page)) { ossn_error_page(); //Mostra 404 } // var_dump($trip); switch ($page) { //Vista viatge (Accés públic no existeix restricció de visualització) case 'view': $view = new OptionTrips(); $viewAlbum = new OssnAlbums(); $album = $viewAlbum->GetAlbum(19); //Agafa id del viatge $infoTrip = $view->GetTrip($trip[1]); //Agafa id del viatge $infoDays = $view->GetTripDays($trip[1]); // var_dump($image); //$photo['entity'] = $image; $trip['info'] = $infoTrip; $trip['day'] = $infoDays; $trip['album'] = $album; //redirect user to home page if trip is empty if (empty($infoTrip)) { redirect(); } //Missing "back" button to trips $owner = ossn_user_by_guid($infoTrip->guid); $back = array('text' => ossn_print('back'), 'href' => ossn_site_url("u/{$owner->username}/trips"), 'class' => 'button-grey'); $control = ossn_plugin_view('output/url', $back); $contents = array('title' => ossn_print('trip:details'), 'content' => ossn_plugin_view('trips/pages/trip/view', $trip), 'controls' => $control, 'module_width' => '850px'); //inclou page layout $module['content'] = ossn_set_page_layout('module', $contents); //Inclou modul amb els botons d'accions $content = ossn_set_page_layout('contents', $module); echo ossn_view_page($title, $content); break; //Afegir viatge //Afegir viatge case 'add': //Missing "back" button to trips $owner = ossn_loggedin_user()->username; // var_dump($owner); $back = array('text' => ossn_print('back'), 'href' => ossn_site_url("u/{$owner}/trips"), 'class' => 'button-grey'); $control = ossn_plugin_view('output/url', $back); $contents = array('title' => ossn_print('add:trip'), 'content' => ossn_plugin_view('trips/pages/trip/add'), 'controls' => $control, 'module_width' => '850px'); //inclou page layout $module['content'] = ossn_set_page_layout('module', $contents); //Inclou modul amb els botons d'accions $content = ossn_set_page_layout('contents', $module); echo ossn_view_page($title, $content); // echo ossn_plugin_view('output/url', array( // 'title' => ossn_print('add:trip'), // 'contents' => ossn_plugin_view('trips/pages/trip/add'), // 'callback' => '#ossn-trip-submit' // )); break; case 'addPhoto': //add photos (ajax) if (!ossn_is_xhr()) { ossn_error_page(); } echo ossn_plugin_view('output/ossnbox', array('title' => ossn_print('add:photos'), 'contents' => ossn_plugin_view('trips/pages/trip/addPhoto'), 'callback' => '#photos-submit')); break; default: ossn_error_page(); //Mostra 404 break; } }
<?php /** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $albums = new OssnAlbums(); $photos = $albums->GetAlbum($params['album']); echo '<div class="ossn-photos">'; echo '<h2>' . $photos->album->title . '</h2>'; if ($photos->photos) { foreach ($photos->photos as $photo) { $image = str_replace('album/photos/', '', $photo->value); $image = ossn_site_url() . "album/getphoto/{$params['album']}/{$image}?size=album"; $view_url = ossn_site_url() . 'photos/view/' . $photo->guid; echo "<li><a href='{$view_url}'><img src='{$image}' class='pthumb'/></a></li>"; } } echo '</div>';