Thanks for the resonose mikko
I already tried that statement. Your privacy policy don't like the 'single quotes', and it don't work.
Notice: 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 ''67'' at line 1 in C:\Program Files\xampp\htdocs\domain\includes\database.php on line 294
Notice: Trying to get property of non-object in C:\Program Files\xampp\htdocs\domain\components\com_comprofiler\plugin\user\plug_privacypolicy\privacypolicy.php on line 115
You get these two errors if you use that statement. I know that they are the defualt PP tab errors and don't really matter.
I set the contact info tab to Private Connection, which is a policy I made. The problem is that the tab don't show to private connections. And each time you click on any community builder connection you get the privacy policy updated alert(every time you do anything).
You also get this one when you click on a connection profile.
Notice: Unknown column 'Privacy' in 'field list' in C:\Program Files\xampp\htdocs\domain\includes\database.php on line 294
Other problems: If you create a new policy and select 'users can choose policy'. It saves it in backend, but when you run an action that updates plugin in front end, the backend goes back to 'No' and users can't see the new policy.
If you select a new default policy it is not reflected in front end.
If you run this as a policy:
select 1 from #__comprofiler_members where referenceid={$my} and memberid={$user} and type like '%Privacy%'and accepted=1 and pending=0;
It brakes the whole string because of the single quotes, if you remove them it don't work either, can't use double quotes "%Privacy%" or escape quotes \"%Privacy%\" either because they are removed after front end plugin update.
Here is the debug results in front end with single quotes.
UPDATE jos_comprofiler_plugin SET params ='userCanConfigure=11|*|12|*|15|*|16|*|21|*|33|*|34|*|2
pol1_title=Show to all users
pol1_sql=select 1;
enable_pol1=
pol2_title=Show to all registered users
pol2_sql=select 1 from #__comprofiler where {$my} > 0;
enable_pol2=
pol3_title=Show to users with connection
pol3_sql=select 1 from #__comprofiler_members where referenceid={$my} and memberid={$user} and accepted=1 and pending=0;
enable_pol3=
pol4_title=Private Connection
pol4_sql=select 1 from #__comprofiler_members where referenceid={$my} and memberid={$user} and type like '%Privacy%'and accepted=1 and pending=0;
enable_pol4=
pol5_title=
pol5_sql=
enable_pol5=
defaultPolicy=4' where element='privacypolicy'
Post edited by: slycaulfey, at: 2007/04/27 17:47