/** * Get site url * * @params $extend => Extned site url like http://site.com/my/extended/path * * @return string */ function ossn_site_url($extend = '', $action = false) { global $Ossn; $siteurl = "{$Ossn->url}{$extend}"; if ($action === true) { $siteurl = ossn_add_tokens_to_url($siteurl); } return $siteurl; }
/** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ /** * Ossn Url Display * Displays a URL as a link * * @uses string $params['text'] The string between the <a></a> tags. * @uses string $params['href'] The unencoded url string * @uses bool $params['action'] Is this a link to an action (false) */ if (isset($params['href'])) { $url = $params['href']; } $text = $params['text']; if (isset($params['action']) && $params['action'] == true) { $url = ossn_add_tokens_to_url($url); } unset($params['text']); unset($params['action']); unset($params['href']); $params['href'] = $url; $attributes = ossn_args($params); echo "<a {$attributes}>{$text}</a>";
<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ $enable = new OssnComponents(); $com = input('com'); $cache = ossn_site_settings('cache'); if ($enable->enable($com)) { ossn_trigger_message(ossn_print('com:enabled'), 'success'); if ($cache == false) { redirect(REF); } else { //redirect and flush cache $action = ossn_add_tokens_to_url("action/admin/cache/flush"); redirect($action); } }
<?php /** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ $disable = input('disabled'); if (ossn_site_settings('cache') == true || !empty($disable)) { if (ossn_disable_cache() && empty($disable)) { //flush cache didn't flush the plugins path #460 $action = ossn_add_tokens_to_url("action/admin/cache/flush?disabled=disabled"); redirect($action); } elseif ($disable == 'disabled') { if (ossn_create_cache()) { ossn_trigger_message(ossn_print('cache:flushed')); redirect(REF); } } } ossn_trigger_message(ossn_print('cache:flush:error'), 'error'); redirect(REF);
/** * Open Source Social Network * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://www.opensource-socialnetwork.org/licence * @link http://www.opensource-socialnetwork.org/licence */ $enable = new OssnThemes(); $theme = input('theme'); $cache_flush = input('flush_cache', '', false); $cache = ossn_site_settings('cache'); if (!$cache_flush && $enable->Enable($theme)) { ossn_trigger_message(ossn_print('theme:enabled'), 'success'); if ($cache == false) { redirect(REF); } else { //redirect and flush cache $page = "action/theme/enable?flush_cache=1"; $page = ossn_add_tokens_to_url($page); redirect($page); } } if ($cache_flush) { if (ossn_disable_cache()) { if (ossn_create_cache()) { redirect('administrator/themes'); } } }