Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Recipe book admin alert
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 08 July 2010 :  02:14:20  Show Profile  Reply with Quote
I have been trying to get an admin alert working so that an admin knows when there is a new recipe to approve.

so far I have:

 '#######    Begin my code changes for Recipe Book     #######
if mlev = 3 then
Response.Write " <a href=""admin_recipe.asp?action=approve""" & dWStatus("Recipe To Approve...") & " tabindex=""-1""><acronym title=""Recipe To Approve..."">Recipe To Approve"
strSQL = "SELECT count(URL) FROM " & strTablePrefix & "RECIPE WHERE SHOW=0"
Set RScount = my_Conn.Execute(strSQL)
rcount1 = RScount(0)
RScount.Close
Set RScount = Nothing
if rcount1 > 0 then Response.Write "(<font color=""" & strActiveLinkColor & """><b>" & rcount1 & " New</b></font>) " & getCurrentIcon(strIconPMalert,"PM Alert","hspace=""0""")& vbNewline & _
" |" & vbNewline
end if

'####### End my code changes for Recipe Book #######


I think the part in red maybe the problem but just need a bit of help please

Dave

No good at coding, but I can plough a field !!

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 08 July 2010 :  03:24:55  Show Profile  Reply with Quote
Try this:

if mlev => 3 then
	Response.Write "<a href=""admin_recipe.asp?action=approve""" & dWStatus("Recipe To Approve...") & " tabindex=""-1""><acronym title=""Recipe To Approve..."">Recipe To Approve"
	strSQL = "SELECT COUNT(URL) FROM " & strTablePrefix & "RECIPE WHERE SHOW=0"
	Set RScount = my_Conn.Execute(strSQL)
	if not RScount.EOF then
		rcount1 = RScount(0)
		RScount.Close
	end if
	Set RScount = Nothing
	if rcount1 > 0 then Response.Write "(<font color=""" & strActiveLinkColor & """><b>" & rcount1 & " New</b></font>) " & getCurrentIcon(strIconPMalert,"PM Alert","hspace=""0""")& vbNewline & _
		"          |" & vbNewline
	end if
end if
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 08 July 2010 :  05:02:03  Show Profile  Reply with Quote
Thanks Carefree, works like a charm.

No good at coding, but I can plough a field !!
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 08 July 2010 :  13:43:18  Show Profile  Reply with Quote
You're welcome.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 17 February 2012 :  23:47:25  Show Profile  Reply with Quote
Ohhhh, I am Sooo glad I found this!

Now, could someone just tell me WHERE this code goes?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 18 February 2012 :  13:15:06  Show Profile  Reply with Quote
Anywhere you want the link to appear. You can include it in "admin_home.asp" or "inc_header.asp", etc.

"admin_home.asp"


Look for the following line (appx 151):

if strArchiveState = "1" then Response.Write("                <LI><span class=""spnMessageText""><a href=""admin_forums.asp"">Archive Forum Topics</a></span></LI>" & vbNewLine)

Above it, insert the following:


strSQL = "SELECT COUNT(URL) FROM " & strTablePrefix & "RECIPE WHERE SHOW=0"
Set RScount = my_Conn.Execute(strSQL)
if not RScount.EOF then
	rcount1 = RScount(0)
	RScount.Close
end if
Set RScount = Nothing
Response.Write	"                <LI><span class=""spnMessageText""><a href=""admin_recipe.asp?action=approve"">Approve Recipes "
if rcount1 > 0 then
	Response.Write	"(<font color=""" & strActiveLinkColor & """><b>" & rcount1 & " New</b></font>) "
end if
Response.Write	"</a></span></LI>"



"inc_header.asp"


Look for the following line (appx 495):

	' DEM --> End of Code added to show subscriptions if they exist

above it, insert the following:


if mlev => 3 then
	Response.Write	"          |" & vbNewline & _
		"<a href=""admin_recipe.asp?action=approve""" & dWStatus("Recipe To Approve...") & " tabindex=""-1""><acronym title=""Recipe To Approve..."">Recipe To Approve"
	strSQL = "SELECT COUNT(URL) FROM " & strTablePrefix & "RECIPE WHERE SHOW=0"
	Set RScount = my_Conn.Execute(strSQL)
	if not RScount.EOF then
		rcount1 = RScount(0)
		RScount.Close
	end if
	Set RScount = Nothing
	if rcount1 > 0 then 
		Response.Write	"(<font color=""" & strActiveLinkColor & """><b>" & rcount1 & " New</b></font>) "
	end if
	Response.Write	"</acronym></a>" & vbNewline
end if


Edited by - Carefree on 18 February 2012 14:24:08
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 25 February 2012 :  22:33:01  Show Profile  Reply with Quote
Thank you, Carefree!! You are always so quick to reply!

Thank you, again!! :)



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 July 2012 :  06:05:50  Show Profile  Reply with Quote
Unfortunately, like the rest of the recipe book mod; it will not work on a MySQL database. The word "show" is restricted on MySQL and the database field must be renamed and all the software rewritten to reflect that change.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07