Abruf von Kommentaren. Erfassung über getCommentForm(). Funktionen: getCommentsList, getCommentsContent.
Gibt Kommentare als Array zurück. Optional nach Host/URI filtern.
Code
$config = [];
$config["host"] = 'https://' . $_SERVER['HTTP_HOST'];
$config["uri"] = ''; // optional: URI der Seite
$config["limit"] = '100';
$config["start"] = '0';
$config["orderby"] = 'datetime';
$config["direction"] = 'desc';
$array = getCommentsList($config);$config Parameter
| Key | Beschreibung | Beispiel |
|---|---|---|
| host | Host-URL der Seite | 'https://example.com' |
| uri | URI-Pfad zur Filterung (leer = alle) | '/news/' |
| limit / start | Pagination | '100' / '0' |
| orderby / direction | Sortierung: id, datetime | 'datetime' / 'desc' |
Ausgabe (Live)
[
{
"id": "22",
"firstname": "Alois",
"lastname": "Gisler",
"email": "alois.gisler@betasolutions.ch",
"phone": "+41793620412",
"reference": "adfa dgh dfhgjdfg",
"comment": "adf adfasdf ",
"answer": "",
"host": "https:\/\/v51.beta.wacms.org",
"uri": "\/demo.php?site=formulare",
"language": "",
"status": "1",
"update": "2026-01-25 21:51:12"
},
{
"id": "21",
"firstname": "Alois",
"lastname": "Gisler",
"email": "alois.gisler@betasolutions.ch",
"phone": "+41793620412",
"reference": "Kommentar",
"comment": "Der Test",
"answer": "",
"host": "https:\/\/v51.beta.wacms.org",
"uri": "\/demo.php?site=formulare",
"language": "",
"status": "1",
"update": "2026-01-22 21:20:13"
},
{
"id": "20",
"firstname": "Alois",
"lastname": "Gisler",
"email": "alois.gisler@betasolutions.ch",
"phone": "+41793620412",
"reference": "Der Test",
"comment": "Der Kommentar",
"answer": "",
"host": "https:\/\/v51.beta.wacms.org",
"uri": "\/demo.php?site=formulare",
"language": "",
"status": "1",
"update": "2026-01-22 21:16:14"
},
{
"id": "16",
"firstname": "Alois",
"lastname": "Gisler",
"email": "alois.gisler@betasolutions.ch",
"phone": "+41793620412",
"reference": "dfsadf adsf adsf ",
"comment": "adsf asdf asdfa df asfd ",
"answer": "",
"host": "https:\/\/v51.beta.wacms.org",
"uri": "\/demo.php?site=formulare",
"language": "",
"status": "1",
"update": "2024-09-30 23:34:38"
},
{
"id": "15",
"firstname": "Lea",
"lastname": "Vase",
"email": "lea.vase@betasolutions.ch",
"phone": "+41761234567",
"reference": "test",
"comment": "test",
"answer": "",
"host": "https:\/\/v51.beta.wacms.org",
"uri": "\/demo.php?site=formulare",
"language": "",
"status": "1",
"update": "2024-03-28 15:01:05"
}
]