I would like to create a privacy group where my members can choose to be have certain areas of their profile viewed by upgraded members only.
Just want to add that one group only and have made changes to the first part of the mod but can't figure out what to write for the second part.
Part one:
db_res("
INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES
('sys_ps_enabled_group_29', 'on', 9, 'Enable ''Full Access Members Only'' group', 'checkbox', '', '', 25, ''),
('sys_ps_group_29_title', 'Full Access Members Only', 9, 'Title for ''Full Access Members Only'' group', 'digit', '', '', 26, '');
");
With the next part I am lost. I have made only small changes to the original Modzzz script below (the id which is 29 to reflect the change made it part one):
db_res("
INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES
(29, 0, 0, '', '', '', '\$aProfile = getProfileInfo((int)\$_COOKIE[''memberID'']);return (\$aProfile === false) ? false : ((int)\$aProfile[''Couple''] || (\$aProfile[''Sex'']==''female''));', 0);
");
There are 3 membership levels that will all be in the same privacy group which are Full, Advisor and Super and their IDs are 7,8 & 9 respectively.
Any help would be much appreciated.
|
You should ask Modzzz about this! he customises his mods if required and is awesome at what he does full stop !
Regards
I would like to create a privacy group where my members can choose to be have certain areas of their profile viewed by upgraded members only.
Just want to add that one group only and have made changes to the first part of the mod but can't figure out what to write for the second part.
Part one:
db_res("
INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES
('sys_ps_enabled_group_29', 'on', 9, 'Enable ''Full Access Members Only'' group', 'checkbox', '', '', 25, ''),
('sys_ps_group_29_title', 'Full Access Members Only', 9, 'Title for ''Full Access Members Only'' group', 'digit', '', '', 26, '');
");
With the next part I am lost. I have made only small changes to the original Modzzz script below (the id which is 29 to reflect the change made it part one):
db_res("
INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES
(29, 0, 0, '', '', '', '\$aProfile = getProfileInfo((int)\$_COOKIE[''memberID'']);return (\$aProfile === false) ? false : ((int)\$aProfile[''Couple''] || (\$aProfile[''Sex'']==''female''));', 0);
");
There are 3 membership levels that will all be in the same privacy group which are Full, Advisor and Super and their IDs are 7,8 & 9 respectively.
Any help would be much appreciated.
DedicatedServer4You.com -- BIGGEST Range of Dedicated Servers at the Lowest Price! |
The code below (I have not tested) will validate for Membership with ID=7. You can follow the same principle for the other levels :
db_res(" INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES (29, 0, 0, '', '', '', '\$aMembershipInfo = getMemberMembershipInfo((int)\$_COOKIE[''memberID'']);return ((int)\$aMembershipInfo[''ID''] == 7) ? true : false;', 0); ");
Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz |
Thank you for your time Modzzz.. How would I arrange it so that the 3 different membership levels would fall within the one privacy group?
How would I change this so that 7, 8 & 9 are reflected?
db_res(" INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES (29, 0, 0, '', '', '', '\$aMembershipInfo = getMemberMembershipInfo((int)\$_COOKIE[''memberID'']);return ((int)\$aMembershipInfo[''ID''] == 7) ? true : false;', 0); ");
|
this will be good if you add this option to your mod so also other users can do that. Ability to set for what membership is visible what so user have to upgrade his membership to see more profile info will be good addition to your mod... Maybe I will buy that mod from u thats why I asking :-) |
Does this look correct to you?
db_res("
INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES
(29, 0, 0, '', '', '', '\$aMembershipInfo = getMemberMembershipInfo((int)\$_COOKIE[''memberID'']);return ((int)\$aMembershipInfo[''ID''] == 7) || ((int)\$aMembershipInfo[''ID''] == 8) || ((int)\$aMembershipInfo[''ID''] == 9) ? true : false;', 0);
");
|
Yes, the only adjustment I am making is enclosing all the conditions in braces :
db_res("
INSERT INTO `sys_privacy_groups` (`id`, `owner_id`, `parent_id`, `title`, `home_url`, `get_parent`, `get_content`, `members_count`) VALUES
(29, 0, 0, '', '', '', '\$aMembershipInfo = getMemberMembershipInfo((int)\$_COOKIE[''memberID'']);return (((int)\$aMembershipInfo[''ID''] == 7) || ((int)\$aMembershipInfo[''ID''] == 8) || ((int)\$aMembershipInfo[''ID''] == 9)) ? true : false;', 0);
");
Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz |
Works great thanks.
I think it may be a level of privacy that others would be interested in as well so it may be worth adding it to your "Extra Privacy" mod.
|