static function site($uri, $protocol = false) { list($controller, $arg1, $args) = explode("/", $uri, 3); if ($controller == "albums" || $controller == "photos") { $uri = ORM::factory("item", $arg1)->relative_path(); } return parent::site($uri, $protocol); }
public static function site($uri = '', $protocol = FALSE) { $url = parent::site($uri, $protocol); if (!request::is_ajax()) { return $url; } return str_replace('bakayarou.kungfudiscomonkey.net', 'b.kf-dm.net', $url); }
static function site($uri, $protocol = false) { if (($pos = strpos($uri, "?")) !== false) { list($uri, $query) = explode("?", $uri, 2); $query = "?{$query}"; } else { $query = ""; } $parts = explode("/", $uri, 3); if ($parts[0] == "albums" || $parts[0] == "photos") { $uri = model_cache::get("item", $parts[1])->relative_path(); } return parent::site($uri . $query, $protocol); }
/** * Just like url::current except that it escapes any XSS in the path. */ static function current($qs = false, $suffix = false) { return htmlspecialchars(parent::current($qs, $suffix)); }
/** ######### Apala required changes ########## settings should come for api, ALL the lines in the function _contruct() */ public function __construct() { parent::__construct(); /* * APALA - Call the core to run the next due processing job */ $coreFolder = dirname(__FILE__) . "/../Core/"; $apiFile = $coreFolder . "ServiceAPI/ChannelProcessingJobServices/RunNextProcessingJob.php"; $postData = array("key" => "swiftriver_apala"); $content = http_build_query($postData, '', '&'); $context = stream_context_create(array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded;', 'content' => $content, 'timeout' => null))); $uri = url_Core::base(); $uri = str_replace("WebApp/", "", $uri); //@fopen($uri."/Core/ServiceAPI/ChannelProcessingJobServices/RunNextProcessingJob.php", 'rb', false, $context); // Load cache $this->cache = new Cache(); // Load Session $this->session = Session::instance(); // Load Header & Footer $this->template->header = new View('header'); $this->template->footer = new View('footer'); //call the feedback form //$this->_get_feedback_form(); // Retrieve Default Settings $site_name = Kohana::config('settings.site_name'); // Prevent Site Name From Breaking up if its too long // by reducing the size of the font if (strlen($site_name) > 20) { $site_name_style = " style=\"font-size:21px;\""; } else { $site_name_style = ""; } $this->template->header->site_name = $site_name; $this->template->header->site_name_style = $site_name_style; $this->template->header->site_tagline = Kohana::config('settings.site_tagline'); $this->template->header->api_url = Kohana::config('settings.api_url'); // Display Contact Tab? $this->template->header->site_contact_page = Kohana::config('settings.site_contact_page'); // Display Help Tab? $this->template->header->site_help_page = Kohana::config('settings.site_help_page'); // Get Custom Pages /** ######### Apala required changes ########## DB Call below. ::factory('page')*/ $this->template->header->pages = ORM::factory('page')->where('page_active', '1')->find_all(); // Get custom CSS file from settings $this->template->header->site_style = Kohana::config('settings.site_style'); // Display News Feed? $this->template->header->allow_feed = Kohana::config('settings.allow_feed'); // Javascript Header $this->template->header->map_enabled = FALSE; $this->template->header->validator_enabled = TRUE; $this->template->header->datepicker_enabled = FALSE; $this->template->header->photoslider_enabled = FALSE; $this->template->header->videoslider_enabled = FALSE; $this->template->header->protochart_enabled = FALSE; $this->template->header->main_page = FALSE; $this->template->header->this_page = ""; // Google Analytics $google_analytics = Kohana::config('settings.google_analytics'); $this->template->footer->google_analytics = $this->_google_analytics($google_analytics); // *** Locales/Languages *** // First Get Available Locales $this->template->header->locales_array = $this->cache->get('locales'); // Locale form submitted? if (isset($_GET['l']) && !empty($_GET['l'])) { $this->session->set('locale', $_GET['l']); } // Has a locale session been set? if ($this->session->get('locale', FALSE)) { // Change current locale Kohana::config_set('locale.language', $_SESSION['locale']); } $this->template->header->l = Kohana::config('locale.language'); //Set up tracking gif if ($_SERVER['SERVER_NAME'] != 'localhost' && $_SERVER['SERVER_NAME'] != '127.0.0.1') { $track_url = $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF']; } else { $track_url = 'null'; } $this->template->footer->tracker_url = 'http://tracker.ushahidi.com/track.php?url=' . urlencode($track_url) . '&lang=' . $this->template->header->l . '&version=' . Kohana::config('version.ushahidi_version'); // Load profiler // $profiler = new Profiler; // Get tracking javascript for stats $this->template->footer->ushahidi_stats = $this->_ushahidi_stats(); }
<?php echo form::open_section('Playback'); ?> <div style="text-align: center;"> <span> <audio src="<?php echo url_Core::file('mediafile/download/' . $mediafile['mediafile_id'] . '/1/' . $mediafile->downloadName(), TRUE); ?> " controls="controls" preload="none"> Your browser does not support HTML5 audio. </audio> </span> </div> <?php echo form::close_section();
public static function site_lang($lang, $uri = '', $protocol = FALSE) { return parent::site($lang . '/' . $uri, $protocol); }
/** * Convert strings to url safe title * * @param mixed * @return string */ public static function title() { $title = func_get_args(); return parent::title(implode(' ', $title)); }