so - nun öffne mal mit einem Editor am PC diese Demo-Datei "
demo.php" und da siehst Du wie die Seite "kommentar.php" inkludiert wird, nämlich mit dieser PHP-Anweisung:
Genau so machst Du das jetzt auch in Mobirise.
> Du stellst also zuerst Deine Mobirise-Seite mit dem Einbau in der
Dateierweiterung um auf
.php. Das macht man in den Seiteneinstellungen am Zahnrad unter "URL der Seite". Nur so weiß der Server/Browser, dass es sich um eine PHP-Seite handelt und nun die PHP-Scriptsprache verwendet werden muss.
> Natürlich darf die Mobirise-Seite nun nicht auch "kommentar.php" heißen, denn diese PHP-Seite willst Du ja inkludieren. Nenne die Mobirise-Seite dann eben anders, wie z.B. "
Seitenkommentar.php".
> Trage dann, am besten zunächst in einen einfachen Textblock, anstelle des Beispiel-Textes den PHP-Include-Befehl dort ein.
> Publiziere das Projekt auf den Server und achte natürlich nun darauf, dass in diesem Projekt-Verzeichnis nun auch die Datei "kommentar.php" vom Werner liegt, denn die wird ja inkludiert. Lokal siehst Du nichts!
> Falls Du noch ein wenig
Style für die Kommentar-Box benötigst, kannst Du z.B. einen Teil aus der Datei "
kommentar.css" in den Bereich "
CSS Editor" vom "Code Editor" des Blocks mit dem Einbau kopieren. Also z.B. das hier - natürlich kannst Du auch Farben und Dinge anpassen - aber erst einmal wie es ist. Die
/* Kommentare */ löscht Mobirise nach dem Speichern (leider):
Code: Alles auswählen
/* Kommentar-Box */
fieldset.kommentarBox {
background-color: #f5f5f5;
border: Solid 1px #a8a8a8;
box-shadow: 0px 0px 9px 3px #d8d8d8;
border-radius: 5px;
padding: 20px;
margin: 25px Auto 25px Auto;
max-width: 510px;
scroll-margin-top: 25px;
cursor: Default;
}
/* Überschrift */
fieldset.kommentarBox legend {
font-family: Verdana, Arial, Sans-Serif;
font-size: 1rem;
padding: 0 5px 0 5px;
letter-spacing: 1px;
color: #000000;
}
/* Navigation */
fieldset.kommentarBox nav {
text-align: Right;
}
/* Kommentar */
fieldset.kommentarBox dl.kommentar dt {
border-bottom: Solid 1px #d8d8d8;
}
fieldset.kommentarBox dl.kommentar dd {
margin-left: 40px;
}
/* Hyperlinks */
fieldset.kommentarBox a:link,
fieldset.kommentarBox a:visited {
color: #4169e1;
text-decoration: None;
}
/* Formularfelder */
fieldset.kommentarBox input,
fieldset.kommentarBox button,
fieldset.kommentarBox textarea,
fieldset.kommentarBox select {
font-family: Verdana, Arial, Sans-Serif;
font-size: 1rem;
margin-top: 5px;
}
/* Optionen */
fieldset.kommentarBox input[type="radio"]:checked + label {
color: #4169e1;
}
fieldset.kommentarBox input[type="radio"]#lbl2:checked + label {
color: #ee0000;
}
/* Fokusindikator (all) */
:focus-visible {
outline: solid 1px #4169e1;
}
/* Pflichtangabe */
fieldset.kommentarBox mark {
color: #ff0000;
background-color: Transparent;
}
/* Bewertung */
fieldset.kommentarBox span.bewertung_ok {
color: #ffd700;
}
fieldset.kommentarBox span.bewertung_ko {
color: #c8c8c8;
}
/* Statusmeldung */
p.status {
color: #00b32d;
background-color: #eaffef;
padding: 5px 5px 5px 15px;
margin: 25px Auto 25px Auto;
width: 510px;
border: Solid 1px #d8d8d8;
border-radius: 5px;
}
p.statusx {
color: #ee0000;
background-color: #ffe8e8;
padding: 5px 5px 5px 15px;
margin: 5px Auto 25px Auto;
width: 510px;
border: Solid 1px #d8d8d8;
border-radius: 5px;
}
Ich habe jetzt nicht so genau in diese CSS geguckt, eventuell musst Du die eine oder andere Breite anpassen, damit das auch am Handy responsiv bleibt, vielleicht auch die Abstände prüfen - wie "padding".