Donate Share

SKGB (SK Guestbook)

Tracker: Support Requests

5 what if there are NO guestbook entries? - ID: 1388362
Last Update: Comment added ( nobody )

Hello, I'm loving this guestbook! I have modified it
so I could use it as a content manager for a section
on my website. Sometimes, it will need to display
nothing at all; no messages. But when I delete the
entry and go to view them, I see it gets hung on line
190...

163 'read guestbook text file
164 IF (perform="post" OR perform="view" OR
perform="details" OR (perform="admin" AND (act= "" OR
((act="restoreBackup" OR act="createBackup" OR
act="options") AND NOT submit="Cancel") OR act="save"
OR act="delete"))) THEN
165 'specify the file containing the posts
167 filePath=server.mappath(".") & fileLocation

168 'NOTE: Because adding post to beginning of
file, can't use 'append' feature, must rewrite file.
169 'open the file for reading
170 Set fileString = CreateObject
("Scripting.FileSystemObject")
171 IF (perform="admin" AND act="restoreBackup")
THEN
172 IF fileString.FileExists(filePath
& ".backup")=true THEN
173 Set theFile =
fileString.OpenTextFile((filePath & ".backup"), 1,
False)
174 'store all the posts in a
variable and then close
175 allPosts = theFile.readall
176 theFile.Close
177 END IF
178 ELSEIF (perform="admin" AND act="options")
THEN
179 filePath = server.mappath(".") &
headerLocation
180 Set theFile = fileString.OpenTextFile
(filePath, 1, False)
181 headerContents = theFile.readall
182 theFile.Close
183 filePath = server.mappath(".") &
footerLocation
184 Set theFile = fileString.OpenTextFile
(filePath, 1, False)
185 footerContents = theFile.readall
186 theFile.Close
187 ELSE
188 Set theFile = fileString.OpenTextFile
(filePath, 1, True)
189 'store all the posts in a variable
and then close
190 allPosts = theFile.readall
191 theFile.Close
192 END IF
193 END IF

I guess what my question is, if there are NO entries,
how can I get the page to display nothing?

Thank you for your help.

Heather
wolfrunner66@yahoo.com


Nobody/Anonymous ( nobody ) - 2005-12-22 20:35

5

Open

None

Nobody/Anonymous

Install Problem (example)

None

Public


Comments ( 3 )




Date: 2006-01-04 19:34
Sender: nobody

Logged In: NO

I haven't heard anything yet. I hope I didn't miss your
email. I keep trying to login so my user info shows up,
but nothing. Please email me back at the listed email
above. Thanks!


Date: 2006-01-04 19:15
Sender: nobody

Logged In: NO

yes, i too would like to know


Date: 2006-01-04 19:13
Sender: nobody

Logged In: NO

I am having this problem...


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.