Mod: Recipe Book 2.1

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/60842?pagenum=1
05 November 2025, 01:59

Topic


Classicmotorcycling
Mod: Recipe Book 2.1
29 January 2006, 03:01


After a request from an e-mail from Per Serritzlev at www.assy.dk, I was able to MOD a recipe book to work with Snitz 3.4.X and it is available for download from: Mod: Recipe Book 2.2
I have tried to make it as easy as possible to install with only the 1 change to the inc_header.asp file to do a link to it in your menu.

Some of the features include:
  • All visitors can add a recipe
  • Recipes require Admin Approval
  • Only forum members can rate the recipe
  • Easy to install (1 being easy, 10 being hard, the install is a 1
  • Readme file to install included
  • )
So what are you waiting for? Enjoy.
Demo is at: VN Commodore Support Site
Update - Added 31 Jan 2006:
Ability to use with no other MODs installed (Added extra code to allow for the Language part with-out interfering with other Mods)<

 

Replies ...


MarkJH
29 January 2006, 08:45


Nice MOD. I'm sure the possibilities for reworking this for many other purposes are endless. smile<
MarcelG
30 January 2006, 02:21


Thanks David and Per for this one! Indeed what Mark says ; this mod can be used for anything!!! Great!<
Nijii
30 January 2006, 18:56


I have installed the MOD and got the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'fLang'
/forums/recipe.asp, line 1948

I need some help on this.<
Classicmotorcycling
30 January 2006, 21:07


Did you upload all your files. This is a languge file issue. I have not tried with out the Active Users installed, and will get back to you if it need it installed later today (Australian time).
<
tribaliztic
31 January 2006, 03:35


omg! =)
I'm gonna try and make an article system out of this (or is somebody else already doing this?). Thanks alot! <
Classicmotorcycling
31 January 2006, 04:18


So I gather a few like this MOD.. I tried to make it as easy as possible to install.<
tribaliztic
31 January 2006, 04:24


Is it a remake of the old links mod? Looks just like it =)
<
Classicmotorcycling
31 January 2006, 04:35


Not the old links MOD. Was a recipe application that had 47 files to work and the inital work to cut it down was from Per, and I did a re-hash of that to make it 3.4.X compatable, working fully and got the DB intergrated with the forum DB and got the language part to work with it.
Nothing to do with the links MOD at all. <
tribaliztic
31 January 2006, 05:04


Okay, you have to login to see my links, but it's almost exactly the same look. I'll try and install it now =)
<
Classicmotorcycling
31 January 2006, 05:07


MOD has been updated to cater for forums that do not have the Auctive users MOD installed and will fix your issue.
Originally posted by Nijii
I have installed the MOD and got the following error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'fLang'
/forums/recipe.asp, line 1948

I need some help on this.
Sorry about that. Should of checked on a non-modified version before submitting. Please download version 2.2 to over come your issue. All others who have downloaded it and it is working for them, then there is no need too, but if you want to, you can. bigsmile <
Classicmotorcycling
31 January 2006, 05:12


I did change the original look as I did not like the menu's on the left hand side if you where trying to keep your forum to a set width.
Originally posted by tribaliztic
Okay, you have to login to see my links, but it's almost exactly the same look. I'll try and install it now =)
Let me know how you go installing it. wink tongue <
tribaliztic
31 January 2006, 05:40


Hm.. got some errors on the dbs, is this tested on MySQL?

MOD: Recipe Book Mod 2.1

Dropping Table..
Table does not exist
--------------------------------------------------------------------------------

Dropping Table..
Table does not exist
--------------------------------------------------------------------------------

Dropping Table..
Table does not exist
--------------------------------------------------------------------------------

Dropping Table..
Table does not exist
--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE( RECIPE_ID INT (11) DEFAULT '' NOT NULL auto_increment , NAME varchar (150) NULL , URL varchar (255) NULL , KEYWORD varchar (255) NULL , DESCRIPTION text NULL , INGREDIENTS text NULL , POST_DATE varchar (100) NULL , HIT int NULL DEFAULT 0, CATEGORY int NULL DEFAULT 0, PARENT_ID int NULL DEFAULT 0, SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int NULL DEFAULT 0, VOTES int NULL DEFAULT 0, FILESIZE varchar (100) NULL , LICENSE varchar (100) NULL , LANG varchar (100) NULL , PLATFORM varchar (100) NULL , PUBLISHER varchar (100) NULL , PUBLISHER_URL varchar (100) NULL , UPLOADER varchar (100) NULL ,KEY FORUM_RECIPE_RECIPE_ID(RECIPE_ID))
Table already exists

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_CATEGORIES( CAT_ID INT (11) DEFAULT '' NOT NULL auto_increment , CAT_NAME varchar (100) NULL ,KEY FORUM_RECIPE_CATEGORIES_CAT_ID(CAT_ID))
Table created succesfully

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_RATING( RATING_ID INT (11) DEFAULT '' NOT NULL auto_increment , COMMENTS text NULL , RATING int NULL DEFAULT 0, RATE_BY int NULL DEFAULT 0, RECIPE int NULL DEFAULT 0, RATE_DATE varchar (100) NULL ,KEY FORUM_RECIPE_RATING_RATING_ID(RATING_ID))
Table created succesfully

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_SUBCATEGORIES( SUBCAT_ID INT (11) DEFAULT '' NOT NULL auto_increment , SUBCAT_NAME varchar (100) NULL , CAT_ID int NULL DEFAULT 0,KEY FORUM_RECIPE_SUBCATEGORIES_SUBCAT_ID(SUBCAT_ID))
Table created succesfully

--------------------------------------------------------------------------------

Adding new records.. INSERT INTO FORUM_RECIPE_CATEGORIES (CAT_NAME) VALUES ('Default')

Value(s) updated succesfully
--------------------------------------------------------------------------------

Adding new records.. INSERT INTO FORUM_RECIPE_SUBCATEGORIES (SUBCAT_NAME, CAT_ID) VALUES ('Default', '1')

Value(s) updated succesfully
--------------------------------------------------------------------------------


Database setup finished

<
Nijii
31 January 2006, 05:59


Originally posted by ClassicmotorcyclingSorry about that. Should of checked on a non-modified version before submitting. Please download version 2.2 to over come your issue. All others who have downloaded it and it is working for them, then there is no need too, but if you want to, you can. bigsmile
I will try and download the the new version later. Thanks!<
tribaliztic
31 January 2006, 06:24


Okay, cool! <
Helterskelter
31 January 2006, 12:20


Got this installed in 5 mins on my test site, and have a coule of idea's running.
How ever i did test if you couls add forum code and HTML, neither work, is there a way we couls add this in?
I do the like the basic's of this system could be reworked to personalise most people's forums with very little work.
Helter<
Nijii
31 January 2006, 17:16


Originally posted by Classicmotorcycling Update - Added 31 Jan 2006:
Ability to use with no other MODs installed (Added extra code to allow for the Language part with-out interfering with other Mods)
Thanks for the update. I have just downloaded the files and added them to my forum. Fantastic! Is there any mod one can use to add photos dish with? <
Classicmotorcycling
31 January 2006, 19:00


I am glad that you got it working...
Originally posted by Nijii
Thanks for the update. I have just downloaded the files and added them to my forum. Fantastic! Is there any mod one can use to add photos dish with?
I am working on getting the forum code to work with it now. I will not allow HTML code to work with it as it would open a big security hole in it.
I will look at adding pictures to it, maybe not with uploading, as I don't have the time for that side at the moment. wink bigsmile <
tribaliztic
01 February 2006, 03:12


Anyone got this working with MySQL? <
JBaldwin
02 February 2006, 12:24


When I add a recipe, I needed to edit it. When I try to edit the recipe, the section I try editing is deleted and I cannot add anything to that area again? I entered ingredients and realized I made an error. I went in to edit it, clicked on Update First Step and then went back to main forum (via the link). Now the ingredients for that recipe are gone and I cannot edit them to show up again?
So...I added another recipe (the same one) and then decided to delete the wrong one, now I cannot delete it. If i click on Delete Recipe, it ends up bringing me back to the Edit Recipe section which didn't work for me before? I'm a bit confused? LOl Can someone help me out? I am using an Access DB and of course the only changes I made were to inc_header.asp so I don't think it was something I did?
Thanks in advance. Jeff B

EDIT: Sorry, I should have posted this in MOD Implementation. You can see what I mean by viewing the recipe section: RECIPE<
Classicmotorcycling
03 February 2006, 01:48


Working on it this week-end as I have been real busy and will have it sorted. I have to replicate the error first, then I will have fix somethime this week-end. I never noticed it before, but we are all prone to forgetting something. smile I am not sure why it would be doing it, but I will find out and update the code.
I will also test on MySQL and find out what the issue is there, I wil also test on MS SQL 2000. I have only tested on Access as I have not had the others installed on my server before today.
<
JBaldwin
03 February 2006, 02:15


Uh Oh. Another thing to look into as well. After I submitted a recipe and I filled in my username as the CONTRIBUTOR; When another user logs in and views the same recipe that I just submitted, THAT users username shows as the one who contributed it. One of my users brought this to my attention.
He emailed me and said he saw the new recipe section and checked it out. It said he contributed the recipes that I had put up. LOL. He was just a little confused and was left scratching his head. LOL, no big deal but thought you should know.
Jeff B.<
Nijii
08 March 2006, 18:24


What code should I add to the recipe book so that only members of the forum can post new recipes but others can only see?

The reason for asking is that I have started getting all kinds of links being posted as new recipes although I have to approve them first. I have to deleted 37 og such entries daily for the past 4 days:-(

Disregard: I found my answer in the following topic http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61210<
seanbol
12 June 2007, 12:51


Is the recipe mod work with Access also?
If so, then why is it working???
I got error on instulation :(<
JJenson
12 June 2007, 13:11


yes it also works with access. You will want to post your error so someone will be able to help you with it. I had it running on an access database a few months back.<
seanbol
12 June 2007, 13:59


Here is my error when I click on the link recipe.asp

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1

/forum/recipe.asp, line 1902
<
AnonJr
12 June 2007, 14:15


Are you using Access or MySQL? the error you posted is for the MyODBC drivers - used with MySQL...<
seanbol
12 June 2007, 17:42


Access. But I thought the MOD is in Access!!!!
Do I need to download a different MOD?
Where am I wrong?<
AnonJr
12 June 2007, 20:45


The MOD uses whatever database you use for the forum... just for clarification, are you using a Windows host and IIS?<
seanbol
13 June 2007, 18:23


Then why am I getting MySQL errors?
I have uploaded the 2.2.<
seanbol
13 June 2007, 18:43


This is what happens when I go to "MOD Setup" and install the Recipe. There are some red errors that I will indicate with <<------

Dropping Table.. DROP TABLE FORUM_RECIPE
-2147467259 | [TCX][MyODBC]Unknown table 'forum_recipe' <<-------------------------------

--------------------------------------------------------------------------------

Dropping Table..
Table dropped succesfully
--------------------------------------------------------------------------------

Dropping Table..
Table dropped succesfully
--------------------------------------------------------------------------------

Dropping Table..
Table dropped succesfully
--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE( RECIPE_ID INT (11) DEFAULT '' NOT NULL auto_increment , NAME varchar (150) NULL , URL varchar (255) NULL , KEYWORD varchar (255) NULL , DESCRIPTION text NULL , INGREDIENTS text NULL , POST_DATE varchar (100) NULL , HIT int NULL DEFAULT 0, CATEGORY int NULL DEFAULT 0, PARENT_ID int NULL DEFAULT 0, SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int NULL DEFAULT 0, VOTES int NULL DEFAULT 0, FILESIZE varchar (100) NULL , LICENSE varchar (100) NULL , LANG varchar (100) NULL , PLATFORM varchar (100) NULL , PUBLISHER varchar (100) NULL , PUBLISHER_URL varchar (100) NULL , UPLOADER varchar (100) NULL ,KEY FORUM_RECIPE_RECIPE_ID(RECIPE_ID))
CREATE TABLE FORUM_RECIPE( RECIPE_ID INT (11) DEFAULT '' NOT NULL auto_increment , NAME varchar (150) NULL , URL varchar (255) NULL , KEYWORD varchar (255) NULL , DESCRIPTION text NULL , INGREDIENTS text NULL , POST_DATE varchar (100) NULL , HIT int NULL DEFAULT 0, CATEGORY int NULL DEFAULT 0, PARENT_ID int NULL DEFAULT 0, SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int NULL DEFAULT 0, VOTES int NULL DEFAULT 0, FILESIZE varchar (100) NULL , LICENSE varchar (100) NULL , LANG varchar (100) NULL , PLATFORM varchar (100) NULL , PUBLISHER varchar (100) NULL , PUBLISHER_URL varchar (100) NULL , UPLOADER varchar (100) NULL ,KEY FORUM_RECIPE_RECIPE_ID(RECIPE_ID))

-2147217911 | [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int <<-----------------

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_CATEGORIES( CAT_ID INT (11) DEFAULT '' NOT NULL auto_increment , CAT_NAME varchar (100) NULL ,KEY FORUM_RECIPE_CATEGORIES_CAT_ID(CAT_ID))
Table created succesfully

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_RATING( RATING_ID INT (11) DEFAULT '' NOT NULL auto_increment , COMMENTS text NULL , RATING int NULL DEFAULT 0, RATE_BY int NULL DEFAULT 0, RECIPE int NULL DEFAULT 0, RATE_DATE varchar (100) NULL ,KEY FORUM_RECIPE_RATING_RATING_ID(RATING_ID))
Table created succesfully

--------------------------------------------------------------------------------

Creating table(s)... CREATE TABLE FORUM_RECIPE_SUBCATEGORIES( SUBCAT_ID INT (11) DEFAULT '' NOT NULL auto_increment , SUBCAT_NAME varchar (100) NULL , CAT_ID int NULL DEFAULT 0,KEY FORUM_RECIPE_SUBCATEGORIES_SUBCAT_ID(SUBCAT_ID))
Table created succesfully

--------------------------------------------------------------------------------

Adding new records.. INSERT INTO FORUM_RECIPE_CATEGORIES (CAT_NAME) VALUES ('Default')

Value(s) updated succesfully
--------------------------------------------------------------------------------

Adding new records.. INSERT INTO FORUM_RECIPE_SUBCATEGORIES (SUBCAT_NAME, CAT_ID) VALUES ('Default', '1')

Value(s) updated succesfully
--------------------------------------------------------------------------------

If there were errors please post a question in the MOD Implementation Forum at
Snitz Forums

<
AnonJr
13 June 2007, 20:12


Double-check the DBS file - it looks like its trying to create the same table twice and that may be causing the error.
As to the database, you would have to be using MySQL to get MySQL errors... unless I'm really missing something.<
CodeMan7
17 June 2007, 22:05


Originally posted by seanbol
Here is my error when I click on the link recipe.asp

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1

/forum/recipe.asp, line 1902


I'm getting the same error. I'm using Windows and IIS server.
I'm not getting any errors in setting up the database though.
<
CodeMan7
18 June 2007, 14:41


I'm not sure why I'm getting that error. I'm using Snitz v3.4.06 also and I also have the Active Users mod. The Active Users mod is working fine.
I am using Mysql, but I don't think that makes a difference.
I was able to get into the main menu of the Recipe mod by commenting out the lines which were producing the error, but after I selected "Add New Recipe" and filled it out, I got another error when I tried to submit it. (That could be because of a null value maybe because of no new records?)

Anyway, there are several different types of mods that I would like to design using this as a prototype, but I can't even get this one working. <
AnonJr
18 June 2007, 14:50


Did you get the same message as seanbol when you ran the DBS script?<
CodeMan7
18 June 2007, 16:37



No, I keep getting the same error below as he got. I get this everywhere there is a "SHOW = " statement in the syntax. I can comment these statements out (and the code around them) to get to the Recipe main menu, but I can't do anything which involves the database table. I get the form to add a new recipe and I can fill it out. But when I hit submit, I get an error.
"Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1

/forum/recipe.asp, line 1902 "


To be honest I don't remember how it went when I first ran the DB script. I've run a couple of more times and it doesn't report any errors.
<
AnonJr
18 June 2007, 18:13


I'm not as familiar with MySQL as I'd like to be... I wonder if the SHOW keyword is one of those issues like "TOP". Might be worth looking into.<
CodeMan7
18 June 2007, 20:43


I'm not much help, Anon. I've been away from coding for a long time. But all the errors seem to point to the part of the syntax that has "SHOW = 1" or "SHOW = 0".
I did find something else. When I went to drop the tables, the first one did not exist, according to the script. When I added them back in, it said the first table existed. The other three tables were fine.
I keep trying to drop the tables and recreate them. No matter what I do, I get the message "table already exists" when I try to create 'Recipe'. Other than that, I get no errors when setting up the tables.
So the problem is not only with the syntax but also the first table is being created wrong.
<
Shaggy
19 June 2007, 04:18


Response.write that SQL string and the problem may become apparent or post it here if not.
<
AnonJr
19 June 2007, 06:20


Also, did you go into whatever DB manager you use and check to see if the tables really do exist?<
CodeMan7
19 June 2007, 13:15


Yes, I was just going to post that. I dumped the whole Snitz database last night. I went through it line by line. The Recipe table does not exist. The other 3 recipe tables do, i.e. Recipe_Categories, Recipe_Rating, Recipe_Subcategories.
I also cleared my Firefox cache. So I don't understand how it could say that the table exists.
I was thinking that maybe I should just put the Recipe table into what I dumped last night and rebuild the whole database. On the other hand, with all the syntax errors, I wonder if it is worth it?
If others have gotten this installed, I wonder what is different about their setup? <
CodeMan7
19 June 2007, 13:27


Originally posted by Shaggy
Response.write that SQL string and the problem may become apparent or post it here if not.

Shaggy, here is the error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-5.0.41-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW = 1' at line 1
/forums/recipe.asp, line 1045

Here is the line the error is referring to:
strSQL = "SELECT COUNT(RECIPE_ID) AS RECIPESCOUNT FROM " & strTablePrefix & "RECIPE WHERE POST_DATE LIKE '" & left(datetostr(curDate),8) & "%' AND SHOW = 1"

Do you think it is because the author used "SHOW" as a field in the table?
<
AnonJr
19 June 2007, 14:29


If that particular table doesn't exist, that may be it...

Also, is it always the "SHOW" keyword that causes the errors?
I'm starting to think there may be an error in the DBS script that creates the tables. If I remember tonight I may take a look.<
CodeMan7
19 June 2007, 14:38


Most of the errors involve the "SHOW" part.
seanbol said that he got this error:
-2147217911 | [TCX][MyODBC]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SHOW int NULL DEFAULT 0, BADLINK int NULL DEFAULT 0, RATING int

Interesting that this error also involves "SHOW". If I could just get the Recipe table created correctly, I might be able to figure out the other errors.
BTW, it looks like SHOW is always either "1" or "0", so he must be using it for a 'true' or 'false' field.
One solution might be to change "SHOW" to "isSHOW" in the table. Then do a search and replace for "SHOW" in the asp files.
Anything you can come up with would be appreciated Anon.
Thanks.<
CodeMan7
19 June 2007, 15:44


UPDATE! I changed "SHOW" to "ISHOW" in dbs_recipe.asp. Then I went to admin options and ran the Recipe mod setup. (All tables created successfully.)
Before I did anything else. I went through recipe.asp, admin_recipe.asp, and pop_recipe.asp and did a search and replace using "SHOW" and "ISHOW". (There are some instances of "show" in lower case. I didn't change those.)

Then I went into Recipe book and the menus came up. I was able to add a recipe, rate a recipe and create categories and subcategories.
I'm still getting some errors, but at least now I can see what I am working with.<
AnonJr
19 June 2007, 16:20


I wonder if SHOW is a reserved word in MySQL? Just about all of the successful installs I know of were on either Access or MS SQL Server - so it could be that these are just MySQL issues.
If you see the word "show" in the SQL statement, it should be cased the same in all queries. In general, Access and MS SQL Server don't care (but they can be made to); and in general MySQL does care (but it can be made not to). Its a good habit to treat SQL statements like they all care - that way you are either right or pleasantly surprised. wink<
CodeMan7
19 June 2007, 18:35


Anon, maybe you can help with some of the other errors.
This is the error I get in recipe.asp when I do a search:

"Error Type:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype."

Below is the code with the last line being the one where the error happened:

Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
objPagingRS.CacheSize = iPageSize
objPagingRS.Open strSQL, my_Conn, adOpenStatic, adLockReadOnly, adCmdText

reccount = objPagingRS.recordcount
iPageCount = objPagingRS.PageCount

If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1

If iPageCount = 0 Then
Response.Write " <br /><center><font face=""" & strDefaultFontFace & """ color=""" & strHiLiteFontColor & """ size=""" & strDefaultFontSize & """>" & frLang(strLangRecipe00050) & "</font></center>" & vbNewLine
Else
objPagingRS.AbsolutePage = iPageCurrent


Any ideas why I get this error? (I'm getting it other places also.)

Thanks! <
AnonJr
19 June 2007, 21:38


Off hand I'd say that MySQL (or that particular installation) may not support the way the bookmarks are coded. Again, I'm not as familiar with MySQL so I'm not 100% sure. Like I mentioned earlier, it may be that some parts will have to be re-coded for MySQL.<
AnonJr
19 June 2007, 21:50


Ah ha! "SHOW" is a reserved word in MySQL. That means that you are going to have to call that column something else and change all the references to whatever you called it. (I'd treat it like its case-sensitive too.)

I'd fix the DBS file first, and then re-create all the tables with the new title. That may fix the error in creating the tables. That should also fix some of your other problems too.

Somebody might want to let Classic know too in case he wants to update the code.<
CodeMan7
19 June 2007, 22:03


Anon, you did read my message which started out with "UPDATE", didn't you?
I did all those things and got the Recipe book working except for the bookmark errors I'm getting. I can still use 95% of everything.
BTW, thanks for confirming that "SHOW" is a reserved word. It had to be that.
If I can ever get this thing working, it will make a good classifieds mod also. <
AnonJr
19 June 2007, 22:28


Missed that one some how. blush
Looks like MySQL 5 has some problems with bookmarks. I found a few posts like this one where similar code worked on MySQL 4.1, but not on 5. If there is a solution I haven't found it yet. It may be worthwhile to brows their forums some - two sets of eyes are better than one. wink
Edit: Seems they have a bug open on this too. http://bugs.mysql.com/bug.php?id=27353<
CodeMan7
19 June 2007, 23:07


Thanks, Anon. That's bad news until we can find a workaround.
If you spot one (workaround or solution) please post it. This mod would make a great base for other mods if all the bugs were worked out. I know we're over 90% there already. -------------------------

UPDATE!
Anon, I may have the answer about bookmarks.
It seems the cursortype is server side by default. I changed it to client side and now I don't get that error.
If you look at the code example I posted earlier, you will see:
Set objPagingRS = Server.CreateObject("ADODB.Recordset")

Right underneath that I added:
objPagingRS.CursorLocation = adUseClient

That solved that problem. Now I'm running into a 'ChkDate' problem.
But I'm getting closer to a solution. bigsmile

<
AnonJr
20 June 2007, 18:13


Cool. That's good to know. What exactly is the issue with ChkDate?<
CodeMan7
20 June 2007, 18:37


Well, when I do a search for a recipe I am getting this error:

Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment: 'chkDate'
/forums/recipe.asp, line 191

And the line causing the error is this:

Response.write "<center>" & vbNewLine & _
"<table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <a href=""recipe.asp?action=info&id=" & objPagingRS("RECIPE_ID") & """><font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """><b>""" & objPagingRS("Name") & """</b></font></a> " & vbNewLine & _
" </td>" & vbNewLine & _
" <td>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ color=""" & strHiLiteFontColor & """ size=""" & strDefaultFontSize & """>" & frLang(strLangRecipe00700) & " : """ & objPagingRS("Hit") & """</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """>""" & objPagingRS("Description") & """</font> " & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strFooterFontSize & """>""" & ChkDate(objPagingRS("post_date")) & """<b> | <a href=""pop_recipe.asp?action=error&id=" & objPagingRS("RECIPE_ID") & """>" & frLang(strLangRecipe00710) & "</a></font></b>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"</center><br>" & vbNewLine

You can see the [ ChkDate(objPagingRS("post_date")) ] in there which is where the error is coming from.

Outside of that, the only problem I'm having is getting it to loop so that it finds all records in a search. (Right now it stops at the first one found.)

Like I said, it's getting closer. Any help would be greatly appreciated.<
AnonJr
20 June 2007, 18:43


I think you'll find ChkDate() in inc_func_common.asp - I'm a little fuzzy at the moment. If memory serves, its expecting a few extra parameters.<
CodeMan7
20 June 2007, 22:16


Thanks. It looks like ChkDate takes 3 parameters. Date, Separator and Time.
I'll have to think about that one.<
Shaggy
21 June 2007, 04:14


All you need to do is to add the last two arguments when calling the chkDate function.
<
CodeMan7
21 June 2007, 08:27


Right. I tried to add the other two arguments and I got an error. So I just eliminated the ChkDate part of the statement. (No big deal. It just shows the date the recipe was posted.)

THE GOOD NEWS is that I got the recipe program working without crashing. At least now I can see what the program is doing and how it is supposed to work.
It still needs some changes to make everything work the way it should. I'm going to populate it with recipes and see what needs to be fixed.
<
AnonJr
21 June 2007, 08:32


Originally posted by CodeMan7
It still needs some changes to make everything work the way it should. I'm going to populate it with recipes and see what needs to be fixed.
Good luck. Let us know how it goes.<
CodeMan7
21 June 2007, 09:24


Anon, I believe I put something like this:
ChkDate(objPagingRS("post_date"), & "/" &,)

I didn't put anything in for the time (last parameter).

In the search function for 10 recipes, everything works fine. This is what they use in that part of the code:
formatdatetime(strtodate(objPagingRS("post_date")), 2).
So why not use that in the search for 20 and 30?
Thanks, Anon. I'm going to go back and replace that other code and see what I come up with.
I'll keep you posted on my progress (or lack thereof).
<
AnonJr
21 June 2007, 09:50


It didn't like the ampersands outside of the quotes, and the missing final parameter. If you don't want to display the time, just pass False.
Try this and see if it works:

Code:
ChkDate(objPagingRS("post_date"), " - ",False)

Note, the separator is only for separating the time and the date. So if you aren't showing the time it won't matter what you pass.<
CodeMan7
21 June 2007, 10:13


Thanks, Anon. It does work. Actually, it works the same as the one I suggested.
I don't think this mod was ready for primetime. It has a link (after the search) beside each recipe which says:
" Report a bug (or error)"

When you click on that link, you get an error which says that "table snitz.recipe" does not exist.
The search on 10 recipes works fine. Everything is formatted as it should be. The searches on 20 and 30 recipes are all off and have lots of errors, code snippets showing, etc.
Did you install this mod, Anon? Just curious what you got, if you did install it.
<
AnonJr
21 June 2007, 14:39


No I haven't installed it yet.

Give the errors that we've been working on over the last couple days, I suspect it wasn't tested on MySQL and just needs to be updated to accommodate it. Has anybody notified Classic?<
CodeMan7
21 June 2007, 15:12


I haven't notified him.
I've got the mod working. It hasn't crashed on me yet, but everything is not working exactly like it should.
I'm cleaning up the code and adding recipes so I can give it a good test. So far, so good.

I noticed the "search" function searches the "keywords" and "Procedure" fields. It seems strange that it would search on Procedure and not on "Ingredients". I think I'll change that.
There are some quirks. Like when you have to click on "Next" for next page. That works, but when you click on "Previous" it takes you back to the menu and not the previous page.

Once I've got it working I'm going to rewrite it for a Classifieds mod.<
JJenson
22 June 2007, 11:28


Hey CodeMan when you get this all rewritten and working well I would aprpeciate it if you would upload the updated version on snitzbitz? I am sure there are alot of people that would really appreciate that bigsmile<
CodeMan7
22 June 2007, 11:32


Ok. Keep in mind that I'm trying to just get this working with MySQL, so I'm not taking any other implementation into account.
Others might want to check it out with Access or whatever they are using.

It would be nice if anyone who has this working could give us some input. I've seen links to a couple of sites who are using something similar. They're both in foreign languages but I can recognize the mod. <
JJenson
22 June 2007, 12:00


Yeah I actually have the mod david did on my site in MSSQL but haven't tested that out. Also I had it up on a site with access and it had some quiry things but worked overall. I would show you but it is behind a password protected site.<
CodeMan7
22 June 2007, 12:41


No problem. I think I know what you mean. I've seen some quirks in it myself. They shouldn't be too hard to work out.
Also, I downloaded the Links Manager mod. It's interesting that this uses the same database as the Recipe mod.
I'm going to install the Links Manager mod also. (I'm doing this on an off site testing area, so I'm not worrying about it crashing.)

I figure between the two of them I ought to be able to put something decent together.
Right now, the Recipe mod does most of what it is supposed to do. All of the major things work. Just some minor things.
I'll try to keep everybody posted here.<
JJenson
22 June 2007, 12:52


The one really quirky thing is that the person who uploaded the recipe changes on who viewed it last. I have not looked into it at all but you might want to take a look at that if you haven't already. smile<
CodeMan7
22 June 2007, 14:38


I made changes to the Links Manager mod before I installed it. (This was to correct the things I found wrong with the Recipe mod.)

I got the Links Manager working fine, with no problems. And the Recipe mod is based on the Links Manager mod. That is obvious by the code. Now I think I can rework the Recipe mod and get it working. I'll let you know how that turns out.
(I changed the rating system from 1 to 5 in Links Manager to 1 to 10.)

I'd like to get your Require Member Profile mod working. I tried it but the zip didn't have the admin file.


<
cripto9t
23 June 2007, 14:26


I'm using mySql 5
The "popular" link throws an error because the sql uses "Select Top". MySql uses "LIMIT"
Use the TopSQL function located in "inc_func_common" to fix this.
change this
strSQL = "SELECT TOP " & intPopular & " RECIPE_ID, NAME, URL, KEYWORD, DESCRIPTION, INGREDIENTS, POST_DATE, HIT, CATEGORY, PARENT_ID, SHOWS, BADLINK FROM "& strTablePrefix & "RECIPE WHERE SHOWS = 1 ORDER BY HIT DESC"

dim rsPopular
set rsPopular = server.CreateObject("adodb.recordset")
rsPopular.Open strSQL, my_Conn


to this


strSQL = "SELECT RECIPE_ID, NAME, URL, KEYWORD, DESCRIPTION, INGREDIENTS, POST_DATE, HIT, CATEGORY, PARENT_ID, SHOWS, BADLINK FROM "& strTablePrefix & "RECIPE WHERE SHOWS = 1 ORDER BY HIT DESC"

dim rsPopular
set rsPopular = server.CreateObject("adodb.recordset")
rsPopular.Open TopSQL(strSQL,intPopular), my_Conn


You'll need to change the SHOW column to whatever you renamed it.<
JJenson
23 June 2007, 18:51


Start a new topic on the require mod codeman. Tell me which file is missing I thought I just checked it out and its got everything. I know there are some holes I have just been in full time school and work so haven't had much of a chance to fix it like it needs to be. smile<
CodeMan7
23 June 2007, 18:59


Ok. Will do.
BTW, I have converted the Links Manager mod over to a Recipe Manager mod. I just need to fine tune it. It actually works very good. I've added a couple of new features but I want to add some more.<
JJenson
23 June 2007, 23:13


Sounds great when you are ready let me know and I will put it up on my server I can test it on whatever database you would like me to.<
simon emery
04 October 2007, 10:58


I found some code errors int admin_recipe.asp that created the errors when editing a recipe. If you edited them, the ingredients dissappeared.
Here are the code changes (please be aware I am a novice)

Line 316ish
email = ChkString(Request.Form("INGREDIENTS"),"url")
This made no sense to me until I started digging in - the author must have modded something with an email field. I replaced with this

ingredients = Request.Form("ingredients")
email = ChkString(Request.Form("email"),"url")

I am not sure the second one is needed, again, I am a novice :)

Also line 334ish
I re-wrote the two lines to this:

my_Conn.Execute("UPDATE " & strTablePrefix & "RECIPE SET NAME='" & chkString(name, "SQLString") & "',POST_DATE ='" & today & "',URL ='" & URL & "',filesize ='" & chkString(filesize, "SQLString") & "',license ='" & chkString(license, "SQLString") & "',lang ='" & chkString(lang, "SQLString") & "',platform ='" & chkString(platform, "SQLString") & "',publisher ='" & chkString(publisher, "SQLString") & "',publisher_url ='" & chkString(publisher_url, "SQLString") & "',uploader ='" & chkString(uploader, "SQLString") & "',description ='" & chkString(des, "SQLString") & "',keyword ='" & chkString(key, "SQLString") & "',INGREDIENTS ='" & chkString(INGREDIENTS, "SQLString") & "', BADLINK=0 WHERE RECIPE_ID =" & webid)
else
my_Conn.Execute("UPDATE " & strTablePrefix & "RECIPE SET NAME='" & chkString(name, "SQLString") & "', URL='" & chkString(url, "SQLString") & "', filesize ='" & chkString(filesize, "SQLString") & "', license ='" & chkString(license, "SQLString") & "', lang ='" & chkString(lang, "SQLString") & "',platform ='" & chkString(platform, "SQLString") & "',publisher ='" & chkString(publisher, "SQLString") & "',publisher_url ='" & chkString(publisher_url, "SQLString") & "',uploader ='" & chkString(uploader, "SQLString") & "',description ='" & chkString(des, "SQLString") & "',keyword ='" & chkString(key, "SQLString") & "',INGREDIENTS ='" & chkString(INGREDIENTS, "SQLString") & "', BADLINK=0 WHERE RECIPE_ID =" & webid)
end if

This makes the chkstring occur on the field. I'm not sure if this one is required or not.
And finally line 1066ish I re-wrote to this:
" <textarea name=""ingredients"" cols=""30"" rows=""4"">" & ChkString(RS("INGREDIENTS"), "display") & "</textarea>" & vbNewLine & _
Again we had the email variable involved here. When doing an update, I think the system was overwriting the ingredients field with the email field, which was blank.
My next endevor is to make the ingedients display as a list, rather than a long string. Any help would be much welcomed.<
simon emery
04 October 2007, 11:47


change line 1287 in recipe.asp to
" <font face=""" & strDefaultFontFace & """ color=""" & strDefaultFontColor & """ size=""" & strDefaultFontSize & """>" & "<ul><li></li>" & replace(strRECIPEINGREDIENTS, chr(10) & chr(13), "<li>") & "</ul></font> " & vbNewLine & _

This will convert line breaks to a bulleted list in the ingredients <
mdelcour2000
12 November 2007, 10:37


any fixes on the author showing up as the person logged in? Can't find a fix.<
© 2000-2021 Snitz™ Communications