Hallo, Gast! (Registrieren)

Wir wünschen allen Besuchern frohe Ostern!

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Global zickt
#1
Hi ich benutze seit längerem ein Wetter script auf meiner Portal Seite...

Der Wetter Script bezieht die eingegebene plz aus der Global.php.

Ich wollte eben eine weitere plz hinzufügen auf einmal ging das ganze Forum nicht mehr...

Ich habe den Script jetzt raus genommen dann geht es.

Kann mir jemand helfen oder sagen woran das liegen könnte?
Fehler meldung...
PHP-Code:
/** * MyBB 1.2 * Copyright © 2006 MyBB Group, All Rights Reserved * * 
Website: http://www.mybboard.net * License: 
http://www.mybboard.net/eula.html * *
 $Id: global.php 3596 2008-01-20 08:27:39Z Tikitiki $ *
/ // Load main MyBB core file which begins all of the magic 
require_once "./inc/init.php"; $shutdown_queries = array(); 
// Read the usergroups cache as well as the moderators 
cache $groupscache = $cache->read("usergroups"); $mcache = $cache->read("moderators"); 
// If the groups cache doesn't exist, update it and re-read it if(!is_array($groupscache)) 
{ $cache->updateusergroups(); $groupscache = $cache->read("usergroups"); } 
// Read forum permissions cache $fpermissioncache = $cache->read("forumpermissions"); 
// Send page headers send_page_headers(); // Do not use session system for defined pages if
((@isset($mybb->input['action']) && @isset($nosession[$mybb->input['action']])) || 
(@isset($mybb->input['thumbnail']) && strstr($_SERVER["PHP_SELF"], 'attachment.php'))) 
{ define("NO_ONLINE", 1); } // Create session for this user require_once 
MYBB_ROOT."inc/class_session.php"; $session = new session; $session->init(); 
// Set our POST validation code here $mybb->post_code = generate_post_check(); 
// Set and load the language if(!isset($mybb->settings['bblanguage'])) { $mybb->settings['bblanguage'] = "english"; } 
// Load language $lang->set_language($mybb->settings['bblanguage']); $lang->load("global"); $lang->load("messages"); 
// Run global_start plugin hook now that the basics are set up $plugins->run_hooks("global_start"); if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset'])) { @mb_internal_encoding($lang->settings['charset']); }
 // Which thread mode is our user using? if(!isset($mybb->input['mode'])) { if(isset($mybb->user['threadmode'])) 
{ $mybb->input['mode'] = $mybb->user['threadmode']; } else if($mybb->settings['threadusenetstyle'] == "yes") 
{ $mybb->input['mode'] = "threaded"; } else { $mybb->input['mode'] = "linear"; } } 
// Select the board theme to use. $loadstyle = ''; $load_from_forum = 0; $style = array(); $valid = array
( "showthread.php", "forumdisplay.php", "newthread.php", "newreply.php", "ratethread.php", "editpost.php", "polls.php", "sendthread.php", "printthread.php", "moderation.php" ); // This user has a custom theme set in their profile if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0) { $loadstyle = "tid='".$mybb->user['style']."'"; } if(in_array(strtolower(basename($_SERVER['PHP_SELF'])), $valid)) { 
// If we're accessing a post, fetch the forum theme for it and if we're overriding it if(isset($mybb->input['pid'])) 
{ $query = $db->simple_select(TABLE_PREFIX."forums f,
 ".TABLE_PREFIX."posts p", "f.style, f.overridestyle", "f.fid=p.fid AND p.pid='".intval($mybb->input['pid'])."'",
 array('limit' => 1)); $style = $db->fetch_array($query); $load_from_forum = 1; } 
// We have a thread id and a forum id, we can easily fetch the theme for this forum else if(isset($mybb->input['tid'])) 
{ $query = $db->simple_select(TABLE_PREFIX."forums f, ".TABLE_PREFIX."threads t", "f.style, 
f.overridestyle", "f.fid=t.fid AND t.tid='".intval($mybb->input['tid'])."'", array('limit' => 1)); 
$style = $db->fetch_array($query); $load_from_forum = 1; } 
// We have a forum id - simply load the theme from it else if(isset($mybb->input['fid'])) { $query = $db->simple_select(TABLE_PREFIX."forums", "style, overridestyle", "fid='".intval($mybb->input['fid'])."'", 
array('limit' => 1)); $style = $db->fetch_array($query); $load_from_forum = 1; } } // From all of the above, 
a theme was found if(isset($style['style']) && $style['style'] > 0) { // This theme is forced upon the user, 
overriding their selection if($style['overridestyle'] == "yes" || !isset($mybb->user['style'])) { $loadstyle = "tid='".intval($style['style'])."'"; } } // After all of that no theme? Load the board default if(empty($loadstyle)) 
{ $loadstyle = "def='1'"; } // Fetch the theme to load from the database $query = $db->simple_select
(TABLE_PREFIX."themes", "name, tid, themebits, csscached", $loadstyle, array('limit' => 1)); 
$theme = $db->fetch_array($query); // No theme was found - we attempt to load the master or
 any other theme if(!$theme['tid']) { // Missing theme was from a forum, run a query to set any 
forums using the theme to the default if($load_from_forum == 1)
 { $db->update_query(TABLE_PREFIX."forums", array("style" => 0), "style='{$style['style']}'"); }
 // Missing theme was from a user, run a query to set any users using the theme to the default else if
($load_from_user == 1) { $db->update_query(TABLE_PREFIX."users", array("style" => 0), "style='{$style['style']}'"); } 
// Attempt to load the master or any other theme if the master is not available $query = $db->simple_select(TABLE_PREFIX."themes", "name, tid, themebits, csscached", "", array
("order_by" => "tid", "limit" => 1)); $theme = $db->fetch_array($query); } $theme = @array_merge($theme, unserialize($theme['themebits'])); // Loading CSS from a file or from the server? if($theme['csscached'] > 0 && $mybb->settings['cssmedium'] == 'file') { $theme['css_url'] = $mybb->settings['bburl']."/css/theme_{$theme['tid']}.css"; } else { $theme['css_url'] = $mybb->settings['bburl']."/css.php?theme={$theme['tid']}"; } 
// If a language directory for the current language exists within the theme - 
we use it if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else { // Check if a custom language directory exists for this theme if(is_dir($theme['imgdir'].'/'.$mybb->settings['bblanguage'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } } // Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\/|\.\.|\.|([a-z0-9]+)://)#i", $theme['logo'])) { $theme['logo'] = $mybb->settings['bburl']."/".$theme['logo']; } // Load Main Templates and Cached Templates if(isset($templatelist)) { $templatelist .= ','; } $templatelist .= "css,headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_
member,header_welcomeblock_guest,header_welcomeblock_member_admin"; $templatelist .= ",nav,nav_sep,nav_bit,nav_sep_active,
nav_bit_active,global_unreadreports"; $templates->cache($db->escape_string($templatelist)); 
// Set the current date and time now $datenow = my_date($mybb->settings['dateformat'], time(), '', false); $timenow = my_date($mybb->settings['timeformat'], time()); $lang->welcome_current_time = 
sprintf($lang->welcome_current_time, $datenow.', '.$timenow); // Format the last visit date of this user appropriately if(isset($mybb->user['lastvisit'])) { $lastvisit = my_date($mybb->settings
['dateformat'], $mybb->user['lastvisit']) . ', ' . my_date($mybb->settings['timeformat'], $mybb->user['lastvisit']); } 
// Otherwise, they've never visited before else { $lastvisit = $lang->lastvisit_never; } 
// If the board is closed and we have an Administrator, show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] == "yes") { eval("\$bbclosedwarning = \"".$templates->get("global_boardclosed_warning")."\";"); } // Prepare the main templates for use unset($admincplink); 
// Load appropriate welcome block for the current logged in user if($mybb->user['uid'] != 0) { 
// User can access the admin cp and we're not hiding admin cp links, fetch it if($mybb->usergroup['cancp'] == "yes" && $mybb->config['hide_admin_links'] != 1) { eval("\$admincplink = \"".$templates->get("header_welcomeblock_member_admin")."\";"); }
 // Format the welcome back message $lang->welcome_back = sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit); // Tell the user their PM usage $lang->welcome_pms_usage = sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_new']), my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total'])); eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_member")."\";");
 } // Otherwise, we have a guest else { eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";"); } $unreadreports = ''; // This user is a moderator, super moderator or administrator if($mybb->usergroup['cancp'] == "yes" 
|| $mybb->usergroup['issupermod'] == "yes" || $mybb->user['usergroup'] == 6) { 
// Read the reported posts cache $reported = $cache->read("reportedposts"); 
// 0 or more reported posts currently exist if($reported['unread'] > 0) { if($reported['unread'] == 1) 
{ $lang->unread_reports = $lang->unread_report; } else { $lang->unread_reports = sprintf(
$lang->unread_reports, $reported['unread']); } eval("\$unreadreports = \"".$templates->get("global_unreadreports")."\";"); } } 
// Got a character set? if($lang->settings['charset']) { $charset = $lang->settings['charset']; } 
// If not, revert to UTF-8 else { $charset = "UTF-8"; } // Is this user apart of a banned group? $bannedwarning = ''; if($mybb->usergroup['isbannedgroup'] == "yes") { // Fetch details on their ban $query = $db->simple_select(TABLE_PREFIX."banned", "*", "uid='{$mybb->user['uid']}'", array('limit' => 1)); 
$ban = $db->fetch_array($query); if($ban['uid']) { // Format their ban lift date and reason appropriately if($ban['lifted'] > 0) { $banlift = my_date($mybb->settings['dateformat'], $ban['lifted']) . ", " . my_date
($mybb->settings['timeformat'], $ban['lifted']); } else { $banlift = $lang->banned_lifted_never; } $reason = htmlspecialchars_uni($ban['reason']); } if(empty($reason)) { $reason = $lang->unknown; } if(empty($banlift)) 
{ $banlift = $lang->unknown; } if($ban['uid']) { // Display a nice warning to the user } eval("\$bannedwarning = \"".$templates->get("global_bannedwarning")."\";"); } $lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading); 
// Set up some of the default templates eval("\$headerinclude = \"".$templates->get("headerinclude")."\";"); eval("
\$gobutton = \"".$templates->get("gobutton")."\";"); eval("\$htmldoctype = \"".$templates->get("htmldoctype", 1, 0)."\";"); eval("\$header = \"".$templates->get("header")."\";"); $copy_year = my_date("Y", time()); 
// Are we showing version numbers in the footer? if($mybb->settings['showvernum'] == "on") { $mybbversion = $mybb->version; } 
else { $mybbversion = ''; } eval("\$footer = \"".$templates->get("footer")."\";"); 
// Add our main parts to the navigation $navbits = array(); $navbits[0]['name'] = $mybb->settings['bbname']; $navbits[0]['url'] =
 $mybb->settings['bburl']."/index.php"; // Set the link to the archive. $archive_url = $mybb->settings['bburl']."
/archive/index.php"; // Check banned ip addresses if(is_banned_ip($session->ipaddress)) { $db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'"); error($lang->error_banned); } // If the board is closed, the user is not an administrator and they're 
not trying to login, show the board closed message if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != 
"yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout"))) { // Show error $lang->error_boardclosed .= "

    {$mybb->settings['boardclosed_reason']}

"; error($lang->error_boardclosed); exit; } // Load Limiting if(($load = get_server_load()) && $load != $lang->unknown) { 
// User is not an administrator and the load limit is higher than the limit, show an error if(($mybb->usergroup['cancp']
 != "yes" && $load > $mybb->settings['load'] && $mybb->settings['load'] > 0)) { error($lang->error_loadlimit); } } 
// If there is a valid referrer in the URL, cookie it if(!$mybb->user['uid'] && $mybb->settings['usereferrals'] == "yes" && (isset($mybb->input['referrer']) || isset($mybb->input['referrername']))) { if(isset($mybb->input['referrername'])) { $condition = "username='".$db->escape_string($mybb->input['referrername'])."'"; } else { $condition = "uid='".intval($mybb->input['referrer'])."'"; }
 $query = $db->simple_select(TABLE_PREFIX."users", "uid", $condition, array('limit' => 1)); $referrer = $db->fetch_array($query); if($referrer['uid']) { my_setcookie("mybb[referrer]", $referrer['uid']); } } // Check pages allowable even when not allowed to view
 board $allowable_actions = array( "member.php" => array( "register", "do_register", "login", "do_login", "logout", "lostpw",
 "do_lostpw", "activate", "resendactivation", "do_resendactivation", "resetpassword" ), ); if($mybb->usergroup['canview']
 != "yes" && !(strtolower(basename($_SERVER['PHP_SELF'])) == "member.php" && in_array($mybb->input['action'], 
$allowable_actions['member.php'])) && strtolower(basename($_SERVER['PHP_SELF'])) != "captcha.php") { error_no_permission(); } 
// work out which items the user has collapsed $colcookie = $_COOKIE['collapsed']; // set up collapsable items 
(to automatically show them us expanded) if($_COOKIE['collapsed']) { $col = explode("|", $colcookie); if(!is_array($col)) 
{ $col[0] = $colcookie; // only one item } unset($collapsed); foreach($col as $key => $val) { $ex = $val."_e"; $co = $val."_c";
 $collapsed[$co] = "display: show;"; $collapsed[$ex] = "display: none;"; $collapsedimg[$val] = "_collapsed"; } } 
// Randomly expire threads if($rand > 8 || isset($mybb->input['force_thread_expiry'])) { 
$db->delete_query(TABLE_PREFIX."threads", "deletetime != '0' AND deletetime < '".time()."'"); } 
// Randomly clear out old guest sessions (older than 24 hours) if($rand > 4 && $rand < 8)
 { $timecut = time()-60*60*24; $db->delete_query(TABLE_PREFIX."sessions", "uid=0 AND time<='$timecut'"); } 
// Run hooks for end of global.php $plugins->run_hooks("global_end"); $globaltime = $maintimer->gettime(); ?>

Warning: require_once(MYBB_ROOTinc/functions_post.php) [function.require-once]: failed to open stream: No such file or directory in /users/phoenix-jonglage/www/forum/portal.php on line 37

Fatal error: require_once() [function.require]: Failed opening required 'MYBB_ROOTinc/functions_post.php' (include_path='.:/etc/php/lib') in /users/phoenix-jonglage/www/forum/portal.php on line 37 
Mein code in der global.php datei direckt hinter <?php eingefügt
PHP-Code:
session_start();
if(!isset(
$_SESSION['stadt']))
$_SESSION['stadt'] = '';
$staedte = array('plz1','plz2','und','so','weiter');
$stadt $staedte[array_rand($staedte)];
while(
$stadt == $_SESSION['stadt'])
$stadt $staedte[array_rand($staedte)];
$_SESSION['stadt'] = $stadt;
?>
Achtung
 nehmen Sie diese Beiträge nicht ernst! Das MyBB wissen beruht auf
(letzter Stand: MyBB 1.2.8)
Zitieren
#2
Kannst du bitte deinen Beitrag bearbeiten und den Code strukturierter posten? So kann man ja gar nichts erkennen.

Gruß,
Michael
[Bild: banner.png]
Support erfolgt NUR im Forum!
Bitte gelöste Themen als "erledigt" markieren.
Beiträge mit mangelhafter Rechtschreibung/Grammatik werden kommentarlos gelöscht.
Zitieren
#3
Ich habe da jetzt einfach Enters rein gehauen :S

Hoffe das ist so ok :S

Das war die Fehler meldung, die mir auf der Seite angezeigt wurde, wenn ich auf das Forum bin.
Achtung
 nehmen Sie diese Beiträge nicht ernst! Das MyBB wissen beruht auf
(letzter Stand: MyBB 1.2.8)
Zitieren
#4
Wenn man bei der Meldung auf die letzten beiden Zeilen schaut, sagt das Script, dass er eine Datei nicht finden konnte.

Schau mal in der portal.php in die Zeile 37, da wurde wahrscheinlich der Pfad falsch angegeben. So muss es aussehen:
PHP-Code:
require_once(MYBB_ROOT."inc/functions_post.php"); 
Was ist der Unterschied zwischen der Politik und der Informatik?
In der Informatik ignoriert man führende Nullen...
Zitieren
#5
Hab es mal versucht aber daran liegt es Leider nicht...

Ich verstehe nicht warum es von heut auf morgen nicht mehr geht Sad
Achtung
 nehmen Sie diese Beiträge nicht ernst! Das MyBB wissen beruht auf
(letzter Stand: MyBB 1.2.8)
Zitieren
#6
Hallo wWs,

wie lautet die Einbauanleitung des Wetterscripts?
Bitte stelle deine global.php mal als Anhang zur Verfügung.

Mfg Garlant
Ich gebe keinen Support per Messenger oder PN!
Zitieren
#7
Das Orginal von Donnerwetter:
PHP-Code:
<script type="text/javascript" language="javascript" src="http://www.donnerwetter.de/wetter/net/boxregio.mv?typ=1&plz=63067&
color_bg=FFFF66&color_hi=FFCC00&color_txt=&width="
></script>
<
noscript>JavaScript ist deaktiviert leider sehen Sie hier kein 
aktuelles Wetter
. <a href="http://www.donnerwetter.de" target="_blank">www.Donnerwetter.de</a></noscript

Meine global.php
PHP-Code:
<?php
session_start
();
if(!isset(
$_SESSION['stadt']))
$_SESSION['stadt'] = '';
$staedte = array('63067','71032','03042','93426','14548','28201','01309','55543','61352','53721');
$stadt $staedte[array_rand($staedte)];
while(
$stadt == $_SESSION['stadt'])
$stadt $staedte[array_rand($staedte)];
$_SESSION['stadt'] = $stadt;
?>
/**
 * MyBB 1.2
 * Copyright Â© 2006 MyBB Group, All Rights Reserved
 *
 * Website: http://www.mybboard.net
 * License: http://www.mybboard.net/eula.html
 *
 * $Id: global.php 3596 2008-01-20 08:27:39Z Tikitiki $
 */

// Load main MyBB core file which begins all of the magic
require_once "./inc/init.php";

$shutdown_queries = array();

// Read the usergroups cache as well as the moderators cache
$groupscache = $cache->read("usergroups");
$mcache = $cache->read("moderators");

// If the groups cache doesn't exist, update it and re-read it
if(!is_array($groupscache))
{
    $cache->updateusergroups();
    $groupscache = $cache->read("usergroups");
}

// Read forum permissions cache
$fpermissioncache = $cache->read("forumpermissions");

// Send page headers
send_page_headers();

// Do not use session system for defined pages
if((@isset($mybb->input['action']) && @isset($nosession[$mybb->input['action']])) || (@isset($mybb->input['thumbnail']) && strstr($_SERVER["PHP_SELF"], 'attachment.php')))
{
    define("NO_ONLINE", 1);
}

// Create session for this user
require_once MYBB_ROOT."inc/class_session.php";
$session = new session;
$session->init();

// Set our POST validation code here
$mybb->post_code = generate_post_check();

// Set and load the language
if(!isset($mybb->settings['bblanguage']))
{
    $mybb->settings['bblanguage'] = "english";
}

// Load language
$lang->set_language($mybb->settings['bblanguage']);
$lang->load("global");
$lang->load("messages");

// Run global_start plugin hook now that the basics are set up
$plugins->run_hooks("global_start");

if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset']))
{
    @mb_internal_encoding($lang->settings['charset']);
}

// Which thread mode is our user using?
if(!isset($mybb->input['mode']))
{
    if(isset($mybb->user['threadmode']))
    {
        $mybb->input['mode'] = $mybb->user['threadmode'];
    }
    else if($mybb->settings['threadusenetstyle'] == "yes")
    {
        $mybb->input['mode'] = "threaded";
    }
    else
    {
        $mybb->input['mode'] = "linear";
    }
}

// Select the board theme to use.
$loadstyle = '';
$load_from_forum = 0;
$style = array();

$valid = array(
    "showthread.php",
    "forumdisplay.php",
    "newthread.php",
    "newreply.php",
    "ratethread.php",
    "editpost.php",
    "polls.php",
    "sendthread.php",
    "printthread.php",
    "moderation.php"
);

// This user has a custom theme set in their profile
if(isset($mybb->user['style']) && intval($mybb->user['style']) != 0)
{
    $loadstyle = "tid='".$mybb->user['style']."'";
}
if(in_array(strtolower(basename($_SERVER['PHP_SELF'])), $valid))
{
    // If we're accessing a post, fetch the forum theme for it and if we're overriding it
    if(isset($mybb->input['pid']))
    {
        $query = $db->simple_select(TABLE_PREFIX."forums f, ".TABLE_PREFIX."posts p", "f.style, f.overridestyle", "f.fid=p.fid AND p.pid='".intval($mybb->input['pid'])."'", array('limit' => 1));
        $style = $db->fetch_array($query);
        $load_from_forum = 1;
    }

    // We have a thread id and a forum id, we can easily fetch the theme for this forum
    else if(isset($mybb->input['tid']))
    {
        $query = $db->simple_select(TABLE_PREFIX."forums f, ".TABLE_PREFIX."threads t", "f.style, f.overridestyle", "f.fid=t.fid AND t.tid='".intval($mybb->input['tid'])."'", array('limit' => 1));
        $style = $db->fetch_array($query);
        $load_from_forum = 1;
    }

    // We have a forum id - simply load the theme from it
    else if(isset($mybb->input['fid']))
    {
        $query = $db->simple_select(TABLE_PREFIX."forums", "style, overridestyle", "fid='".intval($mybb->input['fid'])."'", array('limit' => 1));
        $style = $db->fetch_array($query);
        $load_from_forum = 1;
    }
}

// From all of the above, a theme was found
if(isset($style['style']) && $style['style'] > 0)
{
    // This theme is forced upon the user, overriding their selection
    if($style['overridestyle'] == "yes" || !isset($mybb->user['style']))
    {
        $loadstyle = "tid='".intval($style['style'])."'";
    }
}

// After all of that no theme? Load the board default
if(empty($loadstyle))
{
    $loadstyle = "def='1'";
}

// Fetch the theme to load from the database
$query = $db->simple_select(TABLE_PREFIX."themes", "name, tid, themebits, csscached", $loadstyle, array('limit' => 1));
$theme = $db->fetch_array($query);

// No theme was found - we attempt to load the master or any other theme
if(!$theme['tid'])
{
    // Missing theme was from a forum, run a query to set any forums using the theme to the default
    if($load_from_forum == 1)
    {
        $db->update_query(TABLE_PREFIX."forums", array("style" => 0), "style='{$style['style']}'");
    }
    // Missing theme was from a user, run a query to set any users using the theme to the default
    else if($load_from_user == 1)
    {
        $db->update_query(TABLE_PREFIX."users", array("style" => 0), "style='{$style['style']}'");
    }
    // Attempt to load the master or any other theme if the master is not available
    $query = $db->simple_select(TABLE_PREFIX."themes", "name, tid, themebits, csscached", "", array("order_by" => "tid", "limit" => 1));
    $theme = $db->fetch_array($query);
}

$theme = @array_merge($theme, unserialize($theme['themebits']));

// Loading CSS from a file or from the server?
if($theme['csscached'] > 0 && $mybb->settings['cssmedium'] == 'file')
{
    $theme['css_url'] = $mybb->settings['bburl']."/css/theme_{$theme['tid']}.css";
}
else
{
    $theme['css_url'] = $mybb->settings['bburl']."/css.php?theme={$theme['tid']}";
}

// If a language directory for the current language exists within the theme - we use it
if(!empty($mybb->user['language']) && is_dir($theme['imgdir'].'/'.$mybb->user['language']))
{
    $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
}
else
{
    // Check if a custom language directory exists for this theme
    if(is_dir($theme['imgdir'].'/'.$mybb->settings['bblanguage']))
    {
        $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
    }
    // Otherwise, the image language directory is the same as the language directory for the theme
    else
    {
        $theme['imglangdir'] = $theme['imgdir'];
    }
}

// Theme logo - is it a relative URL to the forum root? Append bburl
if(!preg_match("#^(\/|\.\.|\.|([a-z0-9]+)://)#i", $theme['logo']))
{
    $theme['logo'] = $mybb->settings['bburl']."/".$theme['logo'];
}

// Load Main Templates and Cached Templates
if(isset($templatelist))
{
    $templatelist .= ',';
}
$templatelist .= "css,headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin";
$templatelist .= ",nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,global_unreadreports";
$templates->cache($db->escape_string($templatelist));

// Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], time(), '', false);
$timenow = my_date($mybb->settings['timeformat'], time());
$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);

// Format the last visit date of this user appropriately
if(isset($mybb->user['lastvisit']))
{
    $lastvisit = my_date($mybb->settings['dateformat'], $mybb->user['lastvisit']) . ', ' . my_date($mybb->settings['timeformat'], $mybb->user['lastvisit']);
}

// Otherwise, they've never visited before
else
{
    $lastvisit = $lang->lastvisit_never;
}

// If the board is closed and we have an Administrator, show board closed warning
$bbclosedwarning = '';
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] == "yes")
{
    eval("\$bbclosedwarning = \"".$templates->get("global_boardclosed_warning")."\";");
}

// Prepare the main templates for use
unset($admincplink);

// Load appropriate welcome block for the current logged in user
if($mybb->user['uid'] != 0)
{
    // User can access the admin cp and we're not hiding admin cp links, fetch it
    if($mybb->usergroup['cancp'] == "yes" && $mybb->config['hide_admin_links'] != 1)
    {
        eval("\$admincplink = \"".$templates->get("header_welcomeblock_member_admin")."\";");
    }
    // Format the welcome back message
    $lang->welcome_back = sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit);

    // Tell the user their PM usage
    $lang->welcome_pms_usage = sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_new']), my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
    eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_member")."\";");
}
// Otherwise, we have a guest
else
{
    eval("\$welcomeblock = \"".$templates->get("header_welcomeblock_guest")."\";");
}

$unreadreports = '';
// This user is a moderator, super moderator or administrator
if($mybb->usergroup['cancp'] == "yes" || $mybb->usergroup['issupermod'] == "yes" || $mybb->user['usergroup'] == 6)
{
    // Read the reported posts cache
    $reported = $cache->read("reportedposts");

    // 0 or more reported posts currently exist
    if($reported['unread'] > 0)
    {
        if($reported['unread'] == 1)
        {
            $lang->unread_reports = $lang->unread_report;
        }
        else
        {
            $lang->unread_reports = sprintf($lang->unread_reports, $reported['unread']);
        }
        eval("\$unreadreports = \"".$templates->get("global_unreadreports")."\";");
    }
}

// Got a character set?
if($lang->settings['charset'])
{
    $charset = $lang->settings['charset'];
}
// If not, revert to UTF-8
else
{
    $charset = "UTF-8";
}

// Is this user apart of a banned group?
$bannedwarning = '';
if($mybb->usergroup['isbannedgroup'] == "yes")
{
    // Fetch details on their ban
    $query = $db->simple_select(TABLE_PREFIX."banned", "*", "uid='{$mybb->user['uid']}'", array('limit' => 1));
    $ban = $db->fetch_array($query);

    if($ban['uid'])
    {
        // Format their ban lift date and reason appropriately
        if($ban['lifted'] > 0)
        {
            $banlift = my_date($mybb->settings['dateformat'], $ban['lifted']) . ", " . my_date($mybb->settings['timeformat'], $ban['lifted']);
        }
        else
        {
            $banlift = $lang->banned_lifted_never;
        }
        $reason = htmlspecialchars_uni($ban['reason']);
    }
    if(empty($reason))
    {
        $reason = $lang->unknown;
    }
    if(empty($banlift))
    {
        $banlift = $lang->unknown;
    }
    if($ban['uid'])
    {
        // Display a nice warning to the user
    }    eval("\$bannedwarning = \"".$templates->get("global_bannedwarning")."\";");
}

$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);

// Set up some of the default templates
eval("\$headerinclude = \"".$templates->get("headerinclude")."\";");
eval("\$gobutton = \"".$templates->get("gobutton")."\";");
eval("\$htmldoctype = \"".$templates->get("htmldoctype", 1, 0)."\";");
eval("\$header = \"".$templates->get("header")."\";");

$copy_year = my_date("Y", time());

// Are we showing version numbers in the footer?
if($mybb->settings['showvernum'] == "on")
{
    $mybbversion = $mybb->version;
}
else
{
    $mybbversion = '';
}
eval("\$footer = \"".$templates->get("footer")."\";");

// Add our main parts to the navigation
$navbits = array();
$navbits[0]['name'] = $mybb->settings['bbname'];
$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";

// Set the link to the archive.
$archive_url = $mybb->settings['bburl']."/archive/index.php";

// Check banned ip addresses
if(is_banned_ip($session->ipaddress))
{
    $db->delete_query(TABLE_PREFIX."sessions", "ip='".$db->escape_string($session->ipaddress)."' OR uid='{$mybb->user['uid']}'");
    error($lang->error_banned);
}
// If the board is closed, the user is not an administrator and they're not trying to login, show the board closed message
if($mybb->settings['boardclosed'] == "yes" && $mybb->usergroup['cancp'] != "yes" && !(basename($_SERVER['PHP_SELF']) == "member.php" && ($mybb->input['action'] == "login" || $mybb->input['action'] == "do_login" || $mybb->input['action'] == "logout")))
{
    // Show error
    $lang->error_boardclosed .= "<blockquote>{$mybb->settings['boardclosed_reason']}</blockquote>";
    error($lang->error_boardclosed);
    exit;
}

// Load Limiting
if(($load = get_server_load()) && $load != $lang->unknown)
{
    // User is not an administrator and the load limit is higher than the limit, show an error
    if(($mybb->usergroup['cancp'] != "yes" && $load > $mybb->settings['load'] && $mybb->settings['load'] > 0))
    {
        error($lang->error_loadlimit);
    }
}

// If there is a valid referrer in the URL, cookie it
if(!$mybb->user['uid'] && $mybb->settings['usereferrals'] == "yes" && (isset($mybb->input['referrer']) || isset($mybb->input['referrername'])))
{
    if(isset($mybb->input['referrername']))
    {
        $condition = "username='".$db->escape_string($mybb->input['referrername'])."'";
    }
    else
    {
        $condition = "uid='".intval($mybb->input['referrer'])."'";
    }
    $query = $db->simple_select(TABLE_PREFIX."users", "uid", $condition, array('limit' => 1));
    $referrer = $db->fetch_array($query);

    if($referrer['uid'])
    {
        my_setcookie("mybb[referrer]", $referrer['uid']);
    }
}

// Check pages allowable even when not allowed to view board
$allowable_actions = array(
    "member.php" => array(
        "register",
        "do_register",
        "login",
        "do_login",
        "logout",
        "lostpw",
        "do_lostpw",
        "activate",
        "resendactivation",
        "do_resendactivation",
        "resetpassword"
    ),
);
if($mybb->usergroup['canview'] != "yes" && !(strtolower(basename($_SERVER['PHP_SELF'])) == "member.php" && in_array($mybb->input['action'], $allowable_actions['member.php'])) && strtolower(basename($_SERVER['PHP_SELF'])) != "captcha.php")
{
    error_no_permission();
}

// work out which items the user has collapsed
$colcookie = $_COOKIE['collapsed'];
// set up collapsable items (to automatically show them us expanded)
if($_COOKIE['collapsed'])
{
    $col = explode("|", $colcookie);
    if(!is_array($col))
    {
        $col[0] = $colcookie; // only one item
    }
    unset($collapsed);
    foreach($col as $key => $val)
    {
        $ex = $val."_e";
        $co = $val."_c";
        $collapsed[$co] = "display: show;";
        $collapsed[$ex] = "display: none;";
        $collapsedimg[$val] = "_collapsed";
    }
}

// Randomly expire threads
if($rand > 8 || isset($mybb->input['force_thread_expiry']))
{
    $db->delete_query(TABLE_PREFIX."threads", "deletetime != '0' AND deletetime < '".time()."'");
}

// Randomly clear out old guest sessions (older than 24 hours)
if($rand > 4 && $rand < 8)
{
    $timecut = time()-60*60*24;
    $db->delete_query(TABLE_PREFIX."sessions", "uid=0 AND time<='$timecut'");
}


// Run hooks for end of global.php
$plugins->run_hooks("global_end");

$globaltime = $maintimer->gettime();
?>

Die Seite wo die Wetterbox eingebaut ist. Templates--> Portal siehe absatz unten
PHP-Code:
<html>
<
head>

<
script language="JavaScript1.1">
<!--

//*****************************************
// Blending Image Slide Show Script- 
// © Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//Intervall (Wie schnell wird das nächste Bild aufgerufen?)
var slidespeed=3000

//Bilder ändern
var slideimages=new Array("http://phoenix-jonglage.bplaced.net/Sonstiges/bild1.jpg","http://phoenix-jonglage.bplaced.net/Sonstiges/bild2.jpg","http://phoenix-jonglage.bplaced.net/Sonstiges/bild3.jpg")

//Verlinkungen verändern
var slidelinks=new Array("http://Energiepass-Energiecheck.de","http://phoenix-jonglage.de.vu","http://www.akrobat.net")

var 
newwindow=//open links in new window? 1=yes, 0=no

var imageholder=new Array()
var 
ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function 
gotoshow(){
if (
newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->
</script>

<
title>{$mybb->settings['bbname']}</title>
{
$headerinclude}
</
head>
<
body>
{
$header}
<
table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}border="0" align="center">
    <
tr>


 <!-- 
Hier sind die linken Boxen definiert -->
        <
td valign="top" width="200">
<
table cellpadding="0" cellspacing="0" width="100%">

<
tr>
<
td><img src="images/DarkOrange/tablesmall/thead_l.png" alt="" /></td>
<
td class="thead3"></td>
<
td><img src="images/DarkOrange/tablesmall/thead_r.png" alt="" /></td>
</
tr>
</
table>
        {
$welcome}
        {
$pms}
        {
$whosonline}
 {
$stats}
{
$search}
  <
table border="0" cellspacing="1" cellpadding="4" class="tborder" width="100%">
                <
tr>
                    <
td class="thead" style="font-weight:bold;"><center>Newsletter<center></td>
                <
tr>
                    <
td colspan="2" valign="top" class="trow1">
                        <
table border="0" width="100%">
                            <
tr>
                                <
td style="font-weight:bold; text-align:center;">
<
form method="POST" action="/path/to/process.php">
<
input type="text" name="address" size="20">
<
input type="submit" value="Submit" name="submit">
<
br />
<
font face="Tahoma" size="1">BestellenAb-bestellenAnträge müssen per E-Mail bestätigt werden.</font>
</
form>
                                </
a>
                                </
td>
                            </
tr>
                        </
table>
                              </
td>
                </
tr>
            </
table>
          {
$latestthreads}
        </
td>

     <!-- 
Hier sind die mittleren Boxen (inklder 'Ankündigungen'definiert -->
        <
td valign="top" width="990">
<
table cellpadding="0" cellspacing="0" width="100%">
<
tr>
<
td><img src="images/DarkOrange/tablesmall/thead_l.png" alt="" /></td>
<
td class="thead3"></td>
<
td><img src="images/DarkOrange/tablesmall/thead_r.png" alt="" /></td>
</
tr>
        </
table>

              <
table border="0" cellspacing="1" cellpadding="4" class="tborder">
    <
td valign="top" width="200">
<
table cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
</
td>

<
tr><td class="thead"><strong><center>Willkommen</center></strong></td></tr>
<
tr><td class="trow1"><marquee behavior=alternate scrollamount=2 und scrolldelay=1><b>Willkommen bei den Alleswerfern, die auch alles fangen!</b></marquee>


<
tr><td class="thead"><strong><center>News</center></strong></td></tr>
<
tr><td class="trow1">


<
div align=center>
<
b>Nur noch</b><br>
 <
SPAN id=c1 style="FONT: bold 30px arial; COLOR: green;"></SPAN><br>
 <
SPAN id=c2 style="FONT: bold 25px arial; COLOR: blue;">;</SPAN><br>
 <
small><b>...bis zur EJC</b></small>
</
div>

<
script type='text/javascript'>
// Erstellt mit dem Countdown-Generator - Homepage-Total.de
var end = new Date('August 02, 2008 17:00:00');
function 
toSt2(n) {
  
'';
  if (
10+= '0';
  return (
n).toString();
}
function 
toSt3(n) {
  
'';
  if (
10+= '00';
  else if (
100+= '0';
  return (
n).toString();
}
function 
countdown() {
  
= new Date();
  
count Math.floor(end.getTime() - d.getTime());
  if(
count 0) {
    
miliseconds toSt3(count%1000); count Math.floor(count/1000);
    
seconds toSt2(count%60); count Math.floor(count/60);
    
minutes toSt2(count%60); count Math.floor(count/60);
    
hours toSt2(count%24); count Math.floor(count/24);
    
days count;
    
document.getElementById('c1').innerHTML days ' TAGE';
    
document.getElementById('c2').innerHTML hours ':' minutes ':' seconds '.' miliseconds;
    
setTimeout('countdown()'100);
  }
}
countdown();
</
script>
<
hr>
<
br><br>
<
center><h1>Sonderangebot auf der EJC</h1>
</
br></br>
<
font color="black" face="arial" size="3">
Der Händler Akrobat wird auch auf der EJC sein.<br>
Zu diesen Anlassbekommt ihr ein Sonderangebot!<br>
Einfach bescheid sagendass ihr Phoenix-Kunde seid und euren Username hier aus dem Forum nennen.<br>
<
hr>
<
br><br>

<
h1>Alleswerfer Treffpunkt auf der EJC</h1>
</
br></br>
Die 
Alleswerfer planen einen Treffpunkt auf der EJC.<br>
Mehr zum Thema findest du hier:<br>
<
a href="http://phoenix-jonglage.bplaced.net/forum/showthread.php?tid=154" target=_blank>Klicke hier um alles zu erfahren.</a>


</
center></td></tr>
</
table>
              </
tr>
            </
table>  

        {
$announcements}
        </
td
             

  <!-- 
Hier sind die rechten Boxen definiert -->
        <
td valign="top" width="200">
<
table cellpadding="0" cellspacing="0" width="100%">

<
tr>
<
td><img src="images/DarkOrange/tablesmall/thead_l.png" alt="" /></td>
<
td class="thead3"></td>
<
td><img src="images/DarkOrange/tablesmall/thead_r.png" alt="" /></td>
</
tr>
</
table>


      <
table border="0" cellspacing="1" cellpadding="4" class="tborder" width="100%">






<
tr>
                    <
td class="thead" style="font-weight:bold;"><center>Wetter</center></td>
                <
tr>
                    <
td colspan="2" valign="top" class="trow1">
                        <
table border="0" width="100%">
                            <
tr>
                                <
td style="font-weight:bold; text-align:center;">
<
script type="text/javascript" language="javascript" src="http://www.donnerwetter.de/wetter/net/boxregio.mv?typ=1&plz={$stadt}&color_bg=FFFFFF&color_hi=FF8000&color_txt=000000&width=40"></script>
<
noscript>JavaScript ist deaktiviert leider sehen Sie hier kein aktuelles Wetter. <a href="http://www.donnerwetter.de" target="_blank">www.Donnerwetter.de</a></noscript>
                                </
a>
                                </
td></br><center>
<
a href="http://phoenix-jonglage.bplaced.net/forum/showthread.php?tid=133">Hier kannst du deine Stadt eintragen</a></center>  
                            </
tr>
                        </
table>
                    </
td>
                </
tr>
            </
table>







<!-- 
Start >> Box  Tube Video Gallery' -->
            <table border="0" cellspacing="1" cellpadding="4" class="tborder" width="100%">
                <tr>
                    <td class="thead" style="font-weight:bold;"><center>Video Galerie<center></td>
                <tr>
                    <td colspan="2" valign="top" class="trow1">
                        <table border="0" width="100%">
                            <tr>
                                <td style="font-weight:bold; text-align:center;">Hier geht'
s zur<br />
                                <
a href="{$mybb->settings['bburl']}/vgallery.php" target="_blank">
                                <
img src="vgallery/images/videolarindex.gif" width="185" height="110" border="0" alt="">
                                </
a>
                                </
td>
                            </
tr>
                        </
table>
                    </
td>
                </
tr>
            </
table>
            <!-- 
Ende >> Box 'Tube Video Gallery' -->

<!-- 
Start >> Box  Bilder Galerie' -->
            <table border="0" cellspacing="1" cellpadding="4" class="tborder" width="100%">
                <tr>
                    <td class="thead" style="font-weight:bold;"><center>Bilder Galerie</center></td>
                <tr>
                    <td colspan="2" valign="top" class="trow1">
                        <table border="0" width="100%">
                            <tr>
                                <td style="font-weight:bold; text-align:center;">Hier geht'
s zur<br />
                                <
a href="{$mybb->settings['bburl']}/pages.php?page=galerie" target="_blank">
                                <
img src="http://phoenix-jonglage.bplaced.net/Galerie/odig/thumbnail.php?image=Dresden%202008/DSCN5230.JPG" alt="" /><br>Bilder Galerie
                                
</a>
                                </
td>
                            </
tr>
                        </
table>
                    </
td>
                </
tr>
            </
table>
            <!-- 
Ende >> Box 'Bilder Galerie' -->
       <
table cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder">
<!-- 
Hier rein >> Box 'Werbung' -->
<
tr>
                    <
td class="thead"><strong><center>Werbung</center></strong></td>
                </
tr>
                <
tr>
                    <
td class="trow1">
<
center>
<
a href="javascript:gotoshow()"><img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=87 height=443></a>

<
script language="JavaScript1.1">
<!--

var 
whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 0
function slideit(){
if (!
document.images) return
if (
iedocument.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (iedocument.images.slide.filters[0].play()
whichlink=whichimage
whichimage
=(whichimage<slideimages.length-1)? whichimage+0
setTimeout
("slideit()",slidespeed+blenddelay)
}
slideit()

//-->
</script>
</
center>
 </
td>
                </
tr>

            </
table>
        </
td>
    </
tr>
</
table>
{
$footer}
</
body>
</
html
Achtung
 nehmen Sie diese Beiträge nicht ernst! Das MyBB wissen beruht auf
(letzter Stand: MyBB 1.2.8)
Zitieren
#8
Wenn ich mir das Highlightning des global.php-Codes ansehe, gehört nach
Code:
$_SESSION['stadt'] = $stadt;
auf alle Fälle mal das "?>" weg. Dort hört ja sonst offziell der PHP-Code auf.

Im Template-Code müsste der JS-Code im Mittelbereich evtl. auch noch durch ein "<!-- ..... //-->" eingegrenzt werden.

Edit: des ersten Codes in des global.php-Codes geändert.
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#9
Danke daran lag es *andenkopfhau*

Also vielen Dank Jockl...

Ich würde dich dennoch etwas Fragen hast du eine Ahnung, wie ich die Stadt eines Users laden?
Sodas nicht mehr alle eingetragene Städte im Zufall geladen werden, sondern nur die eigene?
Achtung
 nehmen Sie diese Beiträge nicht ernst! Das MyBB wissen beruht auf
(letzter Stand: MyBB 1.2.8)
Zitieren
#10
Ist die Postleitzahl in einem eigenen Profilfeld hinterlegt?

Gruß,
Michael
[Bild: banner.png]
Support erfolgt NUR im Forum!
Bitte gelöste Themen als "erledigt" markieren.
Beiträge mit mangelhafter Rechtschreibung/Grammatik werden kommentarlos gelöscht.
Zitieren