Welcome, Guest
Username: Password: Remember me
1. The "search..." box above searches the Docs & Forum Posts. The "Search" tab above just searches the Forum Posts. :side:
Please use these to search for your issue *before* creating a new message topic, as your issue may have been previously solved.
2. Please put your Club # and Club Web Address in your Forum Signature (best) OR in each post to get faster support from us.
Click here to edit your signature at the bottom of the Profile Information tab.
3. Our user and admin docs are available at: support.toastmastersclubs.org/doc "There's a doc for that!" ;)
4. There is an "Opt In" Feature for newly added members. The Opt In document explains the strikethrough member information. Click Here to View the Post
5. When posting a New Topic , please include all relevant details and be specific. When did your issue 1st occur? What operating system, browser, & browser version are you using? Did you refresh your browser cache? Are your cookies enabled? Lastly, a screen shot is often helpful.
6. Please abide by the Terms of Use . We are volunteers contributing our spare time. We are happy to assist you, so long as you are respectful and courteous.
7. We are always looking for new FreeToastHost Ambassadors to join our team and support fellow Toastmasters in their use of the FreeToastHost website system. If you are familiar with the system and have some interest, send a Send Us a Private Message.
  • Page:
  • 1

TOPIC:

Add Member Ony to Unlisted Access Custom Web Pages 8 years 2 weeks ago #56137

  • StanGreen
  • StanGreen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 42
  • Thank you received: 6
When creating a custom web page, you can set it to Public, Members or Officer access. When you create a Unlisted Access page, it is always public. Yes, the page is hidden, but if someone was able to access the page with the link, there is no security around it. For example, an internal club page is created. A person, who is a member at the time, book marks the page. They then let their membership laps and are removed from the members only links. However, if they use their bookmark, they can still access the page. What I would expect is if they are not logged in, they would get some sort of error and be redirected back to the home page or a login page. This is a simple example, but I can think of many more that would be much worse then one person accessing the page.
Stan Green
Novi Toastmasters (3733)
novitoastmasters.com

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 2 weeks ago #56139

  • Jane Atkinson
  • Jane Atkinson's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 4020
  • Thank you received: 882
I agree with this. I've often had reservations about making a member-only page hidden, for exactly these reasons.
VPE Ernst&Young Achieving Potential, club 1137486 (Auckland, NZ)
FreeToastHost Field Officer, District 112 (Northern New Zealand)

Spare yourself anxiety and Backup your site regularly.

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56202

  • StanGreen
  • StanGreen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 42
  • Thank you received: 6
If anyone would like a workaround, I came up with this javascript. It seems to meet about 85% of my needs so it is better than nothing.
<!-- Check Logged In -->
<script language="JavaScript">
function getCookie(cname)
{
var name = cname + "=";
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca;
while (c.charAt(0)==' ') c = c.substring(1);
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
}
return "";
}

var LoggedIn = getCookie("FTH.MSID");

if(LoggedIn.length < 1)
{
window.location = "http://" + window.location.host + "/";
}
</script>
<!-- End of Check Logged In -->
Stan Green
Novi Toastmasters (3733)
novitoastmasters.com

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56203

  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • FreeToastHost Developer
  • FreeToastHost Developer
  • Posts: 13529
  • Thank you received: 3831
Your test is flawed, since the actual test checks whether the cookie value matches what is in the db, not whether a cookie value exists.

A reliable method is to just check for the existence of element id memberlogout which is the member logout button. E.g.,
var LoggedIn = !!document.getElementById("memberlogout");

Of course, if I choose to change that ID, well, all bets are off... ;)
Regards,

Steve James, DTM
FreeToastHost System Developer
Officer Emeritus, Mindful Communicators (Club 1966, District 52) A President's Distinguished Club for each of the last 10 years.

>>> Please put your club number in your forum profile. CLICK here to edit your profile.

Please Log in or Create an account to join the conversation.

Last edit: by SteveTheTechie.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56206

  • StanGreen
  • StanGreen's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 42
  • Thank you received: 6
Yes, I know this is a hack, which is the 85%. In all my testing, which I admit was somewhat limited, I always saw the session cookie (i.e. FTH.MSID) being deleted on logout.

Using the element ID make the code simpler as I don't need to parse the cookie. (As long as the ID does not change.) My one question is why the double exclamation points (i.e. !!) . Does this not just return the getElementById result?

New code (using Steve's concept)

<!-- Check Logged In -->
<script language="JavaScript">
if (!document.getElementById("memberlogout"))
{
window.location = "http://" + window.location.host + "/";
}
</script>
<!-- End of Check Logged In -->
Stan Green
Novi Toastmasters (3733)
novitoastmasters.com

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56207

  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • FreeToastHost Developer
  • FreeToastHost Developer
  • Posts: 13529
  • Thank you received: 3831
!! is "bang bang" ... forces boolean result... It converts a "truthy" value to pure boolean. (look it up)
There are cases where a boolean result (and only a boolean result) is what is really needed.
Regards,

Steve James, DTM
FreeToastHost System Developer
Officer Emeritus, Mindful Communicators (Club 1966, District 52) A President's Distinguished Club for each of the last 10 years.

>>> Please put your club number in your forum profile. CLICK here to edit your profile.
The following user(s) said Thank You: StanGreen

Please Log in or Create an account to join the conversation.

Last edit: by SteveTheTechie.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56208

  • Pam
  • Pam's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 3597
  • Thank you received: 1071
Steve - could something be added to the system to provide an extra category for Private Unlisted pages?
Pam Holley, DTM
FreeToastHost Ambassador
Redlands Toastmasters Club, Secretary 2023-2024 redlands.toastmastersclubs.org/
HOT, President 2023-2024 hot.toastmastersclubs.org

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56209

  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • FreeToastHost Developer
  • FreeToastHost Developer
  • Posts: 13529
  • Thank you received: 3831

Steve - could something be added to the system to provide an extra category for Private Unlisted pages?


It will not be done that way.
Regards,

Steve James, DTM
FreeToastHost System Developer
Officer Emeritus, Mindful Communicators (Club 1966, District 52) A President's Distinguished Club for each of the last 10 years.

>>> Please put your club number in your forum profile. CLICK here to edit your profile.

Please Log in or Create an account to join the conversation.

Add Member Ony to Unlisted Access Custom Web Pages 8 years 1 week ago #56210

  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • FreeToastHost Developer
  • FreeToastHost Developer
  • Posts: 13529
  • Thank you received: 3831
Keep in mind that I tend to think much faster than I can produce the code. I am essentially already 2 FTH versions ahead in my mind...

It is the code implementation, the testing, the maintaining and all the other stuff that takes up the real time. I tend to keep my ideas to myself so you guys don't kill me demanding everything be done tomorrow. hehe

I just need someone to invent a data download cap that I can wear... :lol:
Regards,

Steve James, DTM
FreeToastHost System Developer
Officer Emeritus, Mindful Communicators (Club 1966, District 52) A President's Distinguished Club for each of the last 10 years.

>>> Please put your club number in your forum profile. CLICK here to edit your profile.
The following user(s) said Thank You: Jane Atkinson, Pam

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: Pamrhtaylor3jliumarc33NotLiabledeedubbleyooNSBPhyllis Kirouac
Time to create page: 0.039 seconds
Powered by Kunena Forum