dougo
Forum Replies Created
-
Forum: Plugins
In reply to: Alternative to password-protection for light security?Yikes! That looks ugly. Let me repost the code so it’s more readable:
If “knowscouple” cookie has not been set
---{If form has been submitted,
------{If the values for bride and groom do not match the
-------actual names of bride and groom
---------{Set “knowscouple” cookie to null and redirect to
----------some other website (maybe a search-engine page
----------with “wedding” and chosen names as arguments).
----------HOW???}
------Else (values do match)
---------{set the “knowscouple” cookie, and continue
----------processing header or go back to start of file.
----------HOW???}}
---Else (form has not been submitted)
------{display the form, which looks like a wedding
-------invitation, with two popup menus in place of the
-------bride & groom’s names. Stop all further processing
-------of index.php. HOW???}}
Else (“knowscouple” cookie has been set)
---{continue with rest of header}Any tips?
Forum: Plugins
In reply to: Alternative to password-protection for light security?Okay, here’s an attempt to place all the logic in one file, the header.php file. There are still a couple of logic structures I’m having trouble with, plus (alas) one redirect I dunno how to do. I’ve marked them in my pseudo-code. Here goes:
If “knowscouple” cookie has not been set
{If form has been submitted,
{If the values for bride and groom do not match the actual names of bride and groom
{Set “knowscouple” cookie to null and redirect to some other website (maybe a search-engine page with “wedding” and chosen names as arguments). HOW???}
Else (values do match)
{set the “knowscouple” cookie, and continue processing header or go back to start of file. HOW???}}
Else (form has not been submitted)
{display the form, which looks like a wedding invitation, with two popup menus in place of the bride & groom’s names. Stop all further processing of index.php. HOW???}}
Else (“knowscouple” cookie has been set)
{continue with rest of header}I’d appreciate any help with the three marked problems!
Forum: Plugins
In reply to: Alternative to password-protection for light security?Thanks! That would mean index.php would become a giant if-else statement, with most of the page stuck after the else, right?
That solves only half the problem, though. How do I deal with the redirects required by the ProcessInvitation page? One goes back to the index.php page; the other sends users elsewhere.
Forum: Plugins
In reply to: Alternative to password-protection for light security?So I’ve been studying my PHP books and I think I can code all of this . . . except one small part still confuses me. How do I do the “redirect”? Both the one in the header of every page and the ones in the ProcessInvitation page (as outlined above)?
From what I’ve read online, there’s a javascript method for redirects, but I’d rather not rely on that. Maybe it’s not an actual “redirect” I’m after. It’s more of a “stop processing this PHP script immediately and go to this one instead.” Any hints on how to do that?
Forum: Plugins
In reply to: Alternative to password-protection for light security?Okay, here’s a rough outline of the PHP programming I think would be necessary to accomplish what these people want. I apologize in advance for the pidgin flowchart language. As I look at it, the problem seems pretty trivial. So I’d appreciate some help: would this work? Any logic or coding help would be appreciated.
In Header of every page (WordPress header file for template):
PHP code that asks:
Is “knowscouple” cookie set?
If no, redirect to Invitation page.
If yes, proceed with serving this page.Invitation page:
This page is a form, which sends results to a page called ProcessInvitation.
Form looks like a wedding invitation, but in place of bride & groom’s names are two popup menus.ProcessInvitation page
PHP code that asks:
Do the values for bride and groom match the actual names of bride and groom?
If no, redirect to some other page (maybe a search-engine page with “wedding” and chosen names as arguments).
If yes, set the “knowscouple” cookie, and redirect to home page.I think that’s it. Am I missing anything?
Forum: Plugins
In reply to: Alternative to password-protection for light security?Everyone: Thank you for the suggestions and interesting discussion. I think the robot.txt and no-pinging suggestions especially are very good and I will certainly implement them, though I don’t think that they’ll solve the entire problem by themselves. The clients said they wanted the site to be up for a year or so (for photos and thank-yous after the fact), certainly long enough to gain some links and as a result, indexing from search engines, which is what they said they didn’t want. They aren’t celebrities or super-rich people by any means — mostly I think they just want their site to be visible to its intended audience only. Having two popups listing maybe 15 names each means maybe just a mild deterrent to people who really want to get by the curtain (15×15=225 possible combinations), but mostly it should keep out search engines even after somebody links.
I’m going to work a little and outline the logic behind the code I’m envisioning so it’ll become more clear, and maybe someone who knows PHP better than I do (that’s most people here, I presume) can help me figure out how to code it, or figure out what template to attach it to, since it sounds like there isn’t a ready-made solution for this “mild security” situation.
Forum: Plugins
In reply to: Alternative to password-protection for light security?Those are both great suggestions. Unfortunately, the clients would prefer a solution that doesn’t *look like* a password — also I think they’re afraid requiring one might scare off some of the less-sophisticated guests, since password popups still ask for “Username” and “password,” not “bride” and “groom.” They thought a simple mock-wedding invitation where you chose the name of the bride and groom from a popup menu wouldn’t make them look needlessly fussy (most wedding sites are public, after all). And silly me, I thought it wouldn’t be too difficult . . .
I’ll take a look at the Angsuman’s Authenticated plugin. Maybe it could be altered to have the authentication served up by a PHP page? Or is there a simpler way?