02-21-2017, 01:35 PM
Sorry. I need to update that video.
Basically all you need is a require once/include to the init file and that securepage function.
So if you open up any existing userspice page you'll see
and
The second line you paste right after your menus etc.
The first line goes at the top and needs to point to yourdomain/users/init.php
So, if you are adding a page in the root it's
if you are in mydomain/myfolder and userspice is in mydomain/users it's
Basically you just need that path to be correct. It's always going to be static, so once you figure it out, it shouldn't be too bad. From there, you can decide if you want to include our header. I would suggest doing it because you will have access to a lot of userspice stuff in there.
If you need to put your own stuff in the header and don't want our updates to break it, then create a file called
and put your contact in there.
If you don't want to use our header at all, then you probably want to instnatiate the DB manually and grab the settings table.
You'll also want to include and css/js you need.
Basically all you need is a require once/include to the init file and that securepage function.
So if you open up any existing userspice page you'll see
Code:
<?php require_once 'init.php'; ?>
Code:
<?php if (!securePage($_SERVER['PHP_SELF'])){die();} ?>
The second line you paste right after your menus etc.
The first line goes at the top and needs to point to yourdomain/users/init.php
So, if you are adding a page in the root it's
Code:
users/init.php
Code:
../users/init.php
Basically you just need that path to be correct. It's always going to be static, so once you figure it out, it shouldn't be too bad. From there, you can decide if you want to include our header. I would suggest doing it because you will have access to a lot of userspice stuff in there.
If you need to put your own stuff in the header and don't want our updates to break it, then create a file called
Code:
usersc/includes/head_tags.php
If you don't want to use our header at all, then you probably want to instnatiate the DB manually and grab the settings table.
Code:
$db = DB::getInstance();
Code:
$settingsQ = $db->query("Select * FROM settings");
Code:
$settings = $settingsQ->first();
You'll also want to include and css/js you need.