Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Admintools selber erstellen
#1
Hallo,

nachdem es dasd Thema "Eigene Admintools erstellen" nicht mehr gibt, will ich euch was fragen:
Wiesso teigt er mir nur "Cheaten" an?
extern_modules:
PHP Code:
<?php
 $screenname 
"Cheaten";
 
$toolname "Cheattool";
?>
actions:
PHP Code:
<?php
 $cheat 
"Mit diesem Tool kannst du Cheaten";
  
$tpl->assign('Cheattol'$cheat);
?>
templates:
PHP Code:
<html>
<
body>
  <
h3>Cheaten</h3>
   {
$cheaten}
</
body>
</
html

Reply
#2
vielleicht, weil du $cheaten nicht definiert hast?

Reply
#3
Du musst bei "action" schon etwas hinschreiben z.B.

PHP Code:
$cheaten "Bla Bla.." 
Ich kann nicht gut php!
oder ein paar Textkästen hinmachen z.B.:

PHP Code:
<html>
<
body>
 <
h1>Cheaten</h1>
<
form action="?Cheaten.php" method="POST">
<
input type="Text" name="Hauptgebäude">
<
textarea name="PHP" cols="30" rows="15">
</
body>
</
html

Oder soetwas..
Manchmal denke ich:
Reply
#4
(04.05.2009, 13:41)Yannici Wrote: Du musst bei "action" schon etwas hinschreiben z.B.

PHP Code:
$cheaten "Bla Bla.." 
Ich kann nicht gut php!

Falsch.

@Markus4897: Wenn überhaupt musst du {$Cheattol} ins Template schreiben, damit ein Output der Variable $cheaten vorhanden ist.
Reply
#5
Muss ich nicht den Pfad eingeben?
Mit {$Cheattool} gehts auch nicht.

Also nochmal:
actions, cheaten.php
PHP Code:
<?php
 $cheat 
"Mit diesem Tool kannst du Cheaten";
  
$tpl->assign('Cheattol'$cheat);
?>
extern_modules, cheaten.php
PHP Code:
<?php
 $screenname 
"Cheaten";
 
$toolname "Cheattool";
?>
templates, index_cheaten.tpl
PHP Code:
<html>
<
body>
  <
h3>Cheaten</h3>
   {
$Cheattool}
</
body>
</
html

Aber muss ich, wenn ich etwas ändern will, das in actions schreiben?

Reply
#6
du musst
PHP Code:
{$Cheattol
eingeben, dann geht es.

Reply
#7
Aber wenn ich in index_cheaten.php Textfelder mache, wieso macht er dann keinen Zeilenmbruch oder erkennt ihn nicht?

Reply
#8
Du darfst sie nicht index_cheaten.PHP nennen sonder index_cheaten.tpl !
Das ist wichtig, sonst wird es nicht als Template angenommen.
Manchmal denke ich:
Reply
#9
Meinte ich ja. Die Datei heißt index_cheaten.tpl

Reply
#10
Zeilenumbrüche gehen ja so:

PHP Code:
<broder <br/> 

hast du das so?
Manchmal denke ich:
Reply
#11
Ja, ich habe es jetzt mit
Code:
<table>...</table>
gemacht.

Reply
#12
Und das funktioniert?
Manchmal denke ich:
Reply
#13
Ja, das geht

Reply
#14
Okay, dann ist ja in Ordnung.
Manchmal denke ich:
Reply




Users browsing this thread: 1 Guest(s)