On my website, I have a members section that's in a framset with a navigation bar in one frame and whatever page in the other. I already figured out how to make elgg redirect to this page when a user logs in, but I was just wondering if there was a way to use Elgg to password protect this page so that if a user is not logged they'll have to to view the page?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Elgger@it_happens
Elgger - 0 likes
- U8oL0@U8oL0
U8oL0 - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
- jaxcatz@jaxcatz
jaxcatz - 0 likes
- U8oL0@U8oL0
U8oL0 - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Elgger@it_happens
Elgger - 0 likes
- U8oL0@U8oL0
U8oL0 - 0 likes
- Elgger@it_happens
Elgger - 0 likes
- U8oL0@U8oL0
U8oL0 - 0 likes
You must log in to post replies.I think you will have to include the engine/start.php on those pages... and after that., inlucde the "gatekeeper" funcitons accordingly
I tried putting this on the page, but nothing happened. (I'm a little new to this stuff,
so I'm probably doing something wrong.)
<?php // Get the Elgg engine require_once(dirname(dirname(__FILE__)) . "/engine/start.php"); // Ensure that only logged-in users can see this page gatekeeper(); ?>
@U8 : the elgg engine will be loaded depending on the location of your file. Where is your file placed? From your code you should place, the file inside http://location_to_elgg/folder/file.php. is this the way you placed it? Also if you are embedding it using an iframe, users can directly go the the page, even if you add a gatekeeper function
Use this
http://community.elgg.org/pg/plugins/project/690138/developer/Facyla/cms-pages-editeur-de-pages-statiques
@Te
The file is placed in /members/m/s/ (/m is the main Elgg directory)
@ja
That plugin isn't exactly what I was looking for: I didn't want pages that looked like Elgg, I just wanted a page where you have to be logged into Elgg to see it.
Your code "looks" correct.
I'd question the " /members/ " part of the path tho ?
is that the /mod/members PlugIn ??
Then your include is wrong...
or cain't you see... ?
Hmmm I think the most confusion here is the path... try dirname(__FILE__) in the file, to find its exact path, and the same i start.php to find its path... then you can make it work right...
@El
Thanks for the info, but I'm still a little confused about what you're trying to say. Once again, I'm pretty new at this stuff.
Hmmmmm.. Some thing strange is MOKEYING inside me :).. Well i only mean the you need to specify the right path for your start.php
Step 1
Write
after the
in start.php
Step 2
run elgg
Now you will see only one line output.. that is path to your start.php
Setp 3
Now copy it...
Setp 4
in the file for non elgg page..
write
Hope this helps
Thanks.. :)
It appears to be good so far, so thanks!