Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Making a 'child page' password protected when it holds a forum (http://forum.bytesforall.com/showthread.php?t=1029)

Steven Mar 31, 2009 08:27 AM

Making a 'child page' password protected when it holds a forum
 
A unique problem for sure...I have installed a plugin called XDForum. It's almost exactly like this forum...it's cool because it intergrated right into a blog should you have a need for both types of interaction/communication etc.

Herre's my problem/question:

I want my blog to have a totally private bulletin board forum "hiding" in my blog. The public can see a link on the menu/page bar or perhaps a link embeded in a side-bar test widget but if you click on it all you should see is a "password required" message and a box (perhaps some explanitory text). And then you put in a pass word and it takes you to the "secret forum".

I have tried to do this with a simple password protected page but strangly it does not hide the forum...I have also tried a child page but it makes a menu drop down item and I do not want that either.

How could I accomplish this design goal?

My site is:

www.NutritionWire.org and if you or anyone would like to see the forum (before I figure this out and you need a password to see it) just click on the menu bar item that says DACBN Forum.

Thanks Flynn...the checks in the mail!

Steven Mar 31, 2009 06:39 PM

By the way...I don't have to use a "Parent and Child" page to do what I want (Hide the page unless you have the secret password to open it)...I just thought that that would be one way to do it.

The forum with in this theme looks so good I can't take how happy I am.

Anyone have any advice on the best way to list a bunch of recipies? I thought it would be cool if I could have a way for my readers to print each one separatly...right now I am just putting them all on one page...take a look at the page called BREAKFASTS...any advice is GREATLY appreciated!

LOOK Here -----> http://nutritionwire.org/healthy-recipies/breakfasts/

There has to be a better way to do this...I didn't want to make each recipie its own page...that dumb, right?

Flynn Mar 31, 2009 07:11 PM

The following may not work.

The problem is we're going to protect a directory that does not even exist in reality (its just a WP permalink redirection). Protecting a real directory would have been easier.

It may be required to edit the plugin and include a PHP based authentication there, instead of this Apache based directory authentication below:


1.) Create one or several username/password combinations, i.e. here http://www.htaccesstools.com/htpasswd-generator/
paul:mypass123 will become something like
paul:49f8cns83%638d(83hndjdoejdbeiro39ejs

2.) Copy the result, i.e.:

paul:34fi3beck3b5i3hvow3nkef
otheruser:293jfhfeje3fbi347383fz73f
mary:9343jkkfekfekfekf44i43hf3hf3i4fi3

and save it in a file named ".htpasswd"

3.) Upload this file to somewhere OUTSIDE the web accessible area on your web hosting account
(although the passwords are encrypted, but to be sure)

Example:

/var/www/html/clients/paul/nutritionwire.com/_public_html/wordpress installation here
/var/www/html/clients/paul/.htpasswd <-- .htpasswd file outside (= above) _public_html folder

4.) Create a directory "forum" in the Wordpress installation directory
/var/www/html/clients/paul/nutritionwire.com/_public_html/forum/

5.) Create a file named .htaccess with this content (Edit the path in the first line to match the actual location of your .htpasswd file)

AuthUserFile /var/www/html/clients/paul/.htpasswd
AuthName "Any Title, user will see this on Login Form"
AuthType Basic
require valid-user
# Repeating the Wordpress permalinks htaccess here for the forum directory
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

6.) Upload this new .htaccess file to
/var/www/html/clients/paul/nutritionwire.com/_public_html/forum/.htaccess


All times are GMT -6. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.