mirror of https://github.com/itflow-org/itflow
Update .gitignore and add custom directories to /admin /client /guest /user Example Documentation coming soon
This commit is contained in:
parent
e966cd3068
commit
5c448c05a9
|
|
@ -25,6 +25,14 @@ plugins/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer/CSS/*
|
||||||
xcustom/*
|
xcustom/*
|
||||||
!xcustom/readme.php
|
!xcustom/readme.php
|
||||||
post/xcustom
|
post/xcustom
|
||||||
custom/*
|
|
||||||
!post/xcustom/readme.php
|
!post/xcustom/readme.php
|
||||||
|
admin/custom/*
|
||||||
|
!admin/custom/readme.php
|
||||||
|
client/custom/*
|
||||||
|
!client/custom/readme.php
|
||||||
|
guest/custom/*
|
||||||
|
!guest/custom/readme.php
|
||||||
|
user/custom/*
|
||||||
|
!user/custom/readme.php
|
||||||
.zed
|
.zed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
- Custom Pages -
|
||||||
|
If you wish to add custom pages to ITFlow, add them to this directory"
|
||||||
|
Link to Documentation for File Directory Structure and examples
|
||||||
|
*/
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- Custom Pages -
|
- Custom Pages -
|
||||||
|
|
||||||
If you wish to add custom pages to ITFlow, add them to this directory with the prefix "custom_"
|
If you wish to add custom pages to ITFlow, add them to this directory"
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ITFlow - Custom GET/POST request handler
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once "../config.php";
|
|
||||||
require_once "../functions.php";
|
|
||||||
require_once "../includes/check_login.php";
|
|
||||||
|
|
||||||
// Define a variable that we can use to only allow running post files via inclusion (prevents people/bots poking them)
|
|
||||||
define('FROM_POST_HANDLER', true);
|
|
||||||
|
|
||||||
|
|
||||||
// Determine which files we should load
|
|
||||||
|
|
||||||
// Parse URL & get the path
|
|
||||||
$path = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH);
|
|
||||||
|
|
||||||
// Get the base name (the page name)
|
|
||||||
$module = explode(".", basename($path))[0];
|
|
||||||
|
|
||||||
// Strip off any _details bits
|
|
||||||
$module = str_ireplace('_details', '', $module);
|
|
||||||
|
|
||||||
// Dynamically load admin-related module POST logic
|
|
||||||
if (str_contains($module, 'custom')) {
|
|
||||||
// Dynamically load any custom POST logic
|
|
||||||
|
|
||||||
include_once "post/$module.php";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logout is the same for user and admin
|
|
||||||
require_once "../post/logout.php";
|
|
||||||
|
|
||||||
// TODO: Find a home for these
|
|
||||||
|
|
||||||
require_once "../post/ai.php";
|
|
||||||
require_once "../post/misc.php";
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
- Custom Pages -
|
|
||||||
|
|
||||||
If you wish to add custom pages to ITFlow, add them to the xcustom folder in the root directory with the prefix "xcustom_"
|
|
||||||
e.g. If your page was called my_page_one, name it "xcustom/xcustom_my_page_one.php"
|
|
||||||
Note: If required, you can use the Custom Links module to have the page show on the user sidebar.
|
|
||||||
|
|
||||||
To process POST data via your custom pages, create a file in this directory (post/xcustom) named after your page (e.g. xcustom_my_page_one.php).
|
|
||||||
The relevant file will be automatically loaded upon a POST request based on the referer - your form just needs to target the standard root/post.php.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?php
|
|
||||||
require_once "../includes/inc_xcustom.php";
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- Breadcrumbs-->
|
|
||||||
<ol class="breadcrumb">
|
|
||||||
<li class="breadcrumb-item">
|
|
||||||
<a href="index.html">Dashboard</a>
|
|
||||||
</li>
|
|
||||||
<li class="breadcrumb-item active">Blank Page</li>
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
<!-- Page Content -->
|
|
||||||
<h1>Blank Page</h1>
|
|
||||||
<hr>
|
|
||||||
<p>This is a great starting point for new custom pages.</p>
|
|
||||||
|
|
||||||
<?php require_once "../includes/footer.php";
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
- Custom Pages -
|
||||||
|
|
||||||
|
If you wish to add custom pages to ITFlow, add them to this directory"
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
- Custom Pages -
|
||||||
|
|
||||||
|
If you wish to add custom pages to ITFlow, add them to this directory"
|
||||||
|
|
||||||
|
*/
|
||||||
Loading…
Reference in New Issue