Vordefiniertes Template für Beiträge

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
Docstone
Posts: 26
Joined: Thu Jun 08, 2006 10:21 am

Vordefiniertes Template für Beiträge

Post by Docstone »

Hi,

Da ich noch in den PHP Kindeschuhen stecke, kann mir hier vielleicht wer weiterhelfen:

Ich möchte, wenn ich im Admin auf Beitrag erstellen gehe, im Textfeld bereits einen vordefinierten Eintrag drinnenhaben. sozusagen einen Musterbeitrag!

Der HTML-Code dafür ist kein Problem, nur weiss ich nicht, wie ich den Text in die FOrm einbauen kann!

danke für die Hilfe,
DocStone
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
please locate, backup and open the [PATH_TO_PMFINSTALL]/admin/record.edit.php file, find out these lines below:

Code: Select all

...
    }
?>

    <form style="float: left;" action="<?php print $_SERVER["PHP_SELF"].$linkext; ?>&aktion=<?php print $acti; ?>" method="post">
...
and replace them with these ones:

Code: Select all

...
    }

    if (!isset($content)) {
        // Insert here a sample to help the faq authoring
        $content = "<p>Insert here your text.</p>";
    }
?>

    <form style="float: left;" action="<?php print $_SERVER["PHP_SELF"].$linkext; ?>&aktion=<?php print $acti; ?>" method="post">
...
Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
Docstone
Posts: 26
Joined: Thu Jun 08, 2006 10:21 am

Post by Docstone »

Hi matteo.



Thank you for that piece of code making my work much more easier...


greets,

Doc Stone
Post Reply