1
BDW
Redirect Non-Members to another page
  • 2006/10/7 14:41

  • BDW

  • Quite a regular

  • Posts: 280

  • Since: 2002/9/28


When I edit the system_redirect.html so that it redirects to a certain page whenever anonymous tries to access a certain post or section, not only do non members get redirect to the page but so do members when logging out.

Is there somewhere I can change this so that it only happens when they try to access a post they dont have permission to view?

2
justtupeu
Re: Redirect Non-Members to another page
  • 2006/10/7 19:21

  • justtupeu

  • Just popping in

  • Posts: 78

  • Since: 2005/6/7 8


Once a member logs out, he's just as any other non-member..
Don't see how you could do this.
Vineri triskaideka - contest for Vineri triskaideka phrase

3
iHackCode
Re: Redirect Non-Members to another page

is this a module specific thing you want to do?

for example on cbb/newbb

cbb curently has.
viewtopic.php
if (!$forum_handler->getPermission($viewtopic_forum)){
    
redirect_header("index.php"2_MD_NORIGHTTOACCESS);
    exit();
}


if that person tries to view a forum that they do not have access to. they get a screen that no permission screen and are then redirected to the relative url of index.php
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
Mamba
Re: Redirect Non-Members to another page
  • 2006/10/7 22:50

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


And how could I have a redirect the "no permission" links to something similar as on:

http://www.stefanosnetwork.com/site/

Click on a picture (e.g. link:

http://www.stefanosnetwork.com/site/modules/myalbum0/viewcat.php?cid=41

and you'll see that in action, i.e. above the standard "system_userform.html" he gets the extra block with the message about reasons to register.

I assume, he is using the hack from GIJoe:

http://www.peak.ne.jp/xoops/modules/news/index.php?page=article&storyid=70

but how does he show the message with the reasons to register in a block above the "registration page"?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

5
iHackCode
Re: Redirect Non-Members to another page

Quote:

Mamba wrote:
And how could I have a redirect the "no permission" links to something similar as on:

http://www.stefanosnetwork.com/site/

Click on a picture (e.g. link:

http://www.stefanosnetwork.com/site/modules/myalbum0/viewcat.php?cid=41

and you'll see that in action, i.e. above the standard "system_userform.html" he gets the extra block with the message about reasons to register.

I assume, he is using the hack from GIJoe:

http://www.peak.ne.jp/xoops/modules/news/index.php?page=article&storyid=70


looks like a modified message.. that has html code in it. similiar to the one that was on the instructions to GIJ's hack but center block instead of left. and a different block name.

Quote:

but how does he show the message with the reasons to register in a block above the "registration page"?


this looks like a modified registration form.
include/registerform.php
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

6
Cuidiu
Re: Redirect Non-Members to another page
  • 2006/10/8 1:03

  • Cuidiu

  • Quite a regular

  • Posts: 358

  • Since: 2006/4/23


unhardcore,

Not sure if you have the same xoopsroot/user.php as 2.2.4 but in mine there is code for users after logout. I changed mine like this (see red):
if ($op == 'logout') {
    
$message '';
    
$_SESSION = array();
    
session_destroy();
    if (
$xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
        
setcookie($xoopsConfig['session_name'], ''time()- 3600'/',  ''0);
    }
    
// clear entry from online users table
    
if (is_object($xoopsUser)) {
        
$online_handler =& xoops_gethandler('online');
        
$online_handler->destroy($xoopsUser->getVar('uid'));
    }
    
$message _US_LOGGEDOUT.''._US_THANKYOUFORVISIT;
    
redirect_header('[color=CC0000]/mydirectory/page-for-users-afterlogout.html[/color]'1$message);
    exit();
}) {


I have also used the MyHome module by Solo and it works so nice. I highly recommend it. Great for different home page for users versus anonymous - plus cloning capabilities. 5 stars for wolfpackclan.com/wolfactory !
[size=x-small]Working sites:
XOOPS 2.0.16 PHP 5.2.2, MySQL 5.0.24a-standard-log, Apache/2.0.54 (Unix)
XOOPS 2.2.4, PHP 4.3.10, MySQL 3.23.58, Apache/1.3.33 (Unix)[/size]

7
BDW
Re: Redirect Non-Members to another page
  • 2006/10/8 8:43

  • BDW

  • Quite a regular

  • Posts: 280

  • Since: 2002/9/28


Quote:

Bandit-X wrote:
is this a module specific thing you want to do?


No, I want it to do it whenever anyone anonymous or from a certain "group" tries to access articles or Categories they dont have permission to access so that I can redirect them to a page that tells them why they couldnt access and gives them options.

I suppose i could use your example at the moment as CBB is the only one that has posts that they cant access.

Maybe this is something that module or XOOPS developers could add. Something in admin like..

Permissions Redirect URL (optional): http://

Login

Who's Online

460 user(s) are online (410 user(s) are browsing Support Forums)


Members: 0


Guests: 460


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits