Click to See Complete Forum and Search --> : guestbook gonebad


DCBT
08-08-2006, 09:46 PM
Hi... Russel sent me here from ASP...
NEED HELP :confused:
want gb to read newest first instead of oldest
tried changing ASC to DESC had no effect
entire original code can be seen on ASP thread bottom of page one
http://www.webdeveloper.com/forum/showthread.php?t=110492&goto=newpost

PineSolPirate
08-09-2006, 11:45 AM
I just glanced over the comments and the code, but try this one:
Change-SORT_FIELD1 => $CGI->param('sort_field1') || 'category',
-SORT_FIELD2 => $CGI->param('sort_field2') || 'fname',
-SORT_DIRECTION => $CGI->param('sort_direction') || 'ASC',
To
-SORT_FIELD1 => $CGI->param('sort_field1') || 'date_time_posted',
-SORT_FIELD2 => $CGI->param('sort_field2') || 'fname',
-SORT_DIRECTION => $CGI->param('sort_direction') || 'ASC',
Assuming you don't have more than one "category" that might work.
*shrug*

DCBT
08-09-2006, 04:21 PM
tried it but no change, still shows oldest first. I have no idea how many 'catagories' there might be. I'm code challenged, and only have some basic html training. your instructions were very clear and I had no trouble following them. but it didn't do the trick. :(

PineSolPirate
08-09-2006, 04:24 PM
Sorry :(
I haven't done any real coding with Perl in well over 6 months, and my brain starts throwing stuff away after a few weeks of non-use.
If you know where you got the script or remember how it was set up I'd be willing to try installing it myself and tinkering until I can get it going. Otherwise I'd just recommend finding a new script that does what you like.

russell
08-09-2006, 05:22 PM
try changing

-SORT_FIELD1 => $CGI->param('sort_field1') || 'date_time_posted',
-SORT_FIELD2 => $CGI->param('sort_field2') || 'fname',
-SORT_DIRECTION => $CGI->param('sort_direction') || 'ASC',

to

-SORT_FIELD1 => $CGI->param('sort_field1') || 'date_time_posted',
-SORT_FIELD2 => $CGI->param('sort_field2') || 'fname',
-SORT_DIRECTION => $CGI->param('sort_direction') || 'DESC',

DCBT
08-09-2006, 05:32 PM
I got it with my host (websitesource.net) services (included) a freebie from an affiliate of theirs. I wouldn't mind a more 'cooperative' one... BUT I have a site up for a friend with this one and much as she hates having to work past all the old messages to see a new one, she would also hate to loose them.
and I hate to hit her with any problems, she has enough (cancer & hubby by-pass surgery)
however I'm setting up a site for another friend and would willingly use something else there. Got a recomendation?

the code is all pasted in over on the ASP thread, I believe including the writer/user info at the top

DCBT
08-09-2006, 05:45 PM
good suggestion Russ... but no go. :confused:

PineSolPirate
08-10-2006, 11:19 AM
Okay, I understand. Well, I like "Dreambook" but unless you have a dreamhost account it has ads on it. Aside from that I've never used any scripts, but I checked hotscripts, here are the links to the perl ones
http://hotscripts.com/CGI_and_Perl/Scripts_and_Programs/Guestbooks/index.html
and php ones
http://hotscripts.com/PHP/Scripts_and_Programs/Guestbooks/index.html

I'll go ahead and mess with the script you posted, maybe I'll figure it out or at least understand how the data is stored (CSV?), then you might be able to move it all over to a new setup without any loss or change. Who knows, maybe I'll find out how to sort it.

DCBT
08-11-2006, 12:02 PM
I appreciate that. according the the host/creators its supposed to be easy to configure, but none of my inqueries to them resulted in a fix either. I'm 'tied in' where I am for the next 2 years, so it has to be something I can use here without ads.
will check those links for the other site.
I don't feel so bad about not being able to deal with it now...
Seems no one else can either.