Mod: Recipe Book 2.1 - Posted (7553 Views)
Development Team Leader
Classicmotorcycling
Posts: 2085
2085
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)<
Cheers,

David Greening
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
JJenson
Posts: 2121
2121
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<
Posted
New Member
CodeMan7
Posts: 88
88
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.<
Posted
Advanced Member
JJenson
Posts: 2121
2121
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.<
Posted
Starting Member
simon emery
Posts: 19
19
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.<
Posted
Starting Member
simon emery
Posts: 19
19
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 <
Posted
Junior Member
mdelcour2000
Posts: 133
133
any fixes on the author showing up as the person logged in? Can't find a fix.<
http://lacledeforum.com/

"Never get so busy doing the work of the kingdom that you forget who the King is"
You Must enter a message