]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frost/theme.php
Update remaining "dir.friendi.ca" instances
[friendica.git] / view / theme / frost / theme.php
index 868a840dee0ed93a6f774f7074fb34bffa66f742..b09153876d67c09285609c27910d02ea35e33e24 100644 (file)
@@ -9,24 +9,27 @@
  * Maintainer: Zach P <techcity@f.shmuz.in>
  */
 
-function frost_init(&$a) {
-       $a->theme_info = array();
+use Friendica\App;
+
+function frost_init(App $a) {
        $a->videowidth = 400;
        $a->videoheight = 330;
        $a->theme_thread_allow = false;
        set_template_engine($a, 'smarty3');
 }
 
-function frost_content_loaded(&$a) {
+function frost_content_loaded(App $a) {
 
        // I could do this in style.php, but by having the CSS in a file the browser will cache it,
        // making pages load faster
        if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
-               //$a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']);
-               $a->theme['stylesheet'] = $a->get_baseurl() . '/view/theme/frost/login-style.css';
+               //$a->page['htmlhead'] = str_replace('$stylesheet', App::get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']);
+               $a->theme['stylesheet'] = App::get_baseurl() . '/view/theme/frost/login-style.css';
        }
-       if( $a->module === 'login' )
+
+       if ( $a->module === 'login' ) {
                $a->page['end'] .= '<script type="text/javascript"> $(document).ready(function() { $("#id_" + window.loginName).focus();} );</script>';
+       }
 
 }
 
@@ -42,7 +45,7 @@ function frost_uninstall() {
        logger("uninstalled theme frost");
 }
 
-function frost_item_photo_links(&$a, &$body_info) {
+function frost_item_photo_links(App $a, &$body_info) {
        require_once('include/Photo.php');
        $phototypes = Photo::supportedTypes();
 
@@ -67,7 +70,7 @@ function frost_item_photo_links(&$a, &$body_info) {
                        $body_info['html'] = str_replace($link, $newlink, $body_info['html']);
 
                }
-               
+
                $p = bb_find_open_close($body_info['html'], "<a", ">", $occurence);
        }
 }