Ejemplo n.º 1
0
 public static function makeThumb($dir, $file, $x = '')
 {
     $e = String::split('.', $file);
     $ext = $e[count($e) - 1];
     unset($e[count($e) - 1]);
     $f = String::unsplit('.', $e);
     return '<img src="' . URL . '/uploads/' . String::trim($dir, '/') . '/' . $f . '' . $x . '.' . $ext . '" />';
 }
Ejemplo n.º 2
0
 public static function urlWithoutSegment($segment, $url = null)
 {
     $segments = String::segments($url ? $url : self::$_vars['querystring']);
     if (($key = array_search($segment, $segments)) !== false) {
         unset($segments[$key]);
     }
     return '/' . String::unsplit('/', $segments);
 }