The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remove /users or /usersc path
#1
Hei guys,

first of all, thank you for this great project!

we try to setup userspice for a tool we like to build.

now we are struggeling with the following issue:

we try to setup our project on a subdomain like sub.example.com
if we run the installer everything works fine so far.
but is there a possibility to remove the /users path in the domain except dragging everything into the root folder?

So what we have is: sub.example.com/users/login.php
And what we actually want is: sub.example.com/login.php


also we have the problem that if I type in 'sub.example.com/users/ it redirects to 'sub.example.com//users/login.php'.
we don't have any idea where the double slash comes from.


thank you
  Reply
#2
I'm fixing the extra \ issue in 4.1.8. Sorry about that.

As for getting rid of the users folder, it would involve manually changing a lot of links. Personally...if it was me.... I would move the login/logout/register files to the root and then make sure all the paths to the init file are right. Then you can edit the navigation to point to the right places. It really shouldn't matter if all the admin stuff is in the users folder.

The only thing you'll have to keep an eye out for is updates...you'll have to manually tweak those files if they're updated. The main reason for creating the users folder was to keep our files out of your way so you can create whatever you want in your root. If you don't want to do that, userspice will work fine with some core files in your root.
  Reply
#3
-off-topic-

This use-case would provide an argument for making all redirect::to() calls relative with just the script name. Then the Redirect::to() has the (configurable) list of directories that it searches, one-by-one, until it finds an existing one. Thus if you want to change the location of a script, you just move/copy it into the desired location or else create a stub (with only the require_once("original/path/to/script.php") call) in the desired location. The former (moving the script) is slightly easier but the latter (stubs) solves the problem of future upgrades. Both are contingent on removing
Code:
"users/"
and
Code:
$us_url_root.
from all calls to Redirect::to(). Surprisingly, it looks like this would only be about 9 occurrences in UserSpice4.
  Reply
#4
I like that...and z_us_root.php already contains an array of paths that US monitors. Then my guess is we would need another method in the event we need to Redirect::out('https://google.com');
  Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)