"IF SCRIPT_NAME neq app/imprint" funktioniert nicht

In diesem Forum gibt es Starthilfe zum neuen Extension-System von phpBB 3.1/3.2. Fragen zur Entwicklung von Extensions und zur Konvertierung von phpBB 3.0.x MODs sind ebenfalls willkommen.
Antworten
Gast234254
Gesperrt
Beiträge: 1999
Registriert: 08.02.2009 22:58

"IF SCRIPT_NAME neq app/imprint" funktioniert nicht

Beitrag von Gast234254 »

Vielleicht hat jemand von euch eine Lösung. Möchte für ein Menü, Links aktiv markieren wenn die Seite aufgerufen ist. So wie hier http://www.wintstar.de.
Aber das geht nun in 3.1.* nicht mehr so richtig. Den die eigenen Seiten von Erweiterungen haben keine direkte eigene .php Seite. Beispiel meine Erweiterung Impressum => app.php/imprint?0=imprint bzw. bei im ACP aktivierter "Umschreiben von URLs aktivieren:" /imprint?0=imprint

So hat es in 3.0.12 funktioniert, da ist die Impressum Seite imprint.php

Code: Alles auswählen

<!-- IF SCRIPT_NAME neq 'faq' and SCRIPT_NAME neq 'search' and SCRIPT_NAME neq 'memberlist' neq 'imprint' --> class="active"<!-- ENDIF -->
In 3.1.* funktioniert es nicht mehr. Entweder

Code: Alles auswählen

<!-- IF SCRIPT_NAME neq 'faq' and SCRIPT_NAME neq 'search' and SCRIPT_NAME neq 'memberlist' neq 'app' --> class="active"<!-- ENDIF -->
wobei app.php ja auch jede andere Erweiterung mit eigener Seite nutzt.
Aber auch das funktioniert nicht

Code: Alles auswählen

<!-- IF SCRIPT_NAME neq 'faq' and SCRIPT_NAME neq 'search' and SCRIPT_NAME neq 'memberlist' neq 'app.php/imprint' --> class="active"<!-- ENDIF -->
SCRIPT_NAME wird in der includes/functions.php festgelegt

Code: Alles auswählen

		'SCRIPT_NAME'					=> str_replace('.' . $phpEx, '', $user->page['page_name']),
Wie kann man das für 3.1.* lösen?
Benutzeravatar
nickvergessen
Ehrenadmin
Beiträge: 11559
Registriert: 09.10.2006 21:56
Wohnort: Stuttgart, Germany
Kontaktdaten:

Re: "IF SCRIPT_NAME neq app/imprint" funktioniert nicht

Beitrag von nickvergessen »

Da fehlt noch and SCRIPT_NAME ?

Code: Alles auswählen

<!-- IF SCRIPT_NAME neq 'faq' and SCRIPT_NAME neq 'search' and SCRIPT_NAME neq 'memberlist' and SCRIPT_NAME neq 'imprint' --> class="active"<!-- ENDIF -->
bzw

Code: Alles auswählen

<!-- IF SCRIPT_NAME neq 'faq' and SCRIPT_NAME neq 'search' and SCRIPT_NAME neq 'memberlist' and SCRIPT_NAME neq 'app/imprint' --> class="active"<!-- ENDIF -->
kein Support per PN
Gast234254
Gesperrt
Beiträge: 1999
Registriert: 08.02.2009 22:58

Re: "IF SCRIPT_NAME neq app/imprint" funktioniert nicht

Beitrag von Gast234254 »

Vielen Dank nickvergessen. Wenn man´s richtig macht funktionert´s. :oops:
Antworten

Zurück zu „Extension Bastelstube“