Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki_anleitung:2update

Dies ist eine alte Version des Dokuments!


Kurzanleitung für Update

Kopiere alle Dateien aus dem Verzeichnis: /home/www/dokuwiki/lib/tpl/sicherung_conny

ins Verzeichnis: /home/www/dokuwiki/lib/tpl/dokuwiki/images


im Verzeichnis: /home/www/dokuwiki/lib/tpl/dokuwiki/
in der Datei: tpl_footer.php
folgendes entfernen:

 <?php tpl_license(''); // license text ?>
 
    <div class="buttons">
        <?php
            tpl_license('button', true, false, false); // license button, no wrapper
            $target = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : '';
        ?>
        <a href="https://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img
            src="<?php echo tpl_basedir(); ?>images/button-donate.gif" width="80" height="15" alt="Donate" /></a>
        <a href="https://php.net" title="Powered by PHP" <?php echo $target?>><img
            src="<?php echo tpl_basedir(); ?>images/button-php.gif" width="80" height="15" alt="Powered by PHP" /></a>
        <a href="//validator.w3.org/check/referer" title="Valid HTML5" <?php echo $target?>><img
            src="<?php echo tpl_basedir(); ?>images/button-html5.png" width="80" height="15" alt="Valid HTML5" /></a>
        <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img
            src="<?php echo tpl_basedir(); ?>images/button-css.png" width="80" height="15" alt="Valid CSS" /></a>
        <a href="https://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img
            src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15"
            alt="Driven by DokuWiki" /></a>
    </div>

Damit die Grafiken schärfer dargestellt werden, sollte das Resizing abgeschaltet werden.

Dazu die Datei: /inc/media.php
In Zeile: 2067
folgendes einfügen: return $file;

/**
 * Resizes the given image to the given size
 *
 * @author  Andreas Gohr <andi@splitbrain.org>
 *
 * @param string $file filename, path to file
 * @param string $ext  extension
 * @param int    $w    desired width
 * @param int    $h    desired height
 * @return string path to resized or original size if failed
 */
function media_resize_image($file, $ext, $w, $h=0){
    global $conf;
 
    $info = @getimagesize($file); //get original size
    if($info == false) return $file; // that's no image - it's a spaceship!
 
    if(!$h) $h = round(($w * $info[1]) / $info[0]);
    if(!$w) $w = round(($h * $info[0]) / $info[1]);
 
return $file;
    // we wont scale up to infinity
    if($w > 2000 || $h > 2000) return $file;
 
    // resize necessary? - (w,h) = native dimensions
    if(($w == $info[0]) && ($h == $info[1])) return $file;
 
    //cache
    $local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext);
    $mtime = @filemtime($local); // 0 if not exists
 
    if($mtime > filemtime($file) ||
        media_resize_imageIM($ext, $file, $info[0], $info[1], $local, $w, $h) ||
        media_resize_imageGD($ext, $file, $info[0], $info[1], $local, $w, $h)
    ) {
        if($conf['fperm']) @chmod($local, $conf['fperm']);
        return $local;
    }
    //still here? resizing failed
    return $file;
}
Diese Website verwendet nur für den Betrieb notwendige Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer sowie den Datenschutzbestimmungen zu. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
wiki_anleitung (427 views) · Zuletzt geändert: 08/11/2020 14:43 von conny

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki