phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Links to phpGW items


From: Dave Hall
Subject: Re: [Phpgroupware-developers] Links to phpGW items
Date: Wed, 18 Sep 2002 21:43:02 +1000

Daniel & mr_e,

This is also a feature I desire.  Sime time ago I had some thoughts
about how (but not actually tried) to implement this.  Here is my
suggestion:

Somewhere in the login.php script file:

$server_absolute_url = ( ( !is_intger (strpos
($GLOBALS['phpgw_info']['server']['webserver_url'], 'http') ) && (
strpos ($GLOBALS['phpgw_info']['server']['webserver_url'], 'http') !=0 )
)  ? $_SERVER['SERVER_NAME'] .
$GLOBALS['phpgw_info']['server']['webserver_url'] :
$GLOBALS['phpgw_info']['server']['webserver_url'] );

if( !empty (trim( $_SERVER['HTTP_REFERER'] ) ) )
{
  $link_url = strstr( $_SERVER['HTTP_REFERER'], $server_absolute_url )
  if( $link_url )
  {
    $this->t->set_var('goto', $GLOBALS['phpgw']->link($link_url);
  }
}
else
{
  $this->t->set_var('goto', $GLOBALS['phpgw']->link($link_url);
}
Then somewhere in the script that checks the login:

if( !empty( $_POST['goto'] ) )
{
  Header('Location: ' . $GLOBALS['phpgw']->link( $_POST['goto'] ) );
  exit;
}

As I said I have not implemented this and it is only a concept, but it
might give someone the inspiration to do it and I am sure people can
improve on it.  I have not looked at that code for some time. I also
apologie for the poor formatting ... email is not real good when you
need the col width to be wider than 80chars :)

The other advantage is that if a user's session times out they are able
to re login and return to where they left off.  Unfortunately they may
still lose their very long email they were bashing out ... but they
should have had the notify window open.

Let me know what you think.

Cheers,

skwashd


"Patrick J. Walsh (mr_e)" <address@hidden> wrote:
>
> Daniel,
> 
>    You are right, there should absolutely be a mechanism for 
> redirecting to a 
> particular page after logging in.  Unfortunately, this 
> functionality does 
> not yet exist.  I've been meaning to look into making it work.  
> There's a 
> good chance there will be something that does this in CVS in the 
> near 
> future.
> 
> ..mr_e
> 
> 
> --On Wednesday, September 18, 2002 11:16 AM +0200,
> --Koller Daniel <address@hidden> wrote:
> 
> >
> > Hello,
> >
> > as far as i noticed, it is at the moment not possible to provide 
> (from> outside phpgw) links, that point to links inside phpGW. 
> (For example, the
> > new phpTree-module has a link format for downloading a certain 
> document),> but if you don't have a session, you end up with the 
> login screen (which
> > is ok), but then you don't get redirected to where the link was 
> pointing> to.
> >
> > Does anybody know something about this issue, (best if somebody 
> knows> already, and can say enable this or that,...)
> >
> > Regards,
> >
> > Daniel
> >
> >
> >
> > _______________________________________________
> > Phpgroupware-developers mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> 
> 
> 
> 
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
> 

Attachment: dave.hall.vcf
Description: Card for <dave.hall@mbox.com.au>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]