Loading...
 
Features / Usability

Features / Usability


Page Not Found for Registered Users

posts: 37

1. Tiki 14

I am the sole editor of my wiki, which is odd, I know. Tiki just did such an amazing job with the structure that I didn't want to use Drupal. But I digress.

I know how, and have, set up a custom "Page Not Found" page for anonymous users. But I'd like to re-direct registered users to the same page. My students are only allowed to contribute to forums and edit their assigned student page. I know this wouldn't be a 'standard' feature, due to the community feel of wikis in general.

I'm assuming the redirect for anony. is in the code somewhere, and I'd have to set it up for a second group to be included in that if statement. I'm not sure where to look, however.

posts: 214

If you are willing to change the code to accomplish this, it is a small change, but you must remember that updates in the future may remove your change.

If you are redirecting to your custom "Page Not Found" page for anonymous users by having set the General, Navigation, "URL an anonymous is redirected when page not found" option, then that option is checked in tiki-index.php. The code that checks it looks like this:

Copy to clipboard
if (!$isprefixed && !empty($prefs['url_anonymous_page_not_found']) && empty($user)) { $access->redirect($prefs['url_anonymous_page_not_found']);


When someone is logged in, the $user is not empty so they are not sent to the custom "Page Not Found". You can have it ignore if someone is logged in by removing the "&& empty($user)" so it looks like:

Copy to clipboard
if (!$isprefixed && !empty($prefs['url_anonymous_page_not_found'])) { $access->redirect($prefs['url_anonymous_page_not_found']);


And then it will redirect even if the page was not found for a logged in user.

Tom

posts: 37

Perfect. Thank you. I have no problem changing the code at all.

I will get back to you if there are any problems!


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting