Hallo, Gast! (Registrieren)

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


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Announcement
#51
Am einfachsten wäre es wenn du die bestehende dismiss_notice.gif im allgemeinen Image-Ordner mit deiner "richtigen" dismiss_notice.gif ersetzt.
Zitieren
#52
Bei nur einem Theme mag das ja funktionieren aber eine wirkliche Lösung ist das ja nicht, wenn man mehrere hat..
Zitieren
#53
Füge den kompletten div Container in das zweite $remove = "" ein, dann gehts.
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#54
Nop, das machts nur schlimmer...

Nehme die inc/plugins/announcement.php und ändere folgendes:
PHP-Code:
if($global)
            
$theme['imgdir'] = "images"
in
PHP-Code:
if($global)
{
// Select the board theme to use.
$loadstyle '';
$load_from_forum 0;
$style = array();

// 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']."'";
}

// 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'] == || !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("themes""name, tid, properties, stylesheets"$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 user, run a query to set any users using the theme to the default
        
if($load_from_user == 1)
        {
                
$db->update_query("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("themes""name, tid, properties, stylesheets""", array("order_by" => "tid""limit" => 1));
        
$theme $db->fetch_array($query);
}
$theme = @array_merge($themeunserialize($theme['properties']));

// Are we linking to a remote theme server?
if(substr($theme['imgdir'], 07) == "http://" || substr($theme['imgdir'], 08) == "https://")
{
        
// If a language directory for the current language exists within the theme - we use it
        
if(!empty($mybb->user['language']))
        {
                
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
        }
        else
        {
                
// Check if a custom language directory exists for this theme
                
if(!empty($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'];
                }
        }
}
else
{
        if(!@
is_dir($theme['imgdir']))
        {
                
$theme['imgdir'] = "images";
        }

        
// 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'];
                }
        }
}


Ich habe das aber NICHT getestet, es können dabei auch Fehler auftreten (sollten aber nicht).
Zitieren
#55
In meinem Versuch (Local) funktioniert diese Variante.
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#56
Nein, denn dann wird der Button auch bei Ankündigungen angezeigt, die nicht entfernt werden sollten.
Zitieren
#57
(14.11.2013, 10:58)King Louis schrieb: Nop, das machts nur schlimmer...

Nehme die inc/plugins/announcement.php und ändere folgendes:
PHP-Code:
if($global)
            
$theme['imgdir'] = "images"
in
PHP-Code:
if($global)
{
// Select the board theme to use.
$loadstyle '';
$load_from_forum 0;
$style = array();

// 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']."'";
}

// 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'] == || !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("themes""name, tid, properties, stylesheets"$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 user, run a query to set any users using the theme to the default
        
if($load_from_user == 1)
        {
                
$db->update_query("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("themes""name, tid, properties, stylesheets""", array("order_by" => "tid""limit" => 1));
        
$theme $db->fetch_array($query);
}
$theme = @array_merge($themeunserialize($theme['properties']));

// Are we linking to a remote theme server?
if(substr($theme['imgdir'], 07) == "http://" || substr($theme['imgdir'], 08) == "https://")
{
        
// If a language directory for the current language exists within the theme - we use it
        
if(!empty($mybb->user['language']))
        {
                
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language'];
        }
        else
        {
                
// Check if a custom language directory exists for this theme
                
if(!empty($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'];
                }
        }
}
else
{
        if(!@
is_dir($theme['imgdir']))
        {
                
$theme['imgdir'] = "images";
        }

        
// 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'];
                }
        }
}


Ich habe das aber NICHT getestet, es können dabei auch Fehler auftreten (sollten aber nicht).

Keine Fehler, alles wunderbar Smile
Vielen Dank für den raschen Support!
Zitieren
#58
Habe ich hochgeladen und installiert - bekomme leider folgende Fehlermeldung, wenn ich unten links versuche, es zu benutzen:

Hier der Link dazu:

zum Plugin
Zitieren
#59
Der Link ist zum Adminbereich Wink Vielleicht solltest du die Meldung hier lieber posten.
Zitieren
#60
Mach ich doch gerne:

So schaut's aus:

   
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  OUGC Announcement Bars MyBB.de Bot 5 2.063 31.03.2024, 23:20
Letzter Beitrag: MyBB.de Bot
  Announcement Views MyBB.de Bot 10 2.491 09.02.2023, 07:45
Letzter Beitrag: Shorty
  Announcement MyBB.de Bot 25 6.972 09.02.2023, 00:20
Letzter Beitrag: Shorty
  Announcement Redirect MyBB.de Bot 0 740 20.02.2021, 06:35
Letzter Beitrag: MyBB.de Bot
  Announcement Go MyBB.de Bot 9 3.244 17.05.2015, 22:23
Letzter Beitrag: MrBrechreiz