Topic closed, please direct any questions and/or comments to the release topic, thanks to everyone that tested and made your inputs, as it made this MOD that much better in the long run.
Edit - Changed status to [RC7]
Download link removed, please use the release topic, thanks.
Edit January 17, 2007
Presenting the "Isn't this thing approved yet?" version of Page Permissions. Version 1.2.1 has a couple of minor updates (one for XHTML compliance and one to ensure the admin menu entry is actually a language string), an optional SQL update (provide a NOT NULL attribute on a primary key) and a major security fix. I encourage you to update right away (the udpate from 1.2.0 involves simply copying 4 files and you're done) otherwise your protected content is at risk.
The security update involves a very simple but important change to the main page permissions code found in includes/page_permissions.php. Please download and overwrite your file ASAP. If you are not on the most current version there are instructions in the /contrib folder to help you get to the 1.2.1 version. If you do not want to apply all of those changes you MUST make at least this change:
Code: Select all
open includes/page_permissions.php find PHP_SELF replace with SCRIPT_NAME
Code: Select all
$current_page_parts = pathinfo($HTTP_SERVER_VARS['SCRIPT_NAME']);
Thanks to the MOD Team for catching this and helping me to validate the solution.
Edit December 1, 2006
Presenting the "Just One More Feature" edition of Page Permissions 8)
It occurred to me tonight that by adding a new table to your database I should also do you the favor of including that table in the standard phpBB backup script. So there is a slight change to the installation routine for version 1.2.0 that will include the "phpbb_pages" table automatically with the standard backup routine.
An update from 1.1.0 is included in the /contrib folder of the download.
Edit November 30, 2006
Presenting the "Hope 2B Approved" edition of Page Permissions 8)
The version number did not change for this update as there are no code changes. I simply reformatted the MOD Install text file and resubmitted it to the MOD Team for validation. Hopefully my next post in this topic will be a link to the release topic.
Edit October 30, 2006
Presenting the "Almost a Pumpkin" edition of Page Permissions
Changed in this release
- Fixed bug where the wrong cache file name was used
- Changed author notes to reflect proper way to protect the cache file if using eXtreme Styles MOD
- Added a custom disable message that can optionally be used to provide more detail about why a specific page is disabled
- Update notes are included from version 1.0.x to 1.1.0, and include one SQL command plus overwriting all existing files provided by this MOD
Code: Select all
OPEN includes/page_permissions.php FIND cache_pages REPLACE WITH cache_page_permissions
Edit September 25, 2006
Updated title, changed status to RC3
Download package includes 1.0.2 code and install file. If you are using 1.0.0 or 1.0.1 there are update instructions in the /contrib folder. Versions prior to 1.0.0 are no longer supported. There were a couple of bugs identified, one introduced in 1.0.1 and one present for quite a while, both were fixed. Changes in this version include bug fixes and a reworked cache system, as detailed here:
- Fixed bug that caused private pages with more than one group associated with them to report "access denied" message
- Fixed bug where users in "pending" status for group membership still got access to group pages
- Removed some extra code
- Reworked cache system to make it more flexible and compatible with other phpBBDoctor MODs as follows:
- Renamed cache/cache_pages.php to cache/cache_page_permissions.php for consistency
- used $phpEx whenever possible
- Removed admin/phpbbdoctor_cache_functions.php
- Replaced with includes/functions_phpbbdoctor_cache.php
- Added an "include" in common.php to include caching functions
- Removed the admin language entries from lang_admin.php and created a stand-alone language file to make updates easier
Edit September 17, 2006
Updated title, changed status to RC2
Download package includes only the current 1.0.1 release only, prior versions are no longer available or supported.
The author notes have been updated to include answers to common questions from this topic.
Current users of this MOD simply overwrite includes/page_permissions.php and admin/admin_page_permissions.php with the new files included in this download and add one language string to language/lang_english/lang_admin.php as shown here:
Code: Select all
$lang['Click_return_page_admin'] = 'Click %sHere%s to return to Page Permissions Admin';
This MOD has been resubmitted to the MOD-DB after corrections were applied that should fix the reasons for the prior rejection.
Edit March 31, 2006
Updated title, changed status to Release Candidate (RC)
One minor change in the code
Download package includes the update instructions from 0.7.0 all the way up to 1.0.0
Versions prior to 1.0.0 will not be debugged / supported from this point forward.
Notes below are preserved for historical purposes only, and will not be maintained any further.
*** Begin 0.8.4 Notes *** (Mar 6, 2006)
Rewrite cache after mass enable / disable feature is used
*** End 0.8.4 Notes ***
*** Begin 0.8.2 Notes *** (Mar 5, 2006)
Added more language entries, hopefully have them all now
Added ability to mass update enable / disable pages on main list
*** End 0.8.2 Notes *** (Mar 5, 2006)
*** Begin 0.8.0 Notes *** (Feb 22, 2006)
Fixed bug where admin page views were not counted
Changed function name from set_defaults() to set_default_page_permissions() to try to avoid potential conflicts
Added missing language entry
Fixed bug where file cache was not being used
Minor updates to cache writing process
0.8.0 Download includes update instructions from 0.7.3
*** End 0.8.0 Notes ***
*** Begin 0.7.3 Notes *** (Feb 13, 2006)
Fixed a bug where Moderators could see Admin only pages
Added code to bypass nearly the entire module if the logged in user is an ADMIN, no need to check security
Added a switch to activate / deactivate the page view counter increase, if you don't care about the page views you can turn this off, it's on by default
*** End 0.7.3 Notes ***
*** Begin 0.7.2 Notes *** (Feb 12, 2006)
I changed the way that pages were treated if you protected the same path with and without a URL. It should now work properly. Upgrading from a previous version is as simple as downloading from the new link below and overwriting only includes/page_permissions.php, none of the other install instructions have changed.
*** End 0.7.2 Notes ***
*** Begin 0.7.0 Notes *** (Jan 8, 2006)
New features of 0.7.0 include
- Caching of page data
- No more (I hope) hard-coded text, all language entries now
- Added min / max post count to view page
- Changed handling of pages with parameters
*** End 0.7.0 Notes ***
Please note: the screen shots below were for an ALPHA version. Please read this topic for updated screen shots and feature discussions.
[Original post text below]
I'm trying to see if there would be any interest in this MOD before I go to the trouble of writing it up. There are quite a few people that request that the memberlist be private, or that this page require a login, or whatever. I personally am interested in knowing where my web traffic is, but rather than have a simple page counter (there are MODs for that) I wanted a counter per page.
Here's a shot of the admin panel:
A brief explanation...
Disable lets you take a page offline without taking your entire board offline. So if you're MODding the memberlist, for example, you can disable that page while you work on your live board. The admin user ignores the disable setting, and therefore can use the page. You could, in theory, disable every page and as the admin continue to use the entire board while guests and members get a "this page has been disabled" message. The disable message is, of course, an entry in the language file, and so can be customized. No plans to set up a disable message that is custom to each page, but it could be done.
If you want a page to require admin level access at all times, mark it so. Guests, users, and even moderators will get an "insufficient privileges" message when they attempt to access the page. Why not just put the page in the admin folder? You could. I'm not sure I will keep this feature or drop it.
Guest Allowed is probably self explanatory. If you want guests to be able to view the page, say "Yes", otherwise say "No". So if you want to protect the memberlist.php (as I have done in the screenshot shown above) set this flag to "No". The user may be able to click the link to the file, but will be redirected to the login screen if they are not currently logged in.
This is all implemented via an "include" so it should be extremely easy to implement / upgrade. In each file that you want to protect, you'll add a single line of code that includes the page management module. The included code will check the page configuration and check the user status (logged in / out, admin or not) and page status (disable or not) and react accordingly.
Finally, the page counter code is added to the page_tail, as I want every page view to be counted. This is separate from the page management, as it works for every page that you enter into the management screen. Don't want to track views for posting.php? Simply drop that from the table and you won't track page views. The admin screen allows you to edit the page views if - for some reason - you want to adjust the value.
There are still some issues to work out. The tricky one is the profile.php code, as you want guests to be able to register but perhaps not view other user profiles. So profile.php?mode=register should be allowed for guests, while profile.php?mode=viewprofile should not.
Thoughts? If nobody's interested, I won't bother taking the time to write it up. 8)