Skip to content

Commit

Permalink
Little improvements to photo helper
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Jun 6, 2014
1 parent 3f6bda0 commit f6240dd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion application/helpers/photo_helper.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
* Shows users photo
* @param string $picture Description
* @param Array $param Array with parameters to be included in the generated img tag (height, width, id, check, nocache, title, class)
* @return string
*/
function showPhoto($picture = NULL, $param = NULL)
{

// usable parameters for photo display
$height = (isset($param['height'])) ? $param['height'] : 100;
$width = (isset($param['width'])) ? $param['width'] : 100;
$id = (isset($param['id'])) ? $param['id'] : FALSE;
$align = (isset($param['align'])) ? $param['align'] : "absmiddle";
$check = (isset($param['check'])) ? $param['check'] : FALSE;
$nocache = (isset($param['nocache'])) ? $param['nocache'] : FALSE; // TRUE = disable caching, add time string to image url
$title = (isset($param['title'])) ? $param['title'] : "User's Photo";
Expand Down

0 comments on commit f6240dd

Please sign in to comment.