Krug-Markus.de

Themes Update von Nuke Evo 1.0.2 GER01 nach Nuke Evo 2.1.0

Themes Update von Nuke Evo 1.0.2 GER01 nach Nuke Evo 2.1.0

Aktualisierung der theme.php

Diese Änderungen erst ab Version 2.1.0 durchführen, denn das Theme ist dann nicht mehr abwärtskompatibel !!

Folgende Änderungen müssen in der theme.php durchgeführt werden:

Öffne root/themes/dein_Theme/theme.php

Finde:

if (stristr(htmlentities($_SERVER['PHP_SELF']), "theme.php")) {
    Header("Location: ../../index.php");
    exit;
}

Ersetze mit:

if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
    exit('Access Denied');
}

Finde:
Dies ist der erste Schritt um dein Theme ATO kompatibel zu machen.

$theme_name = basename(dirname(__FILE__));
/*****[ANFANG]*****************************************
 EVO-German - ReOrGaNiSaTiOn(at)evo-german(dot)com
 ******************************************************/
 if (file_exists(NUKE_THEMES_DIR.$theme_name.'/lang_'.$lang.'/theme_info.php')) {
    include_once(NUKE_THEMES_DIR.$theme_name.'/lang_'.$lang.'/theme_info.php');
} else {
    include_once(NUKE_THEMES_DIR.$theme_name.'/lang_german/theme_info.php');
}
/*****[ENDE]*******************************************
  EVO-German - ReOrGaNiSaTiOn(at)evo-german(dot)com
 ******************************************************/

Ersetze mit:

$theme_name = basename(dirname(__FILE__));
global $currentlang, $board_config;

/*****[BEGIN]******************************************
 [ Base:    Theme Management                   v1.0.2 ]
 ******************************************************/
if (@file_exists(NUKE_THEMES_DIR.$theme_name.'/lang_'.$currentlang.'/theme_info.php')) {
    include_once(NUKE_THEMES_DIR.$theme_name.'/lang_'.$currentlang.'/theme_info.php');
} elseif (@file_exists(NUKE_THEMES_DIR.$theme_name.'/lang_'.$board_config['default_lang'].'/theme_info.php')) {
    include_once(NUKE_THEMES_DIR.$theme_name.'/lang_'.$board_config['default_lang'].'/theme_info.php');
} else {
    include_once(NUKE_THEMES_DIR.$theme_name.'/theme_info.php');
}

/*****[END]********************************************
 [ Base:    Theme Management                   v1.0.2 ]
 ******************************************************/

Finde (Farbcode natürlich abhängig von deinem Theme) :
Dies ist der zweite Schritt um dein Theme ATO kompatibel zu machen, d.h., wenn dein Theme bereits ATO kompatibel ist, brauchst du diesen nächsten Schritt nicht zu machen. WICHTIG !! >> Bevor du diese Änderung machst, mache dir eine Kopie von deinem original Abschnitt weil du die Farbcodes für die theme_info.php Dateien aus >> http://www.evo-themes.de/modules.php?name=Forums&file=viewtopic&p=833#833 diesem Abschnitt] << benötigst !!

/************************************************************/
/* Theme Colors Definition                                  */
/*                                                          */
/* Define colors for your web site. $bgcolor2 is generaly   */
/* used for the tables border as you can see on OpenTable() */
/* function, $bgcolor1 is for the table background and the  */
/* other two bgcolor variables follows the same criteria.   */
/* $texcolor1 and 2 are for tables internal texts           */
/************************************************************/

$bgcolor1         = "#f7f7f7";
$bgcolor2         = "#B0BEC6";
$bgcolor3         = "#BBC1CE";
$bgcolor4         = "#58647A";
$textcolor1         = "#003366";
$textcolor2         = "#000000";

Ersetze mit:

/************************************************************/
/* Theme Colors Definition                                  */
/************************************************************/
$bgcolor1 = $ThemeInfo['bgcolor1'];
$bgcolor2 = $ThemeInfo['bgcolor2'];
$bgcolor3 = $ThemeInfo['bgcolor3'];
$bgcolor4 = $ThemeInfo['bgcolor4'];
$textcolor1 = $ThemeInfo['textcolor1'];
$textcolor2 = $ThemeInfo['textcolor2'];
$gfxcolor = "#00aa50";

Finde:

/************************************************************/
/* FormatStory                                              */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant) {
    global $anonymous;
    if (!empty($notes)) {
        $notes = "<br /><br /><b>"._NOTE."</b> <i>$notes</i>n";
    } else {
        $notes = "";
    }
    if ($aid == $informant) {
        echo "<span class="content" color="#505050">$thetext$notes</span>n";
    } else {
        if(defined('WRITES')) {
            if(!empty($informant)) {
                if(is_array($informant)) {
                    $boxstuff = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant[0]">$informant[1]</a> ";
                } else {
                    $boxstuff = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant">$informant</a> ";
                }
            } else {
                $boxstuff = "$anonymous ";
            }
            $boxstuff .= ""._WRITES." <i>"$thetext"</i>$notesn";
        } else {
            $boxstuff .= "$thetext$notesn";
        }

        echo "<span class="content" color="#505050">$boxstuff</span>n";
    }
}

Ersetze mit oder Füge hinzu:

/************************************************************/
/* Function FormatStory()                                   */
/************************************************************/
function FormatStory($thetext, $notes, $aid, $informant, $informantwrites) {
    if (!empty($notes)) {
        $notes = "<br /><br /><strong>"._NOTE."</strong> <i>$notes</i>n";
    } else {
        $notes = '';
    }
    if ($aid == $informant) {
        echo "<span class="content" color="#505050">$thetext$notes</span>n";
    } else {
        if($informantwrites == 0) {
            if(!empty($informant)) {
                if(is_array($informant)) {
                    $boxstuff = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant[0]">$informant[1]</a> ";
                } else {
                    $boxstuff = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant">$informant</a> ";
                }
            } else {
                $boxstuff = _ANONYMOUS;
            }
            $boxstuff .= _WRITES." <i>"$thetext"</i>$notesn";
        } else {
            $boxstuff .= "$thetext$notesn";
        }

        echo "<span class="content" color="#505050">$boxstuff</span>n";
    }
}

Finde:

if(!defined('NO_LEFT_BLOCKS'))

Ersetze mit:

if(blocks_visible('left'))

Finde:

if (!defined("NO_RIGHT_BLOCKS") && !defined("ADMIN_FILE"))

Ersetze mit:

if (blocks_visible('right') && !defined('ADMIN_FILE'))

Finde:

/************************************************************/
/* Function themeindex()                                    */
/* This function format the stories on the Homepage         */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
    global $anonymous, $tipath, $theme_name;

    $ThemeSel = get_theme();
    if(!empty($topicimage)) {
        if (file_exists("themes/$ThemeSel/images/topics/$topicimage")) {
            $t_image = "themes/$ThemeSel/images/topics/$topicimage";
        } else {
            $t_image = "$tipath$topicimage";
        }
        $topic_img = "<a href="modules.php?name=News&new_topic=".$topic.""><img src="".$t_image."" border="0" title="$topictext" alt="$topictext" align="right" hspace="5" vspace="5" /></a>";
        } else {
        $topic_img = "";
    }
    if (!empty($notes)) {
        $notes = "<br /><br /><b>"._NOTE."</b> $notesn";
    } else {
        $notes = "";
    }
    $content = '';
    if ($aid == $informant) {
        $content = "$thetext$notesn";
    } else {
        if(defined('WRITES')) {
            if(!empty($informant)) {
                if(is_array($informant)) {
                    $content = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant[0]">$informant[1]</a> ";
                } else {
                    $content = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant">$informant</a> ";
                }
            } else {
                $content = "$anonymous ";
            }
            $content .= _WRITES." "$thetext"$notesn";
        } else {
            $content .= "$thetext$notesn";
        }
    }
/*****[ANFANG]*****************************************
EVO-German - Quickfix - chrisy
Geschrieben von geändert in Freigegeben von
******************************************************/
    $posted = ""._APPROVEDBY." ";
/*****[ENDE]*******************************************
EVO-German - Quickfix - chrisy
******************************************************/
    $posted .= get_author($aid);
    $posted .= " "._ON." $time  ($counter "._READS.")";
    $datetime = substr($morelink, 0, strpos($morelink, "|") - strlen($morelink));
    $morelink = substr($morelink, strlen($datetime) + 2);
}

Ersetze mit:

/************************************************************/
/* Function themeindex()                                    */
/* This function format the stories on the Homepage         */
/************************************************************/
function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext, $informantwrites) {
 global $theme_name;

 if(!empty($topicimage)) {
 $t_image = @evo_image(@basename($topicimage), 'Topics');
 $topic_img = "<a href="modules.php?name=News&amp;new_topic=".$topic.""><img src="".$t_image."" border="0" alt="$topictext" title="$topictext" align="right" hspace="5" vspace="5"/></a>";
 }
 if (!empty($notes)) {
 $notes = "<br /><br /><strong>"._NOTE."</strong> $notesn";
 } else {
 $notes = '';
 }
 $content = '';
 if ($aid == $informant) {
 $content = "$thetext$notesn";
 } else {
 if($informantwrites == 0) {
 if(!empty($informant)) {
 if(is_array($informant)) {
 $content = "<a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant[0]">$informant[1]</a> ";
 } else {
 $content = "<a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant">$informant</a> ";
 }
 } else {
 $content = _ANONYMOUS;
 }
 $content .= _WRITES." "$thetext"$notesn";
 } else {
 $content .= "$thetext$notesn";
 }
 }
 $posted = _APPROVEDBY." ";
 $posted .= get_author($aid);
 $posted .= " "._ON." $time  ";

Finde:

/************************************************************/
/* Function themearticle()                                   */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext,  $informantwrites) {
 global $theme_name;

 if(!empty($topicimage)) {
 $t_image = @evo_image(@basename($topicimage), 'Topics');
 $topic_img = "<a href="modules.php?name=News&amp;new_topic=".$topic.""><img src="".$t_image."" border="0" alt="$topictext" title="$topictext" align="right" hspace="5" vspace="5"/></a>";
 }
 $posted = _POSTEDON." $datetime "._BY." ";
 $posted .= get_author($aid);
 if (!empty($notes)) {
 $notes = "<br /><br /><strong>"._NOTE."</strong>&nbsp;<i>$notes</i>n";
 } else {
 $notes = '';
 }
 $content = '';
 if ($aid == $informant) {
 $content = "$thetext$notesn";
 } else {
 if($informantwrites == 0) {
 if(!empty($informant)) {
 if(is_array($informant)) {
 $content = "<a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant[0]">$informant[1]</a> ";
 } else {
 $content = "<a href="modules.php?name=Your_Account&amp;op=userinfo&amp;username=$informant">$informant</a> ";
 }
 } else {
 $content = _ANONYMOUS;
 }
 $content .= _WRITES." <i>"$thetext"</i>$notesn";
 } else {
 $content .= "$thetext$notesn";
 }
 }

Ersetze mit:

/************************************************************/
/* Function themearticle()                                  */
/************************************************************/
function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext,  $informantwrites) {
    global $admin, $sid, $theme_name;

    if(!empty($topicimage)) {
        if (@file_exists(NUKE_THEMES_DIR . $theme_name .'/'.$topicimage)) {
            $t_image = NUKE_THEMES_IMAGE_DIR . $theme_name .'/'.$topicimage;
        } else {
            $t_image = $topicimage;
        }
        $topic_img = "<a href="modules.php?name=News&new_topic=".$topic.""><img src="".$t_image."" border="0" title="$topictext" alt="$topictext" align="right" hspace="5" vspace="5" /></a>";
        } else {
        $topic_img = '';
    }
    $posted = _POSTEDON." $datetime "._BY." ";
    $posted .= get_author($aid);
    if (!empty($notes)) {
        $notes = "<br /><br /><strong>"._NOTE."</strong> <i>$notes</i>n";
    } else {
        $notes = '';
    }
    $content = '';
    if ($aid == $informant) {
        $content = "$thetext$notesn";
    } else {
        if($informantwrites == 0) {
            if(!empty($informant)) {
                if(is_array($informant)) {
                    $content = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant[0]">$informant[1]</a> ";
                } else {
                    $content = "<a href="modules.php?name=Your_Account&op=userinfo&username=$informant">$informant</a> ";
                }
            } else {
                $content = _ANONYMOUS;
            }
            $content .= _WRITES." <i>"$thetext"</i>$notesn";
        } else {
            $content .= "$thetext$notesn";
        }
    }

Fertig mit der theme.php !! 🙂

weiter auf der nächsten Seite

Schreibe einen Kommentar