Welcome to Geeklog, Anonymous Wednesday, December 25 2024 @ 02:04 am EST

Geeklog Forums

log in on first page - private access


Jeannette

Anonymous
hungry
Hi,

Could anybody tell me whether it is possible to get the log in (access) on a first page and after logging in, forwarding to the rest of the geek log?
I would like to have a privat log, where nobody else than the people I give log in codes will have access. Is that possible with geek log without having to log in twice? (First time as the first access and than again for the geek-log).

Thanks for any info and hopefully a solution and an example. Can someone help me
 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
At the top of index.php, after:
Text Formatted Code

require_once ('lib-common.php');
require_once ($_CONF['path_system'] . 'lib-story.php');

 


Add this:

Text Formatted Code

if (empty ($_USER['username'])) {
        $display = COM_refresh ($_CONF['site_url'] . '/users.php');
}

 


Make sure all tasks require login, config.php:
Text Formatted Code

$_CONF['loginrequired'] = 1; // all of them, if set to 1 will override all else

 
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Much too complicated, IMO.

Almost every object in Geeklog (stories, blocks, etc.) can be set so that it is not visible to anonymous users. So change the permissions for everything that should not be visible if someone's not logged in, set $_CONF['loginrequired'] = 1 and leave a story or static page for the anonymous users telling them that they have to log in first.

I'm doing that on one of my sites with a standard Geeklog install. No code changes necessary ...

bye, Dirk
 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
Hmmm yeah, can you default all articles to work that way? Or would you have to do it for every article manualy though? (plus my solution doesn't stop people guessing SIDS etc)
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by THEMike: Hmmm yeah, can you default all articles to work that way?

Stories submitted by normal users automatically inherit the permissions from the topics.

Stories submitted by Story Admins will default to being visible to anonymous users, but if you set your topic permissions such that the topic isn't visible, then that shouldn't matter.

bye, Dirk
 Quote

All times are EST. The time is now 02:04 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content