Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.38 veröffentlicht (30.04.24)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Dynamic Header and Footer
#1
Eine neue Erweiterung wurde veröffentlicht: Dynamic Header and Footer

Zitat:Many site owners use 'header.php' and 'footer.php' include files so that only a single file has to be changed to alter the header/footer across an entire website. These files are generally included on a webpage with statements like:

Code:
    require_once "includes/header.php";

This plugin allows you to specify a path to those various include files to wrap each MyBB page with consistent branding without modifying any MyBB template files. Any changes you make to your header/footer are instantly reflected in MyBB.

While URLs are supported, they will kill your server's performance. Use absolute/relative paths. If you HAVE to pull from another server, get a real programmer to cache the header/footer locally with a local script. Note that 'lang' with the active MyBB language and 'mybb=1' are appended to the URL.

To make MyBB-specific changes to your header and footer when using absolute/relative paths, you can distinguish between the rest of your site and MyBB by doing the following:

Code:
    if (defined("IN_MYBB"))
    {
        ...Do MyBB specific stuff here...
    }

NOTE: A lot of layouts with sidebars may break MyBB's layout. The quick-n-dirty solution is to either get rid of the sidebar or wrap the MyBB content area with a 'table' tag. (Yeah, tables are tacky but, hey, they DO work and take only a minute to implement).

Works with MyBB 1.4.x and 1.6.x.
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Dynamic To Top MyBB.de Bot 1 1.201 22.03.2018, 07:00
Letzter Beitrag: MyBB.de Bot
  Dynamic Header and Footer MyBB.de Bot 2 1.840 05.04.2015, 22:32
Letzter Beitrag: MrBrechreiz
  Dynamic Forum MyBB.de Bot 0 1.217 18.07.2012, 10:45
Letzter Beitrag: MyBB.de Bot
  Dynamic Forum Logo MyBB.de Bot 1 1.459 11.02.2012, 12:00
Letzter Beitrag: MyBB.de Bot
  Dynamic Forum Logo MyBB.de Bot 5 3.094 12.09.2011, 17:27
Letzter Beitrag: StefanT