Viewing 4 replies - 1 through 4 (of 4 total)
  • It certainly is possible, though it entails a lot work.

    A plugin will have to maintain table as follows.

    cat_id | password
    ----------------------
    1 | lkjakne
    2 | opi23kn

    The plugin has to provide an interface in admin panel to allow admin to maintain the table above.

    The plugin then registers the following set of procedures to template_redirect hook
    1. Check if current page is Category page or Singe Post page.
    2. If condition 1 is true, check the table if password is assigned for current Post’s category (Single Post page) or active category (Category page).
    3. If condition 2 is true, check cookies if password is not previously entered.
    4. If condition 3 is true, redirect the page to password form.
    5. Once valid password is entered, record that to cookies and redirect to previous page (Single Post or Category page).

    Thread Starter moshu

    (@moshu)

    Thank you! At least I know it’s possible which is great. Now I just have to wait until a PHP guru writes a plugin like that ??

    Thread Starter moshu

    (@moshu)

    Update. Actually the request is modified: the category page listings the excerpts should be freely available, only the full view of the posts in that category should be password protected.
    Does that make it easier?

    Publically viewable and accessable category, but password-required, and with cookie generation to remember the user’s password submission. A customizeable failure message, and a text field on the category page to describe the contents of the category and requirements for access. (email form/comment requesting password).

    Much appreciated, and much needed for family homepages and other such materials!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Password protected category’ is closed to new replies.