Ejemplo n.º 1
0
/**
* Init the OhYesChat
*
* @access system
* @return null;
*/
function OhYesChat()
{
    $plugin = elgg_get_plugins_path() . 'OhYesChat/';
    elgg_register_simplecache_view('css/ohyes/ohyeschat');
    $ohyescss = elgg_get_simplecache_url('css', 'ohyes/ohyeschat');
    elgg_register_css('ohyeschat.css', $ohyescss);
    elgg_register_simplecache_view('css/ohyes/ohyeschat.admin');
    $ohyescssadmin = elgg_get_simplecache_url('css', 'ohyes/ohyeschat.admin');
    elgg_register_css('ohyeschat.admin.css', $ohyescssadmin);
    elgg_register_simplecache_view('js/ohyes/ohyescha');
    $ohyesjs = elgg_get_simplecache_url('js', 'ohyes/ohyeschat');
    elgg_register_js('ohyeschat.js', $ohyesjs);
    if (elgg_is_logged_in()) {
        elgg_register_page_handler('ohyeschat', 'ohyeschat_page_handler');
        elgg_register_page_handler('chat', 'ohyeschat_page_handler');
    }
    elgg_register_action('ohyes/chat/deletemssages', "{$plugin}actions/admin/deletemssages.php", 'admin');
    elgg_extend_view('page/elements/foot', 'ohyes/chat/bar');
    elgg_extend_view('page/elements/body', 'ohyes/header/chat', 1);
    elgg_extend_view('page/elements/body', 'ohyes/chat/sound');
    OhYesChat::loadCss();
    OhYesChat::loadJs();
    run_function_once('ohyeschat_setup');
    //register menu items
    OhYesChat::RegisterMenus();
}