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
How to make index.php starting page
#1
Hello,
I'm very new to US, i'm trying to figure out how it works.
I found that i should place my files in the directory /userc. This works fine (as expected)
I want to use index.php as my starting page where users can login or register.
But if i copy index.php from root to /userc/ and modifie some text to distinguish from the one in root and go to my website: localhost/spice/ i still get the original index.php from the root. I also modified
PHP Code:
require_once '../users/init.php'

which works with other pages.
Should i edit index.php from the root to change it into what i want? or am i doing something wrong? As i understand that at an upgrade the index.php from the root will be overwrote by the new one.
Best regards,
Nicolas
  Reply
#2
So you're close. The MAIN purpose of usersc is if (for example) you don't like our users/login.php file and you want to make your own. Then you copy login.php from users/ to usersc/ and it will load yours instead of ours. Note that I said copy, not move.

That said, you're welcome to put whatever else you want in usersc, but you don't have to.

So you can leave index.php in the root folder and edit it to your heart's content. Personally, I put all my other personal pages in the root folder also unless I really want to group them in subfolders. If you want to use folders other than users, usersc and root, then edit the file z_us_root.php in the root folder and userspice will magically monitor those folders too.

Does that make sense?
  Reply
#3
Hello Mudmin,
Thanks for your fast reponse. Everything is clear now thanks to your explanation except for what happens with my modified index.php in the root folder after an upgrade.
Best regards,
Nicolas
  Reply
#4
We don't touch index.php during upgrades. The only reason it's even there on install is so your site works right away. Our general thought as we write software updates is:

1. We will change whatever we need to change in the /users folder because we give the users ways to do pretty much anything you'd ever want to do without modifying those files. If there's ever something you don't think you can do, just ask, there's probably a way around editing the "core" files. We try really hard not to do anything that would break your existing project.

2. We never edit files in usersc. If there is ever a reason to, we might suggest that you edit them, but we assume everything in usersc is modified so we don't write over it.

3. We may add files to usersc if they give you new functionality and flexibility. For instance, the next update will add plugin and templates folders to usersc. The reason we put them there is because you are free to edit those to your heart's content.
  Reply
#5
Again, thanks a lot for your fast answer. I'm really reasured now. Really a fine piece of software!, thanks for sharing it.
Nicolas
  Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)