TWLan Forum

Full Version: "actions"-Include?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hallo

Kann mir jemand verraten, wie ich
  • es anstelle, dass eine PHP-Datei, die im Ordner htdocs/actions liegt, von game.php "included" wird (falls der screen=name ist)?
  • einen screen in $allowed_screens bekomme?
Oder geht das nicht?

LG
Molt
Not possible without changing the encoded script.
The only way to include PHP now is by changing the template files.
Du kannst in der game.tpl einfach die Abfrage raus machen, dass nur $allowed_screens erlaubt sind Smile
Dann kannst du alle Templates includieren ;-)
Nur ob die Actions Dateien dann funktionieren, weiß ich nicht.
Also mach in der game.tpl einfach:

Code:
{php}
$this->_tpl_vars['allowed_screens'][] = 'DIE SEITE';
{/php}

Und für actions in der game.php vor dem ganzen Code:

PHP Code:
<?php
if($_GET['screen'] == 'DIE SEITE') {
  include(
'actions/SEITE.php');
}
?>

PS: Denke, das sollte funktionieren Wink

MfG Manuel
Jaja, es geht schon, ich wollte nur wissen, ob es sowas ähnliches wie die Schnittstelle beim Adminpanel gibt... offenbar nicht.

LG
Molt
ich glaube ich weiß was du meinst^^
leider kann ich dir nicht helfen
(11.11.2010, 17:24)Molt Wrote: [ -> ]Jaja, es geht schon, ich wollte nur wissen, ob es sowas ähnliches wie die Schnittstelle beim Adminpanel gibt... offenbar nicht.

LG
Molt

Achso. Nein denke nicht, aber so, wie ichs geschrieben hat, gehts ja auch. Wink

MfG Manuel