Пример #1
0
 public function action_index($photo_id = NULL)
 {
     /*
      * load all of the Caption This photos that haven't expired
      */
     $caption_photos = ORM::factory('captionthisphoto')->where('to', '>=', date('Y-m-d'))->find_all();
     if ($photo_id != NULL) {
         $photo = ORM::factory('photo')->where('id', '=', $photo_id)->find();
         /*
          * try to load the photo provided via the url
          */
         if ($photo->loaded()) {
             /*
              * check to see if from date is before to date
              */
             if (strtotime($_POST['to']) < strtotime($_POST['from'])) {
                 Message::set(Message::ERROR, "From date must be before to date.");
                 Request::instance()->redirect(Helper_Photos::get_photo_url($photo));
                 return;
             }
             /*
              * check to see if form was posted and has both of the dates
              */
             if (!empty($_POST['from']) && !empty($_POST['to'])) {
                 $from_date = date('Y-m-d', strtotime($_POST['from']));
                 $to_date = date('Y-m-d', strtotime($_POST['to']));
                 $check_dates = DB::select('*')->from('caption_this_photos')->where('from', 'BETWEEN', array($from_date, $to_date))->or_where('to', 'BETWEEN', array($from_date, $to_date))->order_by('from', 'ASC')->execute();
                 if ($check_dates->count() > 0) {
                     Message::set(Message::ERROR, "There is already a Caption This photo in the period you selected.");
                 } else {
                     $caption_this_photo = ORM::factory('captionthisphoto');
                     $caption_this_photo->from = date("Y-m-d", strtotime($_POST['from']));
                     $caption_this_photo->to = date("Y-m-d", strtotime($_POST['to']));
                     $caption_this_photo->photo_id = $photo_id;
                     $caption_this_photo->save();
                     /*
                      * if the photo was saved, show a success message
                      */
                     if ($caption_this_photo->saved()) {
                         Message::set(Message::SUCCESS, "Photo successfully set as Caption This photo from " . $_POST['from'] . " to " . $_POST['to'] . ".");
                         Request::instance()->redirect('admin/backtalk');
                     } else {
                         Message::set(Message::ERROR, "A problem occured while trying to set photo as Caption This photo.");
                     }
                 }
             } else {
                 Message::set(Message::ERROR, "You must select the date range for Caption This photo.");
             }
         } else {
             Message::set(Message::ERROR, "This photo doesn't exist.");
         }
     }
     $this->template->content = View::factory('admin/photos/caption');
     $this->template->content->set(array('caption_photos' => $caption_photos));
     $this->template->styles = array('public/js/vendor/datepicker/jquery-ui-1.8.5.custom.css' => 'screen');
     $this->template->scripts = array('public/js/vendor/jquery-ui-1.8.5.custom.min.js');
     $this->template->sidebar = Widget::factory()->add(Helper_Default::admin_sidebar());
 }
Пример #2
0
 public function action_index()
 {
     if ($user = Arr::get($_GET, 'user') or $user = Arr::get($_GET, 'user_id')) {
         $user_id = $user;
     }
     $gallery_detail = ORM::factory('photo')->where('moderation_status_id', '=', '2')->where('user_id', '=', $user)->with('category')->with('user')->find_all();
     $json = array();
     foreach ($gallery_detail as $key => $photo) {
         $json[] = array('category' => html::anchor('categories/' . $photo->category->id, $photo->category->name), 'share' => html::anchor('#', 'Share this photo'), 'current' => $key + 1, 'total' => $gallery_detail->count(), 'photo' => html::image(Helper_Photos::get($photo, 'medium')), 'display_name' => html::anchor('profile/' . $photo->user->username, $photo->user->display_name), 'name' => $photo->name, 'caption' => $photo->caption, 'tags' => Helper_Tags::print_tags($photo->tags->find_all()));
     }
     $this->resource = $json;
 }
Пример #3
0
 /**
  * View the homepage.
  *
  * @return void
  * @author Merrick Christensen
  */
 public function action_index()
 {
     $this->template->title = 'Share Your Photos - National Geographic Kids My Shot Community';
     $this->template->scripts = array('public/js/vendor/jquery.jcarousel.js', 'public/js/categories/slideshow.js', 'public/js/home/home.js');
     $awards = array();
     $badges = array();
     $events = ORM::factory('game_EventLog')->where('event_id', '=', Helper_Game::getSite()->getEvent(Model_Game_Site::HONOR_GIVEN))->order_by('time_stamp', 'DESC')->limit($this->sampleSize)->find_all();
     foreach ($events as $event) {
         $eventUser = ORM::factory('user', $event->user->user_id);
         if ($eventUser->id) {
             if ($event->data->type == "game_Badge") {
                 $obj = new stdClass();
                 $obj->data = $event->data;
                 $obj->honor = ORM::factory($event->data->type, $event->data->honor_id);
                 $obj->user = ORM::factory('user', $event->user->user_id);
                 $badges[] = $obj;
             }
         }
         if (count($badges) >= $this->maxBadges) {
             break;
         }
     }
     if (count($awards) < $this->maxAwards) {
         $aevents = ORM::factory('game_EventLog')->where('event_id', '=', Helper_Game::getSite()->getEvent(Helper_Game::AWARD_GIVEN)->id)->order_by('time_stamp', 'DESC')->limit($this->sampleSize)->find_all();
         foreach ($aevents as $event) {
             $obj = new stdClass();
             $obj->data = $event->data;
             $obj->honor = ORM::factory($event->data->type, $event->data->honor_id);
             $obj->user = ORM::factory('user', $event->user->user_id);
             $obj->photo = ORM::factory('photo', $event->item->item_id);
             $awards[] = $obj;
             if (count($awards) >= $this->maxAwards) {
                 break;
             }
         }
     }
     $honors = array_merge($awards, $badges);
     if (count($honors) == 0) {
         $honors = false;
     }
     $slider = Model_DLSliderGroup::getCurrentSlider();
     if ($slider) {
         $this->template->top = View::factory("home/slider");
         $this->template->top->slider = $slider;
     }
     $this->template->content = View::factory('home/index');
     $this->template->content->set(array('user' => $this->user, 'recently_added' => Reel_More::factory(ORM::factory('photo')->order_by('created', 'desc')), 'top_rated' => Reel_More::factory(Helper_Photos::get_top_rated()), 'honors' => $honors, 'potd' => Model_DailyPhoto::todaysPhoto(), 'homeSpot' => Model_Homespot::getCurrent()));
     $this->template->sidebar = Widget::factory()->add(Helper_Default::sidebar());
 }
Пример #4
0
 /**
  * Send comment to moderation.
  *
  * @param string $comment_id
  * @return void
  * @author Brent Allen
  */
 public function action_moderate($comment_id)
 {
     $comment_id = filter_var($comment_id, FILTER_SANITIZE_NUMBER_INT);
     $comment = ORM::factory("comment", $comment_id);
     if ($comment->loaded()) {
         if ($comment->isFlaggable()) {
             $comment->moderation_status_id = Model_Comment::REVIEW_STATUS;
         }
         $comment->save();
         Message::set(Message::SUCCESS, 'You have successfully passed this message on to moderation.');
         $this->request->redirect(Helper_Photos::get_photo_url($comment->photo));
     } else {
         Message::set(Message::ERROR, "Could not find the message indicated.");
         $this->request->redirect("/");
     }
 }
Пример #5
0
 protected function formatPhoto($ar, Model_Photo $photo)
 {
     $tags = array();
     foreach ($photo->tags->find_all() as $tag) {
         $tags[] = $tag->name;
     }
     $ar['tags'] = $tags;
     $ar['author'] = $photo->user->display_name;
     $ar['permalink'] = Kohana::config("myshot.siteURL") . Helper_Photos::get_photo_url($photo);
     foreach ($ar as $name => &$item) {
         if ($name == 'thumbnail' || $name == 'small' || $name == 'medium' || $name == 'large' || $name == 'original') {
             $item = Kohana::config("myshot.cdn") . $item;
         }
         switch ($name) {
             case 'name':
                 $ar['title'] = $item;
                 unset($ar['name']);
                 break;
             case 'caption':
                 $ar['description'] = $item;
                 unset($ar['caption']);
                 break;
             case 'created':
                 $ar['date_uploaded'] = date('Y-m-d\\TH:i:s', strtotime($item));
                 unset($ar['created']);
                 break;
             case 'category_id':
                 $ar['category'] = ORM::factory("category", $item)->name;
                 unset($ar['category_id']);
                 break;
             case 'title':
             case 'description':
             case 'date_uploaded':
                 break;
             default:
                 break;
         }
     }
     $ar['image_url'] = $ar['medium'];
     unset($ar['moderation_status_id']);
     unset($ar['user_id']);
     unset($ar['order']);
     unset($ar['view_count']);
     return $ar;
 }
Пример #6
0
			
		</div>
	</div><br />
    <h2>Past Back Talk Photos</h2>
	<div class="thumb_container">
		<div class="previous_container">
			<div><a href="#">Previous</a></div>
		</div>
		<div id="carousel">
    
		<ul class="thumbs">
        
			<?php 
foreach ($past_caption_this_photos as $prev_caption_this_photo) {
    $prev_photo = ORM::factory('photo')->where('id', '=', $prev_caption_this_photo->photo_id)->find();
    echo new Element("li", HTML::anchor("backtalk/photo/{$prev_caption_this_photo->id}", html::image(Helper_Photos::get($prev_photo, 'thumbnail'), array('alt' => $prev_photo->name))));
}
?>
		</ul>
		</div>
		<div class="next_container">
			<a href="#">Next</a>
		</div>
	</div>
	
	<div class="comments" id="jump-comments">
      
		<?php 
if ($caption_count = $captions->count()) {
    ?>
			<h2>Back Talk for this photo</h2>
Пример #7
0
	</div>
	<div class="activity_right">
		<div class="activity_title"><span class="user"><?php 
echo html::anchor(Helper_Account::get_public_account_url($user), $user->display_name);
?>
</span> 
		favorited <span class="user"><?php 
echo html::anchor(Helper_Photos::get_photo_url($photo), $photo->user->display_name . "'s");
?>
</span> photo</div>
		<div class="photo_container">
			<div class="thumb_container">
				<div class="thumb">
					<?php 
echo HTML::image(Helper_Photos::get($photo, 'small'), array('alt' => $photo->name));
?>
				</div>
				<div class="frame"><?php 
echo html::anchor(Helper_Photos::get_photo_url($photo), $photo->name);
?>
</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="timestamp"><?php 
echo Helper_Game::displayTime(strtotime($activity->time_stamp));
?>
</div>
	</div>
	<div class="clear"></div>
</div>
Пример #8
0
 public function action_preview($id)
 {
     $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
     $homeSpot = ORM::factory("homespot", $id);
     if (!$homeSpot->loaded()) {
         Message::set(Message::ERROR, "Sorry, that could not be found.");
         $this->request->redirect("admin/home/create");
         return;
     }
     $this->template->title = 'Share Your Photos - National Geographic Kids My Shot Community';
     $this->template->scripts = array('public/js/vendor/jquery.jcarousel.js', 'public/js/categories/slideshow.js', 'public/js/home/home.js');
     $awards = array();
     $badges = array();
     $events = ORM::factory('game_EventLog')->where('event_id', '=', Helper_Game::getSite()->getEvent(Model_Game_Site::HONOR_GIVEN))->order_by('time_stamp', 'DESC')->limit($this->sampleSize)->find_all();
     foreach ($events as $event) {
         $eventUser = ORM::factory('user', $event->user->user_id);
         if ($eventUser->id) {
             if ($event->data->type == "game_Badge") {
                 $obj = new stdClass();
                 $obj->data = $event->data;
                 $obj->honor = ORM::factory($event->data->type, $event->data->honor_id);
                 $obj->user = ORM::factory('user', $event->user->user_id);
                 $badges[] = $obj;
             }
         }
         if (count($badges) >= $this->maxBadges) {
             break;
         }
     }
     if (count($awards) < $this->maxAwards) {
         $aevents = ORM::factory('game_EventLog')->where('event_id', '=', Helper_Game::getSite()->getEvent(Helper_Game::AWARD_GIVEN)->id)->order_by('time_stamp', 'DESC')->limit($this->sampleSize)->find_all();
         foreach ($aevents as $event) {
             $obj = new stdClass();
             $obj->data = $event->data;
             $obj->honor = ORM::factory($event->data->type, $event->data->honor_id);
             $obj->user = ORM::factory('user', $event->user->user_id);
             $obj->photo = ORM::factory('photo', $event->item->item_id);
             $awards[] = $obj;
             if (count($awards) >= $this->maxAwards) {
                 break;
             }
         }
     }
     $honors = array_merge($awards, $badges);
     if (count($honors) == 0) {
         $honors = false;
     }
     $slider = Model_DLSliderGroup::getCurrentSlider();
     if ($slider) {
         $this->template->top = View::factory("home/slider");
         $this->template->top->slider = $slider;
     }
     $this->template->content = View::factory('home/index');
     $this->template->content->set(array('user' => $this->user, 'recently_added' => Reel_More::factory(ORM::factory('photo')->order_by('created', 'desc')), 'top_rated' => Reel_More::factory(Helper_Photos::get_top_rated()), 'honors' => $honors, 'potd' => Model_DailyPhoto::todaysPhoto(), 'homeSpot' => $homeSpot, 'homeSpotEditLink' => HTML::anchor("admin/home/edit/{$homeSpot->id}", "Edit")));
     $this->template->sidebar = Widget::factory()->add(Helper_Default::sidebar());
 }
Пример #9
0
<div class="activity">
	<div class="activity_left">
		<div class="avatar_thumb_container">
			<div class="activity_thumb">
				<?php 
$avatarImg = html::image(Helper_Account::get_avatar($user, "thumb"));
echo html::anchor(Helper_Account::get_public_account_url($user), $avatarImg);
?>
			</div>
		</div>
	</div>
	<div class="activity_right">
		<div class="activity_title"><span class="user"><?php 
echo html::anchor(Helper_Account::get_public_account_url($user), $user->display_name);
?>
</span>
			left a comment on <span class="user"><?php 
echo html::anchor(Helper_Photos::get_photo_url($photo), $photo->user->display_name . "'s");
?>
</span> photo</div>
		<div class="activity_comment"><?php 
echo $comment->comment;
?>
</div>
		<div class="timestamp"><?php 
echo Helper_Game::displayTime(strtotime($activity->time_stamp));
?>
</div>
	</div>
	<div class="clear"></div>
</div>
Пример #10
0
				<div class="thumb"><?php 
    echo html::image(Helper_Photos::get($photo, 'medium'), array('alt' => $photo->name));
    ?>
</div>
				<div class="frame"><?php 
    echo html::anchor(Helper_Photos::get_photo_url($photo), $photo->name);
    ?>
</div>
			</div>
			<h2><?php 
    echo html::anchor(Helper_Photos::get_photo_url($photo), $photo->name);
    ?>
</h2>
			<p><?php 
    echo date('F d, Y', strtotime($photo->created));
    ?>
<br />
			<?php 
    echo Helper_Photos::get_comment_link($photo);
    ?>
<br />
			<?php 
    echo Helper_Photos::get_rating_stars($photo);
    ?>
			</p>
		</div>
	<?php 
}
?>
<div class="pagination pagi_bottom"></div>
</div>
Пример #11
0
	
	<?php 
}
?>
	<h2>Photos</h2>
	<div class="thumb_container">
		<div class="previous_container">
			<div><a href="#">Previous</a></div>
		</div>
		<div id="carousel">
		<ul class="thumbs">
			<?php 
foreach ($user_photos as $sub_photo) {
    ?>
				<li><?php 
    echo html::anchor(Helper_Photos::get_photo_url($sub_photo), html::image(Helper_Photos::get($sub_photo, 'thumbnail'), array('alt' => $sub_photo->name)));
    ?>
</li>
			<?php 
}
?>
		</ul>
		</div>
		<div class="next_container">
			<a href="#">Next</a>
		</div>
	</div>
	<div class="rating">
		<?php 
echo form::open('ratings/on/' . $photo->id, array('class' => 'rating_form'));
?>
Пример #12
0
	</div> <!-- END photo_container -->
	<div class="photo_info">

	</div>
</div><br />

<h2>My Slideshows</h2>
<div class="thumb_container">
	<div class="previous_container">
		<div><a href="#">Previous</a></div>
	</div>
	<div id="carousel">
		<ul class="thumbs">
			<?php 
foreach ($user->slideshows->where("complete", "=", 1)->find_all() as $slShow) {
    ?>
				<li><?php 
    echo html::anchor($slShow->getLink(), html::image(Helper_Photos::get($slShow->getOrderedPhotos()[0], 'thumbnail'), array('alt' => $slShow->id)));
    ?>
 ?></li>
			<?php 
}
?>
		</ul>
	</div>
	<div class="next_container">
		<a href="#">Next</a>
	</div>
</div>

</div> <!-- END detail_container -->
Пример #13
0
<div class="detail_container">
	<div class="photo_container">
		<div class="photo">
			<div class="inner">
				<div class="photo_img">
					<?php 
echo html::image(Helper_Photos::get($photo, 'medium'));
?>
				</div>
			</div>
		</div>
	</div> <!-- END photo_container -->
	<div class="submit_container">
        <?php 
if (Helper_Account::is_admin()) {
    $photo_mail_options = Helper_SendEmail::get_photo_options();
    ?>
            
                    <?php 
    echo form::open('admin/photos/send_email/' . $photo->user_id, array('method' => 'post'));
    ?>
                    <div class="title">
                      <p><strong>Email User: </strong><?php 
    echo form::checkbox('send_email' . $photo->id, 'send_email' . $photo->id, false, array("id" => "send_email" . $photo->id, "class" => "send_email_option"));
    ?>
 <label for="<?php 
    echo 'send_email' . $photo->id;
    ?>
">Yes</label></p>                                     
                    </div>
                    <div id="email_options">
Пример #14
0
 public static function get_previous_link($photo, array $order_array, $link = TRUE)
 {
     if (in_array($photo->id, $order_array)) {
         Helper_Arr::set_pointer($photo->id, $order_array);
         if (!prev($order_array)) {
             end($order_array);
         }
         $prev = current($order_array);
     }
     if ($link === TRUE) {
         $previous_photo = ORM::factory('photo')->find($prev);
         $ret = html::anchor(Helper_Photos::get_photo_url($previous_photo), 'Previous', array('class' => 'previous'));
     } else {
         $ret = ORM::factory('photo')->find($prev);
     }
     return $ret;
 }
Пример #15
0
<?php

if (!empty($watcher) && $watcher->user->loaded()) {
    ?>
<div id="photographer-to-watch">
    <h2>PHOTOGRAPHER TO WATCH</h2>
    <div class="photographer" style="background-image: url('<?php 
    echo addcslashes(Helper_Photos::get($photo, "medium"), "'");
    ?>
')">
        <?php 
    echo HTML::anchor(Helper_Account::get_public_account_url($watcher->user), $watcher->user->display_name, array("class" => "invisi-link"));
    ?>
        <div class="details-container">
            <?php 
    echo HTML::image(Helper_Account::get_avatar($watcher->user, "thumbnail"));
    echo new Element("p", HTML::anchor(Helper_Account::get_public_account_url($watcher->user), $watcher->user->display_name));
    echo new Element("p", "{$numPhotos} photos posted");
    ?>
        </div>
    </div>
    <p><a href="/photos/watch" class="see-all-photographers-link">Past Photographers to Watch</a></p>
</div>
<?php 
}
Пример #16
0
echo $pages;
?>
</div>
<div id="photo_container">
	<?php 
if ($photos->as_array()) {
    foreach ($photos as $key => $photo) {
        ?>
		<div class="photo<?php 
        echo $photo->lock->loaded() ? ' lock' : '';
        echo ($key + 1) % 2 == 0 ? ' last' : '';
        ?>
">
			<div class="thumb_container">
                <div class="thumb" style="background-image: url('<?php 
        echo addcslashes(Helper_Photos::get($photo, 'medium'), "'");
        ?>
') "></div>
				<div class="frame"><?php 
        echo html::anchor('admin/photos/view/' . $photo->id, $photo->name);
        ?>
</div>
        		<?php 
        if (Helper_Flag::item_flagged($photo->id, 'photo')) {
            ?>
                  <div class='flag'></div>
                <?php 
        }
        ?>
			</div>
            <div class="details-container">
Пример #17
0
<?php

echo new Element("div", "", array("class" => "photo-selected", "data-id" => $photo->id, "style" => "background-image: url('" . addcslashes(Helper_Photos::get($photo, "small"), "'") . "')"));
Пример #18
0
 public function action_top()
 {
     $this->template->title = 'Top Rated Photos - National Geographic Kids My Shot';
     $this->template->content->set(array('name' => 'Top Rated', 'reel' => Reel::factory(Helper_Photos::get_top_rated(100))));
 }
Пример #19
0
<div id="form_container">
	<?php 
echo form::open('photos/edit/' . $photo->id);
?>
		<div class="main_top"></div>
		<div class="inner_wrapper">
			<div class="title edit_photo">
				<div class="photo_trim">
					<div class="inner">
						<div class="photo_img">
							<?php 
echo HTML::image(Helper_Photos::get($photo, 'medium', TRUE));
?>
						</div>
					</div>
				</div>
			</div> <!-- END: title -->
			<div class="title_bottom"></div>
			<div class="box">
				<div class="box_top"></div>
				<div class="box_inner">
					<table>
						<tr>
							<td class="step"><?php 
echo HTML::image('public/images/layout/icon-one.png');
?>
</td>
							<td class="text">
								<div class="clear">
									<h2>Name your photo:</h2>
									<div class="counter"></div>
Пример #20
0
?>
</p>
                <p>Username: <?php 
echo Helper_Account::get_account_username($photo->user);
?>
</p>
                <p>Age: <?php 
echo Helper_Account::get_account_age($photo->user);
?>
</p>
                <p>E-Mail: <?php 
echo Helper_Account::get_account_email($photo->user);
?>
</p> 
                <p><?php 
echo Helper_Photos::get_original_photo_dimensions($photo);
?>
</p>
			</div>
			<div class="controls">
				<p><?php 
echo date('F d, Y', strtotime($photo->created));
?>
</p>
			</div>
		</div>
	</div> <!-- END photo_container -->
	<div class="photo_info">
		<h2><?php 
echo $photo->name;
?>
Пример #21
0
		<?php 
echo $pages;
?>
	</div>
	<?php 
if ($avatars->as_array()) {
    foreach ($avatars as $key => $avatar) {
        ?>
		<div class="avatar photo<?php 
        echo $avatar->avatarlock->loaded() ? ' lock' : '';
        echo ($key + 1) % 3 == 0 ? ' last' : '';
        ?>
">
			<div class="thumb_container">
				<div class="avatar_thumb"><?php 
        echo HTML::image(Helper_Photos::get($avatar, 'medium', TRUE));
        ?>
</div>
				<div class="frame"><?php 
        echo html::anchor('admin/avatars/view/' . $avatar->id, $avatar->user->display_name);
        ?>
</div>
                <?php 
        if (Helper_Flag::item_flagged($avatar->id, 'avatar')) {
            ?>
                  <div class='flag'></div>
                <?php 
        }
        ?>
			</div>
			<div class="details-container">
Пример #22
0
<?php

$photoURL = html::anchor(Kohana::config('myshot.siteURL') . Helper_Photos::get_photo_url($photo), Kohana::config('myshot.siteURL') . Helper_Photos::get_photo_url($photo));
$userURL = html::anchor(Kohana::config('myshot.siteURL') . Helper_Account::get_public_account_url($user), Kohana::config('myshot.siteURL') . Helper_Account::get_public_account_url($user));
?>
NG Staff, <br />
A user has removed one of their photos. Please note that viewing the photo is no longer possible.
<br /><br />
User name: <?php 
echo $user->username;
?>
<br />
Display name: <?php 
echo $user->display_name;
?>
<br />
User Profile: <?php 
echo $userURL;
?>
<br />
Photo Title: <?php 
echo $photo->name;
?>
<br />
Created: <?php 
echo $photo->created;
?>
<br />
Original Link* : <?php 
echo $photoURL;
?>
Пример #23
0
 private function setupGame($photo_id)
 {
     $photo = ORM::factory("photo", $photo_id);
     $this->auto_render = false;
     $this->template = View::factory("templates/ajax_layout");
     $this->template->content = View::factory("photos/puzzle");
     $this->template->content->photo = Helper_Photos::get($photo, 'medium');
     $this->template->content->music = "/public/swf/spoonful_of_ginger_a.mp3";
     $this->template->content->credit = $photo->user->display_name;
 }
Пример #24
0
		"width":141
	});
</script>
<?php 
if ($featured_photos->count() > 0) {
    ?>
<div class="slider_wrapper">
	<ul id="slider" class="images" style="width: 1272px;">
	<?php 
    foreach ($featured_photos as $photo) {
        ?>
	<li>
		<div class="photo_container">
		<div class="photo">
			<div class="inner"><?php 
        echo HTML::image(Helper_Photos::get($photo, 'large'), array('alt' => $photo->name));
        ?>
</div>
		</div>
	 	<div class="frame"><?php 
        echo html::anchor('photos/view/' . $photo->id, $photo->name);
        ?>
</div>
		<div class="info">
			<h1>Top Rated <?php 
        echo $category->name;
        ?>
 Photos</h1>
			<div class="fadeText">
				<h2><?php 
        echo $photo->user->display_name;
Пример #25
0
<div id="edit-potd">
	<?php 
echo HTML::image(Helper_Photos::get($potd->photo, 'medium'));
?>
	<div>
		<div class="content">
			<?php 
echo form::open('admin/potd/update/' . $potd->id, array('method' => 'post'));
echo form::label("day", "Day: ");
echo form::input("day", date("m/d/Y", strtotime($potd->day)), array("id" => "day", "name" => "day"));
echo form::submit("submit_dates", "Update", array('class' => 'ptw-submit'));
echo form::close();
?>

		</div>
	</div>
</div>
Пример #26
0
echo html::anchor("profile/", HTML::image('public/images/layout/button-back-canvas.jpg'));
?>
	  	<div id='rotate'>
            <h2>Rotate image</h2>
		  	<?php 
echo HTML::anchor('/canvas/photos/rotate/-90/' . $photo->id, 'rotate counterclockwise', array("class" => "rotate_counterclockwise"));
?>
      		<?php 
echo HTML::anchor('/canvas/photos/rotate/90/' . $photo->id, 'rotate clockwise', array("class" => "rotate_clockwise"));
?>
		</div>
	  </div>
  </div>
  <div class="canvas_container_inner">
  	<h2>Click and drag on the image to select an area.</h2><br />
  	<div class="crop_frame_lrg">
  		<?php 
echo HTML::image(Helper_Photos::get($photo, 'large', TRUE) . "?t=" . time(), array('id' => 'photo'));
?>
  	</div>
  </div>
</div>

<input type="hidden" name="x1" value="-" id="x1">
<input type="hidden" name="y1" value="-" id="y1">
<input type="hidden" name="x2" value="-" id="x2">
<input type="hidden" name="y2" value="-" id="y2">
<input type="hidden" name="w" value="-" id="w">
<input type="hidden" name="h" value="-" id="h">
<?php 
echo form::close();
Пример #27
0
	</div>

	<div id="photo_container">
		<?php 
$i = 0;
foreach ($photographersToWatch as $photographer) {
    ++$i;
    ?>
			<div class="photographer-to-watch <?php 
    if ($i % 2 == 0) {
        echo 'last';
    }
    ?>
">
				<div class="photographer" style="background-image: url('<?php 
    echo addcslashes(Helper_Photos::get($photographer->photos->find(), "medium"), "'");
    ?>
')">
					<a href="/profile/<?php 
    echo $photographer->getVanity();
    ?>
" class="invisi-link"><?php 
    echo $photographer->display_name;
    ?>
</a>
					<div class="details-container">
						<?php 
    echo HTML::image(Helper_Account::get_avatar($photographer, "thumbnail"));
    echo new Element("p", HTML::anchor(Helper_Account::get_public_account_url($photographer), $photographer->display_name));
    echo new Element("p", $photographer->photos->count_all() . " photos posted");
    ?>
Пример #28
0
 public function upload_all($photo)
 {
     $basePath = Kohana::config('myshot.basePath');
     $finalPath = $photo->creationYear() . "/" . $photo->creationMonth() . "/";
     Library_Akamai::factory()->addToDir($basePath . $photo->thumbnail, $photo->creationYear(), $photo->creationMonth())->addToDir($basePath . $photo->small, $photo->creationYear(), $photo->creationMonth())->addToDir($basePath . $photo->medium, $photo->creationYear(), $photo->creationMonth())->addToDir($basePath . $photo->large, $photo->creationYear(), $photo->creationMonth())->addToDir($basePath . $photo->original, $photo->creationYear(), $photo->creationMonth());
     //delete photos off of this server
     Helper_Photos::deleteAllLocal($photo);
     //update locations in database
     if (strpos($photo->thumbnail, $finalPath) === false) {
         $photo->thumbnail = $finalPath . $photo->thumbnail;
         $photo->small = $finalPath . $photo->small;
         $photo->medium = $finalPath . $photo->medium;
         $photo->large = $finalPath . $photo->large;
         $photo->original = $finalPath . $photo->original;
         $photo->save();
     }
 }
Пример #29
0
<div class="more"><?php 
    echo html::anchor('trophies', 'See All Trophies');
    ?>
</div>
Trophy Case</div>
<div id="trophy_container">
    <div class="previous_container">
        <a href="#">Previous</a>
    </div>
    <div id="trophy_carousel">
        <ul class="thumbs">
            <?php 
    foreach ($honors as $honor) {
        ?>
            <li><?php 
        $honor->honor->type == "award" ? Helper_Game::outputHonorImageWithToolTip($honor->honor, Helper_Game::IMAGE_105, Helper_Photos::get_photo_url($honor->photo)) : Helper_Game::outputHonorImageWithToolTip($honor->honor, Helper_Game::IMAGE_105, Helper_Account::get_public_account_url($honor->user));
        ?>
</li>
            <?php 
    }
    ?>
        </ul>

    </div>
    <div class="next_container">
        <a href="#">Next</a>
    </div>
</div>
<?php 
}
if ($homeSpot) {
Пример #30
0
<div id="num1" class="number">
	<img src="/public/images/layout/step-1.png" alt="step 1">
</div>
<div id="builder-photos-title" class="straight_title green long number-text">Choose Your Photos
	<div class="pagination">
		<p class="paginator"></p>
	</div>
</div>
<div id="builder-photos">
	<?php 
foreach ($user->viewablePhotos()->order_by("created", "DESC")->find_all() as $photo) {
    $photoDiv = new Element("div", new Element("div", "", array("class" => "overlay")), array("class" => "photo-option", "data-id" => $photo->id, "style" => "background-image: url('" . Helper_Photos::get($photo, "small") . "')"));
    if ($slideshow->has("photos", $photo)) {
        $photoDiv->attributes->class = "photo-option selected";
    }
    echo $photoDiv;
}
?>
</div>
<div id="num2" class="number">
	<img src="/public/images/layout/step-2.png" alt="step 2">
</div>
<h1 class="straight_title blue long number-text">Arrange Your Photos</h1>
<div id="builder-selected">
	<?php 
//echo Request::factory("slideshow/active")->execute();
?>
</div>