Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/67377?pagenum=1
05 November 2025, 14:46
Topic
Classicmotorcycling
Greeting Card Mod 3.6 (RC1)
30 June 2008, 22:37
Rolling on from this MOD over 6 years ago: Greeting Card Mod I have re-written the Greeting Card to now work off the Forum database and a few other things including easy to install (being 1 out 10 and 1 being the easiest). I have included 10 Greeting Cards to get you started and all appears to work fine on Access & MSSQL.
I have also made it work using the forums inc_mail.asp so there is no need for a special mail component.
I have removed the link until the code for this mod is sanitised against SQL injection, currently it is not. I found several request variables in the _preview.asp file that were not being sanitised prior to using in a query.<
Classicmotorcycling
01 July 2008, 06:59
HuwR,
I have rechecked the code and made the changes now it should be right on all the files. Do you want to put the link back up?
<
HuwR
01 July 2008, 07:03
did you also check greeting_cards_get.asp ? I think that had some vulnerabilities too<
Classicmotorcycling
01 July 2008, 07:17
All files where chaecked and the zip updated...<
HuwR
01 July 2008, 07:28
ok great feel free to put the link back up<
texanman
01 July 2008, 18:50
Hi,
I am getting this error message when I click on "Cards" in the Admin Section.
Microsoft OLE DB Provider for SQL Server error '80040e14' Incorrect syntax near '*'. /greeting_cards_clean.asp, line 92
line 92: set rs = conn.execute (strsql)
The two lines above it are:
strSQL = "DELETE * FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE" _ & "< #" & rev & "#;"
Any idea what the problem is? Thanks <
ruirib
01 July 2008, 18:51
Remove the '*', so that the SQL statement is "DELETE FROM " &...<
mdelcour2000
01 July 2008, 19:18
VERY IMPRESSIVE!<
leatherlips
01 July 2008, 20:27
When I go into General Settings and click "Send Config" I get this error:
Code:
You need to put in a SMTP Server Back Please enter the greetings URL!
Back
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/forumtest/greeting_cards_docard.asp, line 188
<
texanman
01 July 2008, 20:37
Originally posted by ruirib Remove the '*', so that the SQL statement is "DELETE FROM " &...
Thanks ruirib Tried that but still gives the same error <
Carefree
01 July 2008, 21:01
Originally posted by leatherlips When I go into General Settings and click "Send Config" I get this error:
Code:
You need to put in a SMTP Server Back Please enter the greetings URL!
Back
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/forumtest/greeting_cards_docard.asp, line 188
In greeting_cards_docard.asp, lines 166-170, replace with:
Code:
Sub general mailserver = strMailServer url = strForumURL myname = Request.Form("myname") days = Request.form("days")
That one's rather obvious, there are differing quantities of opening and closing parentheses. Eliminate the final closing parenthesis.<
mdelcour2000
01 July 2008, 23:01
thanks Carefree, I will do that. Also, when deleting the images, the thumb seems to not be there.<
Carefree
01 July 2008, 23:08
That's a permissions error. In Windows Explorer, browse to the forum directory. Right-click, select properties. Select the Security tab.
Look in the top window of the security tab for "Internet Guest Account" or IUSR-(Computer Name).
If it's not there, you'll have to add it. Click "Add", type in IUSR and click check names. It'll show up. Give it "read" permission only.
After it's there, click the "advanced" button on bottom right.
Check the box "Replace permission entries on all child objects ...".
Click apply. When it's done, your photos will show up.<
texanman
01 July 2008, 23:15
Originally posted by mdelcour2000 ok, when I try to delete a card, that I added, I am getting this error:
That one's rather obvious, there are differing quantities of opening and closing parentheses. Eliminate the final closing parenthesis.
Now a new error:
Microsoft VBScript runtime error '800a000d' Type mismatch: 'chkStringRequest' /greeting_cards_remcardcat.asp, line 109
<
mdelcour2000
01 July 2008, 23:43
yeah I'm getting the same error<
mdelcour2000
01 July 2008, 23:48
ok, I am also getting this error when trying to delete dead cards:
Greeting Cards Cleaned Microsoft OLE DB Provider for SQL Server error '80040e14'
Incorrect syntax near '#'.
/default/greeting_cards_clean.asp, line 92
The line above is: & "< #" & rev & "#;"<
texanman
01 July 2008, 23:53
Try ruirib's fix above and see if it works for you. I tried and it didn't fix the problem.<
mdelcour2000
01 July 2008, 23:57
Yeah, it only gave me this error when I did that. I had the same error you had before I applied Ruirib's fix <
Carefree
02 July 2008, 00:14
Ok, in greeting_cards_clean.asp, change the whole block of instruction from lines 90-92:
Search for:
Code:
strSQL = "DELETE * FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE" _ & "< #" & rev & "#;" set rs = conn.execute (strsql)
Change that to say:
Code:
strSQL = "DELETE * FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< #" & rev & "#" set rs = conn.execute(strSQL) if rs.EOF or rs.BOF then ' Not Found Response.Write "Deleted" end if rs.Close set rs = Nothing
At the end of that file, search for:
Code:
rs.close
%>
Delete the line saying:
rs.close <
Carefree
02 July 2008, 00:21
Originally posted by mdelcour2000 ok, when I try to delete a card, that I added, I am getting this error:
That one's rather obvious, there are differing quantities of opening and closing parentheses. Eliminate the final closing parenthesis.
Now a new error:
Microsoft VBScript runtime error '800a000d' Type mismatch: 'chkStringRequest' /greeting_cards_remcardcat.asp, line 109
Sorry, I was blinded by parentheses. The correct line 109 should read:
Thanks carefree greeting_cards_clean.asp fix still doesn't work.
The fix for greeting_cards_remcardcat.asp works only after you remove the "*" after "delete" from lines 112 and 113 (The ruirib's fix above)<
Carefree
02 July 2008, 01:58
I installed it, tested the cleaning file, works perfectly with my change. Here's my file in .txt format: greeting_cards_clean<
texanman
02 July 2008, 02:12
why is this giving me a security warning? LOL<
Carefree
02 July 2008, 02:48
Don't worry about the security warning, just means the certificate wasn't issued by someone that MS recognizes as having authority. A txt file cannot hurt your browser.<
Maxime
02 July 2008, 02:49
And what the original file of this MOD at summer updated with touts post for that of the forum. In order to not seek too much. Thank you<
Classicmotorcycling
02 July 2008, 03:42
I put it through a heap of testing on 2 installs of Snitz to make sure it was working on a fresh install of Snitz that was using Access and MS SQL and never had the errors that some are having.<
texanman
02 July 2008, 08:20
Originally posted by Carefree I installed it, tested the cleaning file, works perfectly with my change. Here's my file in .txt format: greeting_cards_clean
Carefree, I used your copy and still same error. hmmm<
ruirib
02 July 2008, 08:27
I'm not sure what type is DateSent (guessing datetime), but the syntax used is valid just for Access. SQL Server doesn't use '*' in DELETE statements and dates aren't delimited by '#'.<
HuwR
02 July 2008, 08:31
Originally posted by ruirib I'm not sure what type is DateSent (guessing datetime), but the syntax used is valid just for Access. SQL Server doesn't use '*' in DELETE statements and dates aren't delimited by '#'.
and it is the reason we do dates in the forum as a string not a date<
texanman
02 July 2008, 09:12
rurib & HuwR: This is the date format in the code:
For SQ are you saying we take out those "#"'s?
Thanks
yes, replace them with ', however you will need to ascertain whether your server wants the adte as mm/dd/yy or dd/mm/yy and adjust the rev = (rmonth & "/" & rday & "/" &ryear ) accordingly<
texanman
02 July 2008, 09:25
Tried both date types and got the same error:
ADODB.Recordset error '800a0e78' Operation is not allowed when the object is closed. /greeting_cards_clean.asp, line 89 I changed the line as:
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'" <
HuwR
02 July 2008, 09:32
an object closed error means you don't have an open connection, it has nothing to do with what the query is, have you deleted or commented any lines ?<
texanman
02 July 2008, 09:58
Thanks HuwR, You are the man!!
This is original code modified using your suggestion (works fine now in SQL):
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< #" & rev & "#" set rs = conn.execute(strSQL) if rs.EOF or rs.BOF then ' Not Found Response.Write "Deleted" end if rs.Close set rs = Nothing
Thanks again<
HuwR
02 July 2008, 10:21
glad you have it working now (so far at least)<
texanman
02 July 2008, 11:12
LOL @ so far . You got that right.
The issue brought up by leatherlips still needs fixing.
It took out some of the error. Now it only says this: ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal.
/forumtest/greeting_cards_docard.asp, line 188 Line 188 is: rs("mailserver") = strMailServer
<
Carefree
02 July 2008, 12:35
I found the problem. Delete lines 188-189, the fields he's trying to update do not exist in that table.<
texanman
02 July 2008, 12:50
Genius!!!!!!!!!!!!!!
Thanksssssssssss
Now everything works fine for SQL<
Carefree
02 July 2008, 14:03
You're welcome.<
Maxime
04 July 2008, 14:07
I applied all updates proposed here
Change the number of days before expiry of the card ADODB.Recordset error '800a0cc1'
Unable to find the object in the collection corresponding to the name or the reference asked ordinal.
/forum/greeting_cards_docard.asp, line 188
Removing card sent before the deadline expiry
ADODB.Recordset error '800a0e78'
This operation is not permitted if the subject is closed.
/forum/greeting_cards_clean.asp, line 88 <
texanman
04 July 2008, 16:11
I found the problem. Delete lines 188-189, the fields he's trying to update do not exist in that table.
You have missed that one for the first error.
For the second error if you are using SQL replace lines 90-92 with:
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'" set rs = conn.execute (strsql)<
mdelcour2000
04 July 2008, 19:02
I have a question. How could I make the "Thumbs" clickable so that anyone may view them full size in a different window?
Otherwise, I think that this MOD should be right up there with the best. I really like it.<
Carefree
04 July 2008, 22:01
In "Greeting_Cards_Cat.asp", look for the following (appx line 94):
Is there a fully functioning demo available to peruse?<
weeweeslap
11 July 2008, 18:52
http://www.coastercrazy.com/forum/greeting_cards.asp I have only added 1 additional picture and category for greeting cards. I have not had much time to play with but it works good so far from testing and the public feedback.<
Andy Humm
12 July 2008, 03:52
Looks good, is you version as per David Greening's mod. Also, am I right in saying that the download available has all the errors above ironed out?<
Classicmotorcycling
12 July 2008, 06:10
It certianly looks like the Greeting Card Mod 3.6 I put together as it has the same images and categories..<
modifichicci
12 July 2008, 06:12
Are the include in all files all necessary?
<!--#INCLUDE FILE="config.asp"--> <!--#INCLUDE FILE="inc_func_secure.asp" --> <!--#INCLUDE FILE="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header.asp" --> <!--#INCLUDE FILE="inc_func_member.asp" --> <!--#INCLUDE FILE="inc_moderation.asp" --> <!--#INCLUDE FILE="inc_subscription.asp" -->
<!--#include file="greeting_cards_function.asp"--><
weeweeslap
12 July 2008, 11:59
Andy, the one I downloaded worked right off the box. So mine still has the bugs other reported but since I am so cool, they don't show up for me <
Andy Humm
12 July 2008, 17:19
Having a try with the demo, a couple of questions: 1. Access to the Greetings Cards can the use be set to members levels?
2. Can the send card be set to automatically put your email address in from the member login and also the member name by default 3. Can the input boxesbe set as soon asyou place the cursor in the boxes it clears prompting statements, instead of having to block and delete..
4. I am making the assumption, that the format layout, colours and fonts are inline withe the rest of the forum settings
Looks good so far andy<
Classicmotorcycling
12 July 2008, 19:22
Hello Andy,
In answer to your questions:
1. I have not had time to set to member level access as it would be a total re-write of the Greeting Card Mod and calls to the MEMBERS table with extra fields required there for each member.
Originally posted by Andy Humm Having a try with the demo, a couple of questions: 1. Access to the Greetings Cards can the use be set to members levels?
2. Can the send card be set to automatically put your email address in from the member login and also the member name by default 3. Can the input boxesbe set as soon asyou place the cursor in the boxes it clears prompting statements, instead of having to block and delete..
4. I am making the assumption, that the format layout, colours and fonts are inline withe the rest of the forum settings
Looks good so far andy
2. I have changed it so that if the user is logged in, it will grab the users name and their e-mail address which they will not be able to change, but a visitor can enter there own detailts
3. I have put some javascript in to clear the fields in the form when you click on them
4. You assumption is incorrect for the Background and the Text, these are hard coded values that are listed in greeting_cards_cat.asp in lines 222 to 280 if you want to change them to suit your site
Enjoy. I have not seen the issues that others have when installing. I have tried the Greeting Card Mod 3.6 on multiple different sites with MS SQL and Access with it working first time as I stated in the original post. I have not tried on MySQL as I have not had the time to setup the database.
<
Andy Humm
15 July 2008, 08:04
Dave, Quality installed and only one observation: When you are in the admin and trying to delete a card from a category ie /forum/greeting_cards_docards.asp?func=delcard&f=get&cat=4 The maiin forum header is not shown, the background is balnk and the footer does not correspond with the same size settings as the rest of the footers..Does this whole function get wrapped into the main forum table seetings. I have up to the directory tree at the top,
File greeting_cards_docards.asp text <
Classicmotorcycling
16 July 2008, 06:48
Andy,
Here is the fix. I was originally going to have that in a pop-up and must of forgotten to put it back.
Originally posted by Andy Humm Dave, Quality installed and only one observation: When you are in the admin and trying to delete a card from a category ie /forum/greeting_cards_docards.asp?func=delcard&f=get&cat=4 The maiin forum header is not shown, the background is balnk and the footer does not correspond with the same size settings as the rest of the footers..Does this whole function get wrapped into the main forum table seetings. I have up to the directory tree at the top,
File greeting_cards_docards.asp text
Thank you Dave, we have the header back, but the table delete cards is not showing see image..
Can you advise or provide amended file Thank you Andy <
texanman
16 July 2008, 16:29
I am using the same files and it is showing what cards to delete.<
Andy Humm
16 July 2008, 16:34
Apologies, mine works now, Thank you Dave,(and Tex) I had a spelling mistake ooops..<
Andy Humm
16 July 2008, 17:05
Something you might want to consider: 1. If a message is added to the greeting card which is more than 255 charactors, you will receive the following error:
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. /forum/greeting_cards_send.asp, line 106 To fix this you need to amend the database properties.
Table: FORUM_GREETING_SENT Field: MESSAGE Properties change data type from text to memo
2. When you are compiling a message and whenready select preview, if you go back to edit the greeting, then do not reselect an image for use, you will receive the following error:
Microsoft JET Database Engine error '80040e14' Syntax error (missing operator) in query expression 'ID='. /forum/greeting_cards_preview.asp, line 115
Could there be a solution to keep the selected picture on the radio box in 'session' so that you don't have to reselect an image again, all the added text in the other fields remain.<
Classicmotorcycling
18 July 2008, 06:46
I have fixed the dbs file to have a memo field, so that should be right now.
I have put a "checked" to select the image as a quick fix, but if you are going back, you are obviously fixing something and most users will look to make sure that the right image is selected.
It is all updated in the original download for 3.6 RC1.<
Andy Humm
18 July 2008, 07:45
Thank you David, which file did you amend for "I have put a "checked" to select the image as a quick fix" Rgds Andy<
Classicmotorcycling
18 July 2008, 08:03
I updated greeting_cards_cat.asp
<
Carefree
18 July 2008, 09:28
I get 3 columns when the default categories are listed; however, when I add a few categories, I get an 80020009 error at line 84 (which is obviously an error itself).
I re-ran the dbs file (recreating the default categories), looks fine. Added categories and the error was back.<
Carefree
18 July 2008, 09:33
Interesting note: if the number of categories is divisible by 3, the error disappears again.<
texanman
18 July 2008, 10:45
Carefree Where do you get the error? I mean at what page?
I have 13 categories and no error. I have the original files. I did not make the new updates Thanks<
Maxime
18 July 2008, 11:35
Page greeting_cards_clean.asp to line 86-92
strSQL = "DELETE FROM " & strTablePrefix & "GREETING_SENT WHERE SENTDATE< '" & rev & "'" set rs = conn.execute (strsql) if rs.EOF or rs.BOF then ' Not Found Response.Write "Deleted" end if rs.Close set rs = Nothing
Here is the code error when I try to delete expired cards
Removing card sent before the deadline expiry
ADODB.Recordset error '800a0e78'
This operation is not permitted if the subject is closed.
/forum/greeting_cards_clean.asp, line 88<
texanman
18 July 2008, 12:15
If you read pages 1 and 2, you will get the answer. Opps this looks like a new error.<
Andy Humm
18 July 2008, 12:32
Originally posted by Carefree I get 3 columns when the default categories are listed; however, when I add a few categories, I get an 80020009 error at line 84 (which is obviously an error itself).
Carefree did you get these errors post greeting_cards_cat.asp file edited by Classicmotorcycling 18 July 2008 : 08:03:20 <
Classicmotorcycling
18 July 2008, 15:50
I do not have the issue. I have the Greeting Cards added here: http://www.vncommodore.com/forum/greeting_cards.asp
This has the extra column in there and works fine. I have tested on Access and MS SQL and the system works fine from the download.
Andy, the only thing added to greeting_cards_cat.asp was at line 95, the word "checked" for the extra columns the file updated was in greeting_cards_gte.asp so there was 3 columns of categories.<
Carefree
18 July 2008, 15:57
The error appears in greeting_cards.asp; I first discovered it with 10 categories; deleted, rebuilt the table; gone. Added to 11 categories, checked again, error back. Added 12th, error gone again.<
Andy Humm
18 July 2008, 16:04
Hi Dave, Just uploaded new greeting_cards_gte.asp file and view three columns but underneath have error '80020009' /forum/greeting_cards_gte.asp, line 84 I have eight categories to start off with. However, if I add an additional category the error disappears and the Greeting Card Collection Centre and Top5 Category Tables show. Also adding another category ok, but when delete these two added categories, ie go back to my original eight, then the error above reappears? and the Greeting Card Collection Centre and Top5 Category Tables do not show
Further testing if I have either 8, 11 or 14 categories ie the latest cat is in middle column, the error occurs,. I tested the initial start with by deleteing the eighth cat and the error goes. It appears to work okay if the last or latest cat does not appear in centre column????<
Andy Humm
18 July 2008, 16:29
This is the new code: line 84 in red
Code:
count = rssubcat.RecordCount count = 1 do while not rssubcat.EOF and count<=5
I will re-write the function over this week-end and see what happens when I put in more than 20 categories on my test site(s). I'll let you know when it is fixed..<
Andy Humm
19 July 2008, 03:38
ok thanks andy<
Classicmotorcycling
19 July 2008, 21:47
OK, I have re-written the greeting_card_clean.asp which requires that file and the greeting_card_sent.asp files to be replaced. I have changed the way that the dates are inserted in to the GREETING_CARD_SENT table and it now doesn't kill anything newer that the specified older than the days put in the Greeting Card admin side.
I have also redone the greeting_card_gte.asp to allow you to specify the ammount of columns to show the categories accross your page. Just change the value at line 50 in the greeting_card_gte.asp file to the ammount of columns you want to display. All updates in the original download.
As far as I know, there are only 1 thing to work on now, and that is the following:
Getting the top greeting card to come up and if there is no greeting card sent or not enogh to randomize the cards displayed. This is not going to be a quick done fix.<
Andy Humm
20 July 2008, 20:01
Excellent, thank you David.. Does the parameter/value setting at line 50 greeting_card_gte.asp change both the number of columns shown in the categories headings on greeting_cards.asp as well as the number of columns of cards shown in greeting_cards_post_cats.asp I believe that the latter is set to three, irrespective of the line 50 setting. , Thanks you for the stirling work.<
Andy Humm
22 July 2008, 03:38
To save getting an error message if you fail to enter a title in the Greetings card input form and then send file: greetings_card_preview.asp find if message = "" then approx line 98 above that insert the following:
if title = "" then Response.Write "<font face=""" & strDefaultFontFace & """ color=""#FF0000"" size=""" & strdefaultFontSize & """><br>This Greeting Card Title is blank!<br></font>" & vbNewLine Response.Write "<font face=""" & strDefaultFontFace & """ size=""" & strdefaultFontSize & """>Please enter the Greetings Card Title that is missing<br />Thank You <br><a href=""javascript:history.back()"">Back</a></font>" & vbNewLine else then at line 174 add an additional end if<
Andy Humm
12 September 2008, 14:39
Correct, me if I am wrong, but if I alter the General Settings "Leave cards in db for xx days: to '0' then if I click on Remove Dead Cards (greeting_cards_clean.asp) it should remove all the cards stored in Table GREETINGS_SENT<
Carefree
13 September 2008, 11:39
Sounds logical to me. I'll check it when I get home next week.<