Benutzer-Werkzeuge

Webseiten-Werkzeuge


cloud4education

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
cloud4education [2012/11/04 13:23]
admin [Version 4.5.1]
cloud4education [2012/11/04 18:07] (aktuell)
admin
Zeile 3: Zeile 3:
 ===== Version 4.5.1 ===== ===== Version 4.5.1 =====
  
-<code php templates/​layout.user.php>​+  wget http://​apps.owncloud.com/​CONTENT/​content-files/​151948-rescan_fs.zip => apps/ 
 + 
 +<code php apps/​rescan_fs/​appinfo/​app.php>​ 
 +OCP\App::​addNavigationEntry( array( "​id"​ => "​rescan_fs",​ "​order"​ => 100, "​href"​ => OCP\Util::​linkTo( "​rescan_fs",​ "​index.php"​ ), "​icon"​ => OCP\Util::​imagePath( "​rescan_fs",​ "​loader.gif"​ ), "​name"​ => "​Ordner neu einlesen"​ )); 
 +</​code>​ 
 + 
 +<code php apps/​rescan_fs/​templates/​index.php>​ 
 +<!--[if IE 8]><​style>​input[type="​checkbox"​]{padding:​0;​}table td{position:​static !important;​}</​style><​![endif]-->​ 
 +<div id="​scanning-message">​ 
 +        <​h3>​ 
 +                <?php echo $l->​t('​Ordner werden durchsucht, bitte warten.'​);?>​ <span id='​scan-count'></​span>​ 
 +        </​h3>​ 
 +        <p> 
 +                <?php echo $l->​t('​Durchsuche Ordner...'​);?>​ <span id='​scan-current'></​span>​ 
 +        </​p>​ 
 +</​div>​ 
 +<div id="​scanning-message-end">​ 
 +        <​h3>​ 
 +                <?php echo $l->​t('​Scan abgeschlossen'​);?>​ <span id='​scan-complete'></​span>​ 
 +        </​h3>​ 
 +</​div>​ 
 +</​code>​ 
 + 
 +<code php lib/​user.php>​ 
 +        public static function login( $uid, $password ) { 
 +                $run = true; 
 +                OC_Hook::​emit( "​OC_User",​ "​pre_login",​ array( "​run"​ => &$run, "​uid"​ => $uid )); 
 + 
 +                if( $run ) { 
 +                        $uid = self::​checkPassword( $uid, $password ); 
 +                        $enabled = self::​isEnabled($uid);​ 
 +                        if($uid && $enabled) { 
 +                                session_regenerate_id(true);​ 
 +                                self::​setUserId($uid);​ 
 +                                OC_Hook::​emit( "​OC_User",​ "​post_login",​ array( "​uid"​ => $uid, '​password'​=>​$password )); 
 +                                $_SESSION['​user_password'​]= $password;​ 
 +                                return true; 
 +                        } 
 +                } 
 +                return false; 
 +        } 
 +</​code>​ 
 + 
 +<code php lib/​util.php>​ 
 +/*** server4education ***/ 
 + 
 +        /** 
 +        * Check if home folder is mounted, mount if not 
 +        */ 
 +        public static function checkHomeMounted(){ 
 +                // Check if home folder is mounted 
 +                if (!OC_Filesystem::​is_dir('/​Home'​)) { 
 +                        OC_Filesystem::​mkdir('/​Home'​);​ 
 +                        exec("​sudo /​usr/​local/​bin/​mounthome "​.OC_User::​getUser()."​ "​.$_SESSION['​user_password'​]);​ 
 +                } 
 + 
 +                foreach(self::​getS4eShares() as $share) { 
 +                        if (!OC_Filesystem::​is_dir('/'​.$share)) { 
 +                                OC_Filesystem::​mkdir('/'​.$share);​ 
 +                                exec("​sudo /​usr/​local/​bin/​mountshare "​.OC_User::​getUser()."​ "​.$_SESSION['​user_password'​]."​ "​.$share);​ 
 +                        } 
 +                } 
 +                exec("​logger \""​.OC_User::​getUser()."​ - cloud4education "​.`date +%s`."​\""​);​ 
 +                $_SESSION['​user_password'​] = "";​ 
 +        } 
 + 
 +/*** server4education ***/ 
 + 
 +</​code>​ 
 + 
 +<code php apps/​files/​index.php>​ 
 +// Check if we are a user 
 +OCP\User::​checkLoggedIn();​ 
 +OC_Util::​checkHomeMounted();​ 
 +</​code>​ 
 + 
 +  *Branding 
 +    * core/​img/​logo.svg 
 +    * core/​img/​logo.png 
 +    * core/​img/​favicon.svg 
 +    * core/​img/​favicon.png 
 +    * core/​img/​favicon-touch.svg 
 +    * core/​img/​favicon-touch.png 
 + 
 +<code php core/​templates/​layout.guest.php>​ 
 +<​title>​cloud4education</​title>​ 
 +... 
 +<img src="<?​php echo image_path('',​ '​logo.png'​);​ ?>" alt="​cloud4education"​ style="​width:​ 22em" /> 
 +... 
 +<​footer><​p class="​info"><​a href="​http://​www.cloud4education.at/">​cloud4education</​a>​ &ndash; <?php echo $l->t( 'eine freie Cloud-L&​ouml;​sung f&​uuml;​r Schulen'​ ); ?></​p></​footer>​ 
 +</​code>​ 
 + 
 +<code php core/templates/​layout.user.php>​
 <​title><?​php echo isset($_['​application'​]) && !empty($_['​application'​])?​$_['​application'​].'​ | ':''​ ?>​cloud4education <?php echo OC_User::​getUser()?'​ ('​.OC_User::​getUser().'​) ':''​ ?></​title>​ <​title><?​php echo isset($_['​application'​]) && !empty($_['​application'​])?​$_['​application'​].'​ | ':''​ ?>​cloud4education <?php echo OC_User::​getUser()?'​ ('​.OC_User::​getUser().'​) ':''​ ?></​title>​
 </​code>​ </​code>​
 ===== Version 4.0.1 ===== ===== Version 4.0.1 =====
 +
 +<code php files/​index.php>​
 +// Check if we are a user
 +OC_Util::​checkLoggedIn();​
 +OC_Util::​checkHomeMounted();​
 +</​code>​
  
 <code php lib/​user.php>​ <code php lib/​user.php>​
 +        // server4education shares
 +        private static function getS4eShares() {
 +                $shares = array();
 +                $fp = @fopen("/​srv/​www/​htdocs/"​.OC::​$WEBROOT."/​config/​s4eshares.config",​ "​r"​);​
 +                while($line = fgets($fp, 1024)) {
 +                        $line = trim($line);​
 +                        if($line != ""​)
 +                                $shares[] = $line;
 +                }
 +                fclose($fp);​
 +                return $shares;
 +        }
 +
 +
 +
         /**         /**
          * @brief Kick the user          * @brief Kick the user
Zeile 30: Zeile 143:
  
 <code php lib/​util.php>​ <code php lib/​util.php>​
 +        // server4education shares
 +        private static function getS4eShares() {
 +                $shares = array();
 +                $fp = @fopen("/​srv/​www/​htdocs/"​.OC::​$WEBROOT."/​config/​s4eshares.config",​ "​r"​);​
 +                while($line = fgets($fp, 1024)) {
 +                        $line = trim($line);​
 +                        if($line != ""​)
 +                                $shares[] = $line;
 +                }
 +                fclose($fp);​
 +                return $shares;
 +        }
 +
 +
 +
  
         /**         /**
Zeile 66: Zeile 194:
 /*** server4education ***/ /*** server4education ***/
  
-</​code>​ 
- 
-<code php files/​index.php>​ 
-// Check if we are a user 
-OC_Util::​checkLoggedIn();​ 
-OC_Util::​checkHomeMounted();​ 
 </​code>​ </​code>​
  
Zeile 123: Zeile 245:
   *Branding:   *Branding:
     * core/​img/​owncloud-logo-medium-white.png     * core/​img/​owncloud-logo-medium-white.png
 +    * core/​img/​logo.svg
 +    * core/​img/​logo.png
     * core/​img/​logo-wide.svg     * core/​img/​logo-wide.svg
 +    * core/​img/​logo-wide.png
  
-<code php templates/​layout.user.php>​+<code php core/templates/​layout.user.php>​
 <​title>​cloud4education</​title>​ <​title>​cloud4education</​title>​
 </​code>​ </​code>​
  
-<code php templates/​layout.guest.php>​+<code php core/templates/​layout.guest.php>​
 <​title>​cloud4education</​title>​ <​title>​cloud4education</​title>​
 ... ...
 <​footer><​p class="​info"><​a href="​http://​www.cloud4education.at/">​cloud4education</​a>​ &ndash; <?php echo $l->t( 'eine freie Cloud-L&​ouml;​sung f&​uuml;​r Schulen'​ ); ?></​p></​footer>​ <​footer><​p class="​info"><​a href="​http://​www.cloud4education.at/">​cloud4education</​a>​ &ndash; <?php echo $l->t( 'eine freie Cloud-L&​ouml;​sung f&​uuml;​r Schulen'​ ); ?></​p></​footer>​
 </​code>​ </​code>​
 +
 +<code css core/​templates/​css/​styles.css>​
 +#body-login p.info { width:26em; text-align: center; margin:2em auto; color:#777; text-shadow:#​fff 0 1px 0; }
 +</​code>​
 +
 +<code ini /​etc/​sudoers>​
 +wwwrun ALL = NOPASSWD: /​usr/​local/​bin/​mounthome
 +wwwrun ALL = NOPASSWD: /​usr/​local/​bin/​mountshare
 +wwwrun ALL = NOPASSWD: /bin/umount
 +wwwrun ALL = NOPASSWD: /bin/mount
 +wwwrun ALL = NOPASSWD: /​sbin/​mount.cifs
 +</​code>​
 +
 +  *Passwort und EMail Dialog abschalten:
 +    *settings/​templates/​personal.php
cloud4education.1352031783.txt.gz · Zuletzt geändert: 2012/11/04 13:23 von admin