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 . '" />'; }
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); }