Firefox PHP

Terms of Service Module

Posted by Brian Moon 
Re: Terms of Service Module
September 01, 2006 06:06PM
Try {IF USERINFO->mod_tos_current} instead.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Terms of Service Module
September 01, 2006 06:39PM
I think we were typing at the same time.. I'm uploading the updated .tpl file.

I reversed the logic on the IF cause this is my personal preference.. I dont like (if = false) else when an (if) else would be sufficient :P

Oliver, I'll remove the file once you've added it to your package

EDIT: file deleted--included in 2.2.0 package



Edited 3 time(s). Last edit at 09/03/2006 05:21PM by freedman.
Re: Terms of Service Module
September 01, 2006 07:05PM
I think that Oliver has written this code against the Phorum 5.2 development tree. In Phorum 5.2, {USERINFO} was renamed to {USER}.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Terms of Service Module
September 03, 2006 04:10PM
Hi Keith, Hi Maurice,

I attached new version 2.2.0 in my original post. From change log:

2006/09/01 version 2.2.0 by Oliver Riesen (oliver@riesen.org)
- Added sanity checks. See "System Sanity Checks" in Phorum administration.
- Default settings are stored automatically on first usage of the module. So the admin don't have to go to the settings page.
- Module language strings now uses own sub-array.
- Correcting error: whenever someone posted a message their TOS accept date got updated to the current date; thanks to freedman.
- Correcting error: a TOS version date in the future forced a renew for each post; thanks to freedman.
- Including template for version 5.1 and future 5.2.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Terms of Service Module
September 24, 2006 12:47AM
I am running phorum 5.1.16a, Terms-of-service 2.2.0

It seems that the terms-of-service has a bug (or not working on my system). Whenever user clicks: "I agree with these terms."

It will generate the following bug:

"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 ''20060922')' at line 1: insert into phorum_user_custom_fields (user_id,type,data) VALUES(4,,'20060922')"

I checked that the custom profile had created: mod_tos, and it has three fields.
Re: Terms of Service Module
September 25, 2006 05:53AM
Hi BBSNewbie,

Quote
BBSNewbie
It seems that the terms-of-service has a bug (or not working on my system). Whenever user clicks: "I agree with these terms."

It will generate the following bug:

"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 ''20060922')' at line 1: insert into phorum_user_custom_fields (user_id,type,data) VALUES(4,,'20060922')"

I checked that the custom profile had created: mod_tos, and it has three fields.

Strange. Did you use the "System sanity checks" in admin section to see if the module reports some problem?

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
LWN
Re: Terms of Service Module
September 25, 2006 08:13PM
Quote
BBSNewbie

"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 ''20060922')' at line 1: insert into phorum_user_custom_fields (user_id,type,data) VALUES(4,,'20060922')"

I had the same error on MySQL 5.0.17
The admin of the server said it is because of a strict mode, changed something, then it worked.
Re: Terms of Service Module
September 25, 2006 08:17PM
No, that is just a bad query. strict mode wont' fix that.

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Terms of Service Module
September 25, 2006 10:14PM
I did use the "System sanity checks", and it kept reporting:

"Sanity check failed
The default settings for the module are missing.

Possible solution:

Login as administrator in Phorum's administrative interface and go to the "Modules" section. Open the module settings for the Terms of Service Module and save the default values."

I had done this a few times, I still got the same sanity check failed error.
I checked Custom Profiles field, it did report
mod_tos 8 Yes

Thank you in advance.

(BTW, I am running 5.1.16a, TOS 2.2.0, it is on godaddy server, I was told that
MySQL version is 4.0.27)


Quote
Oliver Riesen
Hi BBSNewbie,

Quote
BBSNewbie
It seems that the terms-of-service has a bug (or not working on my system). Whenever user clicks: "I agree with these terms."

It will generate the following bug:

"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 ''20060922')' at line 1: insert into phorum_user_custom_fields (user_id,type,data) VALUES(4,,'20060922')"

I checked that the custom profile had created: mod_tos, and it has three fields.

Strange. Did you use the "System sanity checks" in admin section to see if the module reports some problem?

Regards
Oliver
Re: Terms of Service Module
September 26, 2006 05:14AM
Hi BBSNewbie,

Quote
BBSNewbie
I had done this a few times

Did you get the message "Settings Updated" after clicking on "Save"?

Please check your phorum_settings table for the default settings (for example with phpMyAdmin):

SELECT `name`,`type`,`data` FROM `phorum_settings` WHERE 1 AND `name` LIKE 'mod_tos%'

You should get two rows.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Sorry, only registered users may post in this forum.

Click here to login