/** * Ossn view widget * * @param string $name * @param string $title * @return mix data */ function ossn_view_widget($name, $title, $contents) { $theme = new OssnThemes(); $active_theme = $theme->getActive(); $widget['title'] = $title; $widget['contents'] = $contents; return ossn_view("themes/{$active_theme}/widgets/{$name}", $widget); }
/** * Fetch a layout; * * @last edit: $arsalanshah * @Reason: Initial; * * @param string $layout */ function ossn_set_page_layout($layout, $params = array()) { if (!empty($layout)) { $theme = new OssnThemes(); $active_theme = $theme->getActive(); return ossn_plugin_view("theme/page/layout/{$layout}", $params); } }
<?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 */ $theme = input('theme'); $delete = new OssnThemes(); if (strtolower($delete->getActive()) == strtolower($theme)) { ossn_trigger_message(ossn_print('theme:delete:active'), 'error'); redirect(REF); } if ($delete->deletetheme($theme)) { ossn_trigger_message(ossn_print('theme:deleted'), 'success'); redirect(REF); } else { ossn_trigger_message(ossn_print('theme:delete:error'), 'error'); redirect(REF); }
/** * OpenSource-SocialNetwork * * @package (Informatikon.com).ossn * @author OSSN Core Team <*****@*****.**> * @copyright 2014 iNFORMATIKON TECHNOLOGIES * @license General Public Licence http://opensource-socialnetwork.com/licence * @link http://www.opensource-socialnetwork.com/licence */ $OssnThemes = new OssnThemes(); foreach ($OssnThemes->getThemes() as $id) { $Theme = $OssnThemes->getTheme($id); echo "<div class='ossn-components-item'>"; echo "<div class='component-controls'>"; if (ossn_site_settings('theme') == $id) { echo "<a href='#' class='components-button components-button-blue'>" . ossn_print('admin:button:enabled') . "</a>"; } else { $enable = ossn_site_url("action/theme/enable?theme={$id}", true); echo "<a href='{$enable}' class='components-button components-button-green'>" . ossn_print('admin:button:enable') . "</a>"; } if ($OssnThemes->getActive() !== $id) { $delete = ossn_site_url("action/theme/delete?theme={$id}", true); echo "<a href='{$delete}' class='components-button components-button-red'>" . ossn_print('admin:button:delete') . "</a>"; } echo "</div>"; echo "<div class='component-name'>{$Theme->theme_name} {$Theme->theme_version}</div>"; echo "<div class='compontnet-meta'>\n\t \t" . ossn_print('admin:component:author') . ": {$Theme->theme_author}<br />\n\t\t\t\t" . ossn_print('admin:component:website') . ": {$Theme->theme_author_url}\n\t </div>"; echo "<div class='component-description'>{$Theme->theme_description}</div>"; echo '</div>'; }