Nummerierung Gästebucheinträge umkehren
Nummerierung Gästebucheinträge umkehren
Hi,
kann es sein dass bei dem letzten phpwcms release die Nummerierung der Gästebucheinträge umgekehrt wurde? Bei mir ist es nun so dass der letzte und damit aktuellste Eintrag die nr. 1. hat. Bei Pepe habe ich jedoch gesehen dass es in der Regel anders ist.
Ich frage mich schon wie ich das wieder geschafft habe das so zu verändern, ich habe die default.html ziemlich umgebaut...hilfe hilfe. Kann mir jemand vielleicht einen Tipp geben wie man das wieder umstellen kann?
Lg Melanie
kann es sein dass bei dem letzten phpwcms release die Nummerierung der Gästebucheinträge umgekehrt wurde? Bei mir ist es nun so dass der letzte und damit aktuellste Eintrag die nr. 1. hat. Bei Pepe habe ich jedoch gesehen dass es in der Regel anders ist.
Ich frage mich schon wie ich das wieder geschafft habe das so zu verändern, ich habe die default.html ziemlich umgebaut...hilfe hilfe. Kann mir jemand vielleicht einen Tipp geben wie man das wieder umstellen kann?
Lg Melanie
Hätte ich auch gerne
Hallo Pepe,
wie, und wo hast du das denn jetzt eingestellt??
Find ich auch viel sinnvoller, so wie das bei Dir ist.
Viele Grüsse
frabon69
wie, und wo hast du das denn jetzt eingestellt??
Find ich auch viel sinnvoller, so wie das bei Dir ist.
Viele Grüsse
frabon69
Hai!
Ihr müsst unter /phpwcms_template/inc_cntpart/guestbook/ die
default.html ändern, und zwar an folgender Stelle:
Ersetzen muss man das {ID} durch {DBID}.
Das ganze hat aber einen Schönheitsfehler: Die Datenbank-ID wird
fortlaufend erhöht, also auch wenn ein Eintrag gelöscht wird... Somit
stimmt die Nummerierung insbesondere am Anfang des Guestbook
nicht, denn durch Tests (Eintrag erstellen, löschen usw.) wird der
Zähler ständig erhöht... Man kann aber problemlos das Guestbook eine
Weile in Betrieb halten und dann die Vorlage ändern, wenns mal ein
paar Dutzend Einträge hat...
Ihr müsst unter /phpwcms_template/inc_cntpart/guestbook/ die
default.html ändern, und zwar an folgender Stelle:
Code: Select all
<!--GUESTBOOK_ENTRY_START//-->
<tr bgcolor="#E7E7E7">
<td width="1%" align="right"><strong>{ID} </strong></td>
<td width="99%"> | {TIMESTAMP:d.m.Y, H:i}</td>
</tr>
<tr>
Das ganze hat aber einen Schönheitsfehler: Die Datenbank-ID wird
fortlaufend erhöht, also auch wenn ein Eintrag gelöscht wird... Somit
stimmt die Nummerierung insbesondere am Anfang des Guestbook
nicht, denn durch Tests (Eintrag erstellen, löschen usw.) wird der
Zähler ständig erhöht... Man kann aber problemlos das Guestbook eine
Weile in Betrieb halten und dann die Vorlage ändern, wenns mal ein
paar Dutzend Einträge hat...
Greetz, tinoo
Hi
think it is a better way to change the Listing-Code in ../include/inc_front/content/cnt18.article.inc.php
to (not tested)
think it is a better way to change the Listing-Code in ../include/inc_front/content/cnt18.article.inc.php
Code: Select all
// pages listing
for($x=$start; $x<=$end; $x++) {
if($navpages) $navpages .= $wrap[0];
if($x-1 != $current) {
$navpages .= '<a href="'.$link.($x-1).$linkadd.'">';
$navpages .= $x.'</a>';
} else {
$navpages .= $wrap[1].$x.$wrap[2];
}
}
Code: Select all
// pages listing
for($x=$end; $x<=$start; $x--) {
if($navpages) $navpages .= $wrap[0];
if($x-1 != $current) {
$navpages .= '<a href="'.$link.($x-1).$linkadd.'">';
$navpages .= $x.'</a>';
} else {
$navpages .= $wrap[1].$x.$wrap[2];
}
}
-
- Posts: 42
- Joined: Thu 18. Nov 2004, 23:07
- Location: Switzerland
- Contact:
@ tinoo
I followed you idea and I found a solution for the numbering problem. It works if you have only occasionally to delete messages from your guestbook - you will see why:
1. I changed the template and replaced {ID} by {DBID}
2. I arranged the order of all current entries (only 5...) manually using phphMyAdmin
3. I changed the autoindex to 6 (next number in my case) with the following code and using also phpMyAdmin:
And this is the result:
http://meli.cc/index.php?guestbook
Cheers Pierre
I followed you idea and I found a solution for the numbering problem. It works if you have only occasionally to delete messages from your guestbook - you will see why:
1. I changed the template and replaced {ID} by {DBID}
2. I arranged the order of all current entries (only 5...) manually using phphMyAdmin
3. I changed the autoindex to 6 (next number in my case) with the following code and using also phpMyAdmin:
Code: Select all
ALTER TABLE phpwcms_guestbook AUTO_INCREMENT = 6
http://meli.cc/index.php?guestbook
Cheers Pierre