02-25-2017, 05:03 PM
Absolutely. None of that stuff is required.
So if you are not using the userspice files, you should definitely leave them where they are because other things might depend on them, but all you need to include is init. So if your files are in the users folder you should put
<?php require_once 'init.php'; ?>
If you're putting your files in the root below users, you should do...
<?php require_once 'users/init.php'; ?>
If you have
root/users
root/myfiles
You should do
<?php require_once '../users/init.php'; ?>
You get the idea.
From there, you have a few things you want to look at...
To control a page with userspice (block people from visiting without permission, you definitely need)
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
So then it's a matter of what's in our header that you might want to include in yours without taking any of the US styling.
At minimum, I would put these lines in your header...
$db = DB::getInstance(); //mandatory if you want to access the database
$settingsQ = $db->query("Select * FROM settings"); //Get access to all settings including site_offline
$settings = $settingsQ->first();
if ($settings->site_offline==1){
die("The site is currently offline.");
}
Then you can decide if you want to include the sections for guest tracking, force ssl, etc. But basically anything you take above line 73 in users/includes/header.php will give you functionality of userspice without any of the look and feel.
I hope that helps and I hope you find the system really flexible.
So if you are not using the userspice files, you should definitely leave them where they are because other things might depend on them, but all you need to include is init. So if your files are in the users folder you should put
<?php require_once 'init.php'; ?>
If you're putting your files in the root below users, you should do...
<?php require_once 'users/init.php'; ?>
If you have
root/users
root/myfiles
You should do
<?php require_once '../users/init.php'; ?>
You get the idea.
From there, you have a few things you want to look at...
To control a page with userspice (block people from visiting without permission, you definitely need)
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
So then it's a matter of what's in our header that you might want to include in yours without taking any of the US styling.
At minimum, I would put these lines in your header...
$db = DB::getInstance(); //mandatory if you want to access the database
$settingsQ = $db->query("Select * FROM settings"); //Get access to all settings including site_offline
$settings = $settingsQ->first();
if ($settings->site_offline==1){
die("The site is currently offline.");
}
Then you can decide if you want to include the sections for guest tracking, force ssl, etc. But basically anything you take above line 73 in users/includes/header.php will give you functionality of userspice without any of the look and feel.
I hope that helps and I hope you find the system really flexible.