Click to See Complete Forum and Search --> : Help Asp


DCBT
06-17-2006, 05:19 PM
Isn't there anyone who can handle guestbooks????
I've read the asp pages but I'm in over my head... :(

russell
06-17-2006, 06:57 PM
are you looking to create one, or just copy a prebuilt one?

DCBT
06-18-2006, 11:22 PM
I do not seem to know enough to create one, so I guess a prebuilt. I have one up that came with my server... the blurb says its easy to configure, but I can't and neither can they. all I wanted to do was get it to list newest posts first instead of last.

DCBT
06-21-2006, 10:20 PM
Can't anyone help me understand the asp code and set up a guestbook??????? :(

russell
06-21-2006, 10:38 PM
where did you get the guestbook? no one can help you without at least a little peek at the code. Have you downloaded a free guestbook in ASP that you just include in your site? what do u need it to do? if you've found one that you wanty to pop into your site, give us a link to it and we'll try to help u implement. We'll probably ask to see some of your code next so we know WHERE to place the new code into yours. If you don't have some pre-made guestbook, building one is pretty easy, but we'll need to know what database systems are at your disposal. we'll try to help ya out all we can, but just have too little info to make any intelligent remarks at this point.

post back and let's get a whack at it.

EDIT:: Guess i didn't read your post thoroughly enough. post a link to your host. May ask you for the code later, but making it sort DESC instead of ASC is going to be pretty straight-forward. And what you want it to do seems pretty much the way anyone would expect it to behave.

DCBT
06-21-2006, 10:58 PM
by all means, glad to... the script is included in the 'bells and whistles' with the server I'm on. A basic paste and use. I have it in operation on the site http://www.mariahlagrande.com It seems like it should be easy that is what the info about it claimed....but.... of the tech help with the server; one person said all I had to do was change ASC to DSC( but that had no effect). most had no clue, and the last one said it couldn't be done. And you are right, newest to oldest makes a lot more sense, cause nobody wants to wade thru a 100 old messages 10 at a time to get to the new stuff. I don't know why it was written that way...
But if for some reason tere is something 'weird' about it... I'm not against setting up a diff book
thanks :)

russell
06-22-2006, 01:13 AM
dead link u posted?

by chance should ASC to DSC be ASC to DESC?

DCBT
06-22-2006, 10:08 AM
could be.... its been a few months since I tried that, I might be forgeting a letter.
dead link? you lost me on that... my server/host is websitesource.com

do you want me to paste the original GB script into a message?

DCBT
06-22-2006, 10:47 AM
opps, that should be websitesource.net

DCBT
07-01-2006, 04:27 PM
not as simple as it sounded????

russell
07-02-2006, 12:45 AM
paste the code that contains the query retrieving the data.

DCBT
07-04-2006, 10:31 AM
######################################################################
# DATA HANDLER SETUP #
######################################################################

my @ADD_FORM_DHM_CONFIG_PARAMS = (
-TYPE => 'CGI',
-CGI_OBJECT => $CGI,
-DATAHANDLERS => [qw(
Exists
HTML
String
)],

-FIELD_MAPPINGS => {
'fname' => 'First Name',
'lname' => 'Last Name',
'email' => 'Email',
'location' => 'Location',
'comments' => 'Comments',
},

-RULES => [
-ESCAPE_HTML_TAGS => [
-FIELDS => [qw(
*
)],
],

-SUBSTITUTE_ONE_STRING_FOR_ANOTHER => [
-FIELDS => [qw(
*
)],
-ORIGINAL_STRING => '"',
-NEW_STRING => "''"
],

-IS_FILLED_IN => [
-FIELDS => [qw(
comments
)]
]
]
);

my @DATA_HANDLER_MANAGER_CONFIG_PARAMS = (
-ADD_FORM_DHM_CONFIG_PARAMS => \@ADD_FORM_DHM_CONFIG_PARAMS
);

######################################################################
# DATASOURCE SETUP #
######################################################################

my @DATASOURCE_FIELD_NAMES = qw(
record_id
fname
lname
location
email
comments
reviewed_by_admin
date_time_posted
);

my šSIC_INPUT_WIDGET_DEFINITIONS = (
lname => [
-DISPLAY_NAME => 'Last Name',
-TYPE => 'textfield',
-NAME => 'lname',
-SIZE => 30,
-MAXLENGTH => 80
],

fname => [
-DISPLAY_NAME => 'First Name',
-TYPE => 'textfield',
-NAME => 'fname',
-SIZE => 30,
-MAXLENGTH => 80
],

location => [
-DISPLAY_NAME => 'Location',
-TYPE => 'textfield',
-NAME => 'location',
-SIZE => 30,
-MAXLENGTH => 80
],

email => [
-DISPLAY_NAME => 'Email',
-TYPE => 'textfield',
-NAME => 'email',
-SIZE => 30,
-MAXLENGTH => 80
],

comments => [
-DISPLAY_NAME => 'Comments',
-TYPE => 'textarea',
-NAME => 'comments',
-ROWS => 6,
-COLS => 30,
-WRAP => 'VIRTUAL'
]
);

my @BASIC_INPUT_WIDGET_DISPLAY_ORDER = qw(
fname
lname
location
email
comments
);

my @INPUT_WIDGET_DEFINITIONS = (
-BASIC_INPUT_WIDGET_DEFINITIONS => \šSIC_INPUT_WIDGET_DEFINITIONS,
-BASIC_INPUT_WIDGET_DISPLAY_ORDER => \@BASIC_INPUT_WIDGET_DISPLAY_ORDER
);

my @BASIC_DATASOURCE_CONFIG_PARAMS = (
-TYPE => 'File',
-CREATE_FILE_IF_NONE_EXISTS => 1,
-FILE => "$DATAFILES_DIRECTORY/guestbook.dat",
-COMMENT_PREFIX => '#',
-FIELD_DELIMITER => '|',
-FIELD_NAMES => \@DATASOURCE_FIELD_NAMES,
-KEY_FIELDS => ['record_id'],
-FIELD_TYPES => {
record_id => 'Autoincrement'
}
);

my @DATASOURCE_CONFIG_PARAMS = (
-BASIC_DATASOURCE_CONFIG_PARAMS => \@BASIC_DATASOURCE_CONFIG_PARAMS,
);

######################################################################
# MAILER SETUP #
######################################################################

my @MAIL_CONFIG_PARAMS = (
-TYPE => 'Sendmail'
);

my @EMAIL_DISPLAY_FIELDS = qw(
subject
abstract
full_text
);

my @ADD_EVENT_MAIL_SEND_PARAMS = (
-FROM => $CGI->param('email'),
-TO => 'you@yourdomain.com',
-REPLY_TO => 'you@yourdomain.com',
-SUBJECT => 'Guestbook Addition'
);

my @MAIL_SEND_PARAMS = (
-ADD_EVENT_MAIL_SEND_PARAMS => \@ADD_EVENT_MAIL_SEND_PARAMS,
);

##################################################################
# LOGGING SETUP #
##################################################################

my @LOG_CONFIG_PARAMS = (
-TYPE => 'File',
-LOG_FILE => "$DATAFILES_DIRECTORY/guestbook.log",
-LOG_ENTRY_SUFFIX => '|' . _generateEnvVarsString() . '|',
-LOG_ENTRY_PREFIX => 'Guestbook|'
);

sub _generateEnvVarsString {
my @env_values;

my $key;
foreach $key (keys %ENV) {
push (@env_values, "$key=" . $ENV{$key});
}
return join ("\|", @env_values);
}

######################################################################
# VIEW SETUP #
######################################################################

my @VALID_VIEWS = qw(
CSSView
AddAcknowledgementView
AddRecordConfirmationView
SessionTimeoutErrorView
AddRecordView
GuestbookView
);

my @VIEW_DISPLAY_PARAMS = (
-INPUT_WIDGET_DEFINITIONS => \@INPUT_WIDGET_DEFINITIONS,
-APPLICATION_LOGO => 'logo.gif',
-APPLICATION_LOGO_HEIGHT => '40',
-APPLICATION_LOGO_WIDTH => '353',
-APPLICATION_LOGO_ALT => 'Guestbook Demo',
-HTTP_HEADER_PARAMS => [-EXPIRES => '-1d'],
-DOCUMENT_ROOT_URL => '/',
-IMAGE_ROOT_URL => '/cp/images/Extropia',
-LINK_TARGET => '_self',
-SCRIPT_DISPLAY_NAME => 'Guestbook',
-SCRIPT_NAME => $CGI->script_name(),
-EMAIL_DISPLAY_FIELDS => \@EMAIL_DISPLAY_FIELDS,
-HOME_VIEW => 'GuestbookView',
-FIELD_NAME_MAPPINGS => {
fname => "First Name",
lname => "Last Name",
email => "Email",
location => "Location",
comments => "Comments"
},
-DISPLAY_FIELDS => [qw(
fname
lname
email
location
comments
)],
-SELECTED_DISPLAY_FIELDS => [qw(
fname
lname
email
location
comments
)],
-SORT_FIELDS => [qw(
fname
)]
);

DCBT
07-04-2006, 10:33 AM
######################################################################
# FILTER SETUP #
######################################################################

my @HTMLIZE_FILTER_CONFIG_PARAMS = (
-TYPE => 'HTMLize',
-CONVERT_DOUBLE_LINEBREAK_TO_P => 1,
-CONVERT_LINEBREAK_TO_BR => 1,
);

my @CHARSET_FILTER_CONFIG_PARAMS = (
-TYPE => 'CharSet'
);

my @EMBED_FILTER_CONFIG_PARAMS = (
-TYPE => 'Embed',
-ENABLE => 0
);

my @VIEW_FILTERS_CONFIG_PARAMS = (
\@HTMLIZE_FILTER_CONFIG_PARAMS,
\@CHARSET_FILTER_CONFIG_PARAMS,
\@EMBED_FILTER_CONFIG_PARAMS
);


######################################################################
# ACTION/WORKFLOW SETUP #
######################################################################

my @ACTION_HANDLER_LIST = qw(
DisplayCSSViewAction
DisplaySessionTimeoutErrorAction
DownloadFileAction
DisplayAddFormAction
DisplayAddRecordConfirmationAction
ProcessAddRequestAction
DisplayBasicDataViewAction
DefaultAction
);

my @ACTION_HANDLER_ACTION_PARAMS = (
-ACTION_HANDLER_LIST => \@ACTION_HANDLER_LIST,
-ADD_ACKNOWLEDGEMENT_VIEW_NAME => 'AddAcknowledgementView',
-ADD_RECORD_CONFIRMATION_VIEW_NAME => 'AddRecordConfirmationView',
-ALLOW_ADDITIONS_FLAG => 1,
-ADD_FORM_VIEW_NAME => 'AddRecordView',
-ADD_EMAIL_BODY_VIEW => 'AddEventEmailView',
-BASIC_DATA_VIEW_NAME => 'GuestbookView',
-CGI_OBJECT => $CGI,
-CSS_VIEW_URL => $CGI->script_name() . "?display_css_view=on",
-CSS_VIEW_NAME => "CSSView",
-DATA_HANDLER_MANAGER_CONFIG_PARAMS => \@DATA_HANDLER_MANAGER_CONFIG_PARAMS,
-DEFAULT_SORT_FIELD1 => 'title',
-DEFAULT_SORT_FIELD2 => 'abstract',
-DISPLAY_ACKNOWLEDGEMENT_ON_ADD_FLAG => 1,
-DISPLAY_CONFIRMATION_ON_ADD_FLAG => 1,
-DATASOURCE_CONFIG_PARAMS => \@DATASOURCE_CONFIG_PARAMS,
-HIDDEN_ADMIN_FIELDS_VIEW_NAME => 'HiddenAdminFieldsView',
-URL_ENCODED_ADMIN_FIELDS_VIEW_NAME => 'URLEncodedAdminFieldsView',
-LOG_CONFIG_PARAMS => \@LOG_CONFIG_PARAMS,
-MAIL_CONFIG_PARAMS => \@MAIL_CONFIG_PARAMS,
-MAIL_SEND_PARAMS => \@MAIL_SEND_PARAMS,
-SEND_EMAIL_ON_ADD_FLAG => 0,
-SESSION_TIMEOUT_VIEW_NAME => 'SessionTimeoutErrorView',
-VIEW_FILTERS_CONFIG_PARAMS => \@VIEW_FILTERS_CONFIG_PARAMS,
-VIEW_DISPLAY_PARAMS => \@VIEW_DISPLAY_PARAMS,
-VALID_VIEWS => \@VALID_VIEWS,
-VIEW_LOADER => $VIEW_LOADER,
-MAX_RECORDS_PER_PAGE => $CGI->param('records_per_page') || 10,
-SORT_FIELD1 => $CGI->param('sort_field1') || 'category',
-SORT_FIELD2 => $CGI->param('sort_field2') || 'fname',
-SORT_DIRECTION => $CGI->param('sort_direction') || 'ASC',
-SIMPLE_SEARCH_STRING => $CGI->param('simple_search_string') || "",
-FIRST_RECORD_ON_PAGE => $CGI->param('first_record_to_display') || 0,
-LAST_RECORD_ON_PAGE => $CGI->param('first_record_to_display') || "0",
-KEY_FIELD => 'record_id',
-PAGE_TOP_VIEW => 'PageTopView',
-PAGE_BOTTOM_VIEW => 'PageBottomView'
);

######################################################################
# LOAD APPLICATION #
######################################################################

my $APP = new Extropia::App::DBApp(
-ACTION_HANDLER_ACTION_PARAMS => \@ACTION_HANDLER_ACTION_PARAMS,
-ACTION_HANDLER_LIST => \@ACTION_HANDLER_LIST,
-VIEW_DISPLAY_PARAMS => \@VIEW_DISPLAY_PARAMS
) or die("Unable to construct the application object in " .
$CGI->script_name() . ". Please contact the webmaster.");

print $APP->execute();

DCBT
08-07-2006, 05:44 PM
yoo hoo... were you abducted by aliens? perhaps suffering amnesia? Brain blowout from that guest book script? :confused: :(

russell
08-08-2006, 01:24 PM
try changing this line

SORT_DIRECTION => $CGI->param('sort_direction') || 'ASC',

to DESC

also, look at the sort fields. looks like u can sort on any field u want, just need to put it into the correct paramaters

may also try posting this in the Perl forum

DCBT
08-08-2006, 09:32 PM
will try

DCBT
08-08-2006, 09:41 PM
that didn't do it

russell
08-08-2006, 10:14 PM
changed the sort field to date?

DCBT
08-09-2006, 04:09 PM
No I hadn't. Did however take your suggestion about posting in Perl and got a response from the 'pinesol pirate' . So will try these new suggestions and see what happens

russell
08-09-2006, 05:23 PM
i put another suggestion over there in the perl category
http://www.webdeveloper.com/forum/showpost.php?p=618655&postcount=5

DCBT
11-09-2006, 04:15 PM
They keep telling me its easy
so why can't I find anyone who understands it????????? :(


docs at....

http://www.extropia.com/support/docs/webdb/
and
http://www.extropia.com/support/docs/adt

> it says; :mad:
>
> """Extropia's WebGuestbook is "configurable so that you can specify
> what your guestbook file looks like and how the script-generated
> responses are displayed. Most of the configuration takes little more
> than a knowledge of HTML, so it is fairly easy to use. If configured to
> do so, WebGuestbook will email the guestbook administrator the text of
> new entries as well as add them to the guestbook. The script will also
> respond to new entrants with a configurable "Thank you" message. Thus,
> there is no need to continually monitor the page. Finally, the
> application comes with the capability of "four letter word" filtering
> for a child-safe guestbook. You can censor words by adding them to a
> list of "bad words." """"
:confused: :(