In D7.0.2, when you add a new page you cannot add this to a given membership level (Admin/Settings/Membership levels). Is there a way around this? Hopefully this is a simple code mod!
Thanks in advance.
Stuart
In D7.0.2, when you add a new page you cannot add this to a given membership level (Admin/Settings/Membership levels). Is there a way around this? Hopefully this is a simple code mod! Thanks in advance. Stuart There are none so blind as those that will not see. |
Anton LV's page access mod.. Custom Dolphin Development and Support, Professional Mods | http://www.boonex.com/unity/Adminmysite |
How are you navigating to the page??? If it's from a link in the menu you can select guest / member via the navigation builder. If it's from another page - how do you get to this page? (same philosophy applies.) Not exactly a solution, but maybe changing your site layout might help restrict access to this page. I personally would boycott the mod suggested - permissions handling should be a basic feature - after all, whats the point of having an authentication system if you cannot apply it? Another case of half a job being done. /DM Dolphin - Ajax Masturbation |
AntonLV's page access mod is a full blown mod which is completely over the top for what I want to be able to do. ALL I need is to enable the D7 generated page to show up in: Admin/Settings/Membership levels so I can determine which membership level can access it. This should be core functionality, not a $40 mod. Deano, what are you upto :-) Anton LV's page access mod.. There are none so blind as those that will not see. |
Hi DeeEmm, Please see above. Stuart Ps. what are you upto.... There are none so blind as those that will not see. |
The membership levels only apply to modules. To get these to work with pages would require an additional module - probably much like Antons. Don;t have time to write it up, but a quick hack is as follows... in pageView.php Test the query string to see if it contains the page name - $_GET['ID'] if it does check the user level - $logged['member'] = member_auth(0); Then send them to error page - $oSysTemplate-> displayAccessDenied () /DM Dolphin - Ajax Masturbation |
Hi DeeEmm, No luck, thanks for trying! Stuart There are none so blind as those that will not see. |
Hi DeeEmm, No luck, thanks for trying! Stuart Will have a look tonight /DM Dolphin - Ajax Masturbation |
Many thanks, Stuart Hi DeeEmm, No luck, thanks for trying! Stuart Will have a look tonight /DM There are none so blind as those that will not see. |
Yup, had it a little wrong. Needed to use isMember() not $logged['member'] All tested and written up as a step by step... http://www.deeemm.com/resources/tutorials/42-dolphin-70x-modifications/174-dolphin-hide-custom-pages-from-non-members.html HTH /DM Dolphin - Ajax Masturbation |
DeeEmm, many thanks for this. Is there a way for this to determine membership level, silver, gold etc? Regards, Stuart Yup, had it a little wrong. Needed to use isMember() not $logged['member'] All tested and written up as a step by step... http://www.deeemm.com/resources/tutorials/42-dolphin-70x-modifications/174-dolphin-hide-custom-pages-from-non-members.html HTH /DM There are none so blind as those that will not see. |
Yes there should be. Will have a dig around a little later. /DM Dolphin - Ajax Masturbation |
You could try this. Edit Pageview.php and add lines in green. https://www.deanbassett.com |
Here's something I implemented to qiuckly get membership levels and add in very customized if...then changes in any part of the site from showing pages and redirecting based on membership, to even customizing the search so only "gold" members cna use advanced features. In membership_levels.inc.php I created this function at the bottom of the page, it will enable for global calling /** The user levels are listed in sys_acl_levels, check there for your particular created level, we will say your gold is level 4 So on the page you wnat to restrict access for the page you can do something like this: $iDl = getLevelId($_COOKIE['memberID']); - this will set the member level if (!$this->isAllowedView($aInfo) && $iDl == 1) { //non loged in members I like the function I created because you can add customization within any function of boonex which is very nice. You can do this to segregate comment sections with who can comment and who cannot, mail, search, etc. The main place I used this was in creating custom access denied pages, no longer will each membership level have the same generic boonex message. I created a modification that creates a whole new class of error codes. |
Mauricano, thanks for this. Where will I find the 'sys_acl_levels' file? Also, what if I have multiple levels i.e. Silver and Gold? Regards, Stuart There are none so blind as those that will not see. |
Mauricano, thanks for this. Where will I find the 'sys_acl_levels' file? Also, what if I have multiple levels i.e. Silver and Gold? Regards, Stuart Its a database table https://www.deanbassett.com |
Ok... Cheers Deano! Mauricano, thanks for this. Where will I find the 'sys_acl_levels' file? Also, what if I have multiple levels i.e. Silver and Gold? Regards, Stuart Its a database table There are none so blind as those that will not see. |
Having created a Page (via Admin) called entertainment, Where do I find it to add code to? Many thanks guy's.. Here's something I implemented to qiuckly get membership levels and add in very customized if...then changes in any part of the site from showing pages and redirecting based on membership, to even customizing the search so only "gold" members cna use advanced features. In membership_levels.inc.php I created this function at the bottom of the page, it will enable for global calling /** The user levels are listed in sys_acl_levels, check there for your particular created level, we will say your gold is level 4 So on the page you wnat to restrict access for the page you can do something like this: $iDl = getLevelId($_COOKIE['memberID']); - this will set the member level if (!$this->isAllowedView($aInfo) && $iDl == 1) { //non loged in members I like the function I created because you can add customization within any function of boonex which is very nice. You can do this to segregate comment sections with who can comment and who cannot, mail, search, etc. The main place I used this was in creating custom access denied pages, no longer will each membership level have the same generic boonex message. I created a modification that creates a whole new class of error codes. There are none so blind as those that will not see. |
Steward/ DeeEmm Some of this work has been done, or there is at least some code you could use. Okweb, HL and Deano helped with it here: http://www.boonex.com/unity/forums/?action=goto&search=1#topic/Premium-members-content-area-fishing-for-ideas.htm Not sure how clean this is - I had it partially implemented. I really, really, really wish Anton's mod had been integrated into the product - that Boonex had paid him or something, because this is basic functionality. The way membership levels are set up are almost useless - who wants to restrict based on features - should absolutely be pages and blocks. I agree with Steward - this should be basic functionality. Please publish whatever you come up with. Rob |
Having created a Page (via Admin) called entertainment and another called 'travel', Where do I find it to add code to? Many thanks guy's.. Here's something I implemented to qiuckly get membership levels and add in very customized if...then changes in any part of the site from showing pages and redirecting based on membership, to even customizing the search so only "gold" members cna use advanced features. In membership_levels.inc.php I created this function at the bottom of the page, it will enable for global calling /** The user levels are listed in sys_acl_levels, check there for your particular created level, we will say your gold is level 4 So on the page you wnat to restrict access for the page you can do something like this: $iDl = getLevelId($_COOKIE['memberID']); - this will set the member level if (!$this->isAllowedView($aInfo) && $iDl == 1) { //non loged in members I like the function I created because you can add customization within any function of boonex which is very nice. You can do this to segregate comment sections with who can comment and who cannot, mail, search, etc. The main place I used this was in creating custom access denied pages, no longer will each membership level have the same generic boonex message. I created a modification that creates a whole new class of error codes. Bump There are none so blind as those that will not see. |
I created two Pages (via Admin) called entertainment and another called 'travel', the url that comes up for those two pages is: http://www.xxxxx.com/page/travel I cannot find any 'page' folder. How do I add/edit that code, let alone find it?
Many thanks .. Stuart There are none so blind as those that will not see. |
Anyone, Mauricano any ideas? Stuart I created two Pages (via Admin) called entertainment and another called 'travel', the url that comes up for those two pages is: http://www.xxxxx.com/page/travel I cannot find any 'page' folder. How do I add/edit that code, let alone find it?
Many thanks .. Stuart There are none so blind as those that will not see. |
Anyone, Mauricano any ideas? Stuart I created two Pages (via Admin) called entertainment and another called 'travel', the url that comes up for those two pages is: http://www.xxxxx.com/page/travel I cannot find any 'page' folder. How do I add/edit that code, let alone find it?
Many thanks .. Stuart There is not actually any page folder, the url blah.com/page/travel is converted by the mod_rewrite rules in your htaccess file - these equate to blah.com?page=travel or something similar. The page only exists in the database, not physically on the disk. The page is stored in the sys_page_compose_pages table and the blocks within it are stored in the sys_page_compose table. You can edit them there, but the best place to edit the page is in the page builder - just choose the page from the drop down list in the pages blocks section. /DM Dolphin - Ajax Masturbation |
DeeEmm, Thanks for your reply. So how would I add this code: $iDl = getLevelId($_COOKIE['memberID']); - this will set the member level if (!$this->isAllowedView($aInfo) && $iDl == 1) { //non loged in members } to the 'viewPage' generated page? Stuart Anyone, Mauricano any ideas? Stuart I created two Pages (via Admin) called entertainment and another called 'travel', the url that comes up for those two pages is: http://www.xxxxx.com/page/travel I cannot find any 'page' folder. How do I add/edit that code, let alone find it?
Many thanks .. Stuart There is not actually any page folder, the url blah.com/page/travel is converted by the mod_rewrite rules in your htaccess file - these equate to blah.com?page=travel or something similar. The page only exists in the database, not physically on the disk. The page is stored in the sys_page_compose_pages table and the blocks within it are stored in the sys_page_compose table. You can edit them there, but the best place to edit the page is in the page builder - just choose the page from the drop down list in the pages blocks section. /DM There are none so blind as those that will not see. |
Hi DeeEmm, I guess the above is too problematic. I liked Mauricano's suggestion because the Member ID would be stored 'Globally'. I now look into Deano's suggestion because, looking at it more closely (and now understanding how pageView.php works) it tackles the problem at source! Any help with this one would be gratefully received largely because Deano states he hasn't been able to test it. Regards, Stuart There are none so blind as those that will not see. |
Hi Deano, I get this error: Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/admin/domains/xxxxx.xxx/public_html/viewPage.php on line 48 This happens with Standard member as well as Silver member (same error). Stuart You could try this. Edit Pageview.php and add lines in green. There are none so blind as those that will not see. |
Hi Deano, I get this error: Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/admin/domains/xxxxx.xxx/public_html/viewPage.php on line 48 This happens with Standard member as well as Silver member (same error). Stuart You could try this. Edit Pageview.php and add lines in green. bump There are none so blind as those that will not see. |
Anyone?? There are none so blind as those that will not see. |
Anyone help with this? Thanks, Stuart I get this error: Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/admin/domains/xxxxx.xxx/public_html/viewPage.php on line 48 This happens with Standard member as well as Silver member (same error). Stuart You could try this. Edit Pageview.php and add lines in green. There are none so blind as those that will not see. |
Deano! Anyone help with this? Thanks, Stuart I get this error: Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/admin/domains/xxxxx.xxx/public_html/viewPage.php on line 48 This happens with Standard member as well as Silver member (same error). Stuart You could try this. Edit Pageview.php and add lines in green. There are none so blind as those that will not see. |
Anyone? I get this error: Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/admin/domains/xxxxx.xxx/public_html/viewPage.php on line 48 This happens with Standard member as well as Silver member (same error). Stuart You could try this. Edit Pageview.php and add lines in green. There are none so blind as those that will not see. |
mauricecano Wrote: Here's something I implemented to qiuckly get membership levels and add in very customized if...then changes in any part of the site from showing pages and redirecting based on membership, to even customizing the search so only "gold" members cna use advanced features. In membership_levels.inc.php I created this function at the bottom of the page, it will enable for global calling /**
The user levels are listed in sys_acl_levels, check there for your particular created level, we will say your gold is level 4 So on the page you wnat to restrict access for the page you can do something like this: $iDl = getLevelId($_COOKIE['memberID']); - this will set the member level if (!$this->isAllowedView($aInfo) && $iDl == 1) { //non loged in members
I like the function I created because you can add customization within any function of boonex which is very nice. You can do this to segregate comment sections with who can comment and who cannot, mail, search, etc. The main place I used this was in creating custom access denied pages, no longer will each membership level have the same generic boonex message. I created a modification that creates a whole new class of error codes.
I like the simplicity in your code, but unfortunetaly it is not working. I just started out with Boonex and i would love to have the ability to show different pages to different membership levels. Perhaps there is someone out there with the solution? :) |
I figured it out;
$aProfileInfo = getProfileInfo($this -> oProfileGen -> _iProfileID);
$sMemberShipInfo = getMemberMembershipInfo($aProfileInfo['ID']); $number_three = 3; if ( $sMemberShipInfo['ID'] == 2 ) { echo '<div id="articles3" class="arl-entry"> For this moment you are allowed to view profiles, read most of the materials, watch videos and post comments. </h5> </div>'; } |