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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Petition MOD
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 6

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 01 August 2008 :  04:47:11  Show Profile
Since a petition is visible to all signers by default, not sure why you'd need to protect it from being printed ... but it doesn't effect the functionality, so feel free.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 01 August 2008 :  07:20:13  Show Profile
Good point, but the rationale behind keeping the printout separate is when the organiser wants to forward/handover the printout signatures, they know that the receipient will get a true number of 'signees' collated together. It'll also save many other people putting in printouts, and then having to isolate each duplicated sig. We organised a country wide petition a while ago, handed them into parliament in one go, instead of dribs and drabs. Just a thought.<

Edited by - Andy Humm on 01 August 2008 07:25:18
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 03 August 2008 :  10:15:29  Show Profile  Visit Massimo's Homepage
Fix insert secure e-mail. (You Must enter a valid e-mail address)


open petition.asp and modify:

Look for:

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<%


Replace it with:

%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%


Look for:

End If
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your email address</li>" & vbNewLine
End If
If Request.Form("message") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
End if


Replace it with:


End If
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your email address</li>" & vbNewLine
End If
if EmailField(Request.Form("Email")) = 0 then
Err_Msg = Err_Msg & "<li>You Must enter a valid e-mail address</li>"
end if

If Request.Form("message") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
End if




;)
<

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

Lon
Starting Member

USA
47 Posts

Posted - 29 November 2008 :  17:25:30  Show Profile
I've modified mine to only display signatures to administrators. It would also be nice to be able to have a clean-up button. Something to erase all the signatures when it is complete, or maybe archive them. Or how about 2 petitions or more going at the same time?, that might be a little more difficult.

Great MOD, I believe my users will enjoy it and use it.

Lon<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 22 December 2008 :  17:35:27  Show Profile
Lon,
I haven't tried this code but maybe a new case in admin_petition.asp line 97 might work. I have not looked into where we could active this action, maybe a link in the admin page - any ideas

'#####################################################################################################
'### DELETE ALL PETITION SIGNATURES ###
'######################################################
Case "cleardb"
If Request.QueryString("do") = "yes" Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Petition Entries Deleted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete all Petition entries?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=cleardb&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 22 December 2008 :  18:49:58  Show Profile
Lon
You might want to try this:
petiton.asp lines 231 to 233 amend to read
if mLev>3 then
			Response.Write	"		 <a href=""JavaScript:openWindow5('petition_print.asp')"">" & getCurrentIcon(strIconPrint,"","align=""absmiddle""") & "</a> | <a href=""petition.asp?action=cleardb"">Clear database</a> |  " & vbNewLine
		end if

The above code in red adds alink next to the printer icon which is only visible for admins logged in

then at line 402 before the 'case sign' add the following

'#####################################################################################################
'###		 DELETE ALL PETITION SIGNATURES		 ###'######################################################
Case "cleardb"
		 If Request.QueryString("do") = "yes" Then
			strsql = "DELETE FROM " & strTablePrefix & "PETITION"
		my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
		Response.Write "		<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Petition Entries Deleted!</font></p>" & vbNewLine & _
		"		<meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
		"		<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
		ElseIf Request.Querystring("do") <> "yes" Then
		Response.Write "		<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete all Petition entries?<br />" & vbNewLine & _
		"		<a href=""petition.asp?action=cleardb&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
		 Else
		Response.Redirect("petition.asp")
		 End If


Merry Christmas
Andy


<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 23 December 2008 :  22:38:13  Show Profile
Rather than deleting the contents of a previous petition database, why not use one of the varfields as a petition title, then when ready to create a new petition, rename the petition table automatically to "petition+(the existing title)", and finally recreate the blank petition table?<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 24 December 2008 :  03:25:11  Show Profile
Good call, I think the original concept of leatherlips' petition mod was based around ther original guestbook software. Would this suggestion be too difficult to achieve CF?
rgds andy<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 December 2008 :  08:10:10  Show Profile
It shouldn't pose a problem, no. I'll see if I cannot write the mod changes sometime today.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 25 December 2008 :  04:17:02  Show Profile
OK I had to do a bit of writing, but it's functional.

Features:
  1. Adds a title to the petition
  2. Automatically renames the petition table to the title of the petition
  3. Recreates the blank petition table
  4. Resets the petition message & title fields of the petition options table


Download at SnitzBitz.<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 25 December 2008 :  05:28:45  Show Profile
CF, Merry Christmas, Santa provides, so does CF...A big thank you from the UK.<
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 27 January 2009 :  11:55:11  Show Profile
I've tried the update for the petition mod, but I got an error:

Microsoft JET Database Engine error '80040e10'

No value given for one or more required parameters.

/forum/admin_petition.asp, line 68

After reading this thread, I checked the database. Before and after is was exactly the same size. So I tried the alternative database update.
Got the succesfull update reply, but the database remains exactly the same size.

I'm using an Access 2000 database.

Following, I tried a little experiment, I downloaded the database, manually added a field P_TITLE (texfield, 50 positions, not required, other options in Access on no, and now no error.
It seems your dbs file is still not working, at least not with Access database.
I only added the field, is more required?

Edit: first test, made a title, downloaded the dB, the title was in the file, changed it, replaced the dB on the server and indeed, the name of the petition had changed.
Looks as if it's working.<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.

Edited by - jgs on 27 January 2009 12:02:49
Go to Top of Page

jgs
New Member

Netherlands
95 Posts

Posted - 27 January 2009 :  12:17:36  Show Profile
I cheered to early, the name of the petition doesn't show up in the petition itself. But I don't get errors.

Noticed another error, the 3 additional fiels were missing.

I'm back to 1.2


<

Info about my forum: http://www.govvd.nl/forumsoftware.htm list of Mods included.
Most of userinterface translated into Dutch.

Edited by - jgs on 27 January 2009 12:34:59
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07