Hello All
Is there a way to redirect unregistered users to a page that says 'you need to register or login', instead of redirecting to the homepage when they try to access protected content?
I am using Elgg 1.5 as 1.6.1 does not work with my template. Basically the 'Click to dismiss' green bar does not work with my template. Has anybody else expreienced this? If it helps I am using this template:
http://community.elgg.org/pg/plugins/baltej/read/119792/free-elgg-template-1--edesignerznet-updated
Many Thanks
Lee
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.
- Malaga Jack@malagajack
Malaga Jack - 0 likes
- gone@goofbucket
gone - 0 likes
- Malaga Jack@malagajack
Malaga Jack - 0 likes
- gone@goofbucket
gone - 0 likes
- Malaga Jack@malagajack
Malaga Jack - 0 likes
- Lee M@Lee_M
Lee M - 0 likes
- Lee M@Lee_M
Lee M - 0 likes
You must log in to post replies.very good question it is something I've thought about that is needed on no public sites.
There is something called the gatekeeper that will check log-ins I haven't delved into this yet as I have to much other stuff with higher priorities. However I don't know whether it would be possible to build some kind of a hook to grab a none logged in user and redirect them to a non gate keeper page.
About your template question it would be better to post this in the template plugin area itself.
@MJ I wish I had the link but there used to be a plugin to redirect. Can't remember what it was called though
Hi goofs
I have and use the redirect plugin but if it is that one It presupposes that you have logged in, or maybe you are referring to something else.
I think what Lee is referring to is.
Lets say you have latest users on your index page and a non logged in user clicks on their picture. They are then directed into the site to the persons profile page, even if the profile is set to logged in users only. All info on that page other than the members profile picture is blank. However (and this is a big however) there are a bunch of links under the profile icon such as friends, albums, groups, etc ... You can find a lot of information about someone if you know who their friends are and what the names of their groups are.
Put it this way when I build a site map for google if I have no inside links on my index page I get about 7 pages in my site map. registration, external pages, the index page (thats five pages and I cant remember what the other 2 are . However if I have one inside link on my index page I get over 2000 pages indexed on the site map. (my site map generator stops at 2000 pages) This sugests you can get into every page of the site without being logged in. The content will be hidden but not the title.
I think lee would like a simple redirection to an explanation page of the wonders that await you if you register. ( well thats what I would like)
Well, very nice indeed. I think your right @MJ it may have been the internal redirect I was thinking of, sorry @Lee did not mean to get your hopes up. Now @MJ you and I have to talk more about site maps and google, another thread...lolol
@Goofs
site maps are very important if you wanna move or start a thread do it in elggalaxy and I'll pick it up
Hello All
@MJ That is a much better description of what I wanted, thank you.
I have looked at the gatekeeper function and can see it is calling another function called forward().
I have found this function in elgglib.php and changed:
function forward($location = "") {
global $CONFIG;
if (!headers_sent()) {
to
function forward($location = "http://google.com") {
global $CONFIG;
if (!headers_sent()) {
If I now try and access something protected by gatekeeper, (in my case some games I have included using customeyes), it redirects to Google unless I am logged in. I guess I can substitute Google for a custom page on my site.
I have never looked at php before and am not a programmer so does anybody see any problems in making this change?
Many Thanks
Lee
Also I have edited /mod/groups/index.php and changed:
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
to
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
However it still allows me to see the groups page without logging in. Have I done this wrong?
Thanks
Lee