Browse Source

removed index.html files for custom routes and custom pages

CauseFX 4 years ago
parent
commit
0b817f2a28
2 changed files with 0 additions and 70 deletions
  1. 0 43
      api/pages/custom/index.html
  2. 0 27
      api/v2/routes/custom/index.html

+ 0 - 43
api/pages/custom/index.html

@@ -1,43 +0,0 @@
-Place all custom page files here in this directory....
-
-Name file something like "custom_code_presentation.php" and make sure to start page contents like so:
-<pre>
-&lt;?php
-    /*
-     * Make sure to edit "name_here" with your page name - i.e. custom_code_presentation
-     * You will edit on both "$GLOBALS['organizrPages'][] = 'name_here';" and "function get_page_name_here($Organizr)"
-     */
-    $GLOBALS['organizrPages'][] = 'name_here';
-    function get_page_name_here($Organizr)
-    {
-        if (!$Organizr) {
-            $Organizr = new Organizr();
-        }
-        /*
-         * Take this out if you dont care if DB has been created
-         */
-        if ((!$Organizr->hasDB())) {
-            return false;
-        }
-        /*
-         * Take this out if you dont want to be for admin only
-         */
-        if (!$Organizr->qualifyRequest(1, true)) {
-            return false;
-        }
-        return '
-            &#x3C;script&#x3E;
-                // Custom JS here
-            &#x3C;/script&#x3E;
-            &#x3C;div class=&#x22;panel bg-org panel-info&#x22;&#x3E;
-                &#x3C;div class=&#x22;panel-heading&#x22;&#x3E;
-                    &#x3C;span lang=&#x22;en&#x22;&#x3E;Template&#x3C;/span&#x3E;
-                &#x3C;/div&#x3E;
-                &#x3C;div class=&#x22;panel-wrapper collapse in&#x22; aria-expanded=&#x22;true&#x22;&#x3E;
-                    &#x3C;div class=&#x22;panel-body bg-org&#x22;&#x3E;
-                    &#x3C;/div&#x3E;
-                &#x3C;/div&#x3E;
-            &#x3C;/div&#x3E;
-        ';
-    }
-</pre>

+ 0 - 27
api/v2/routes/custom/index.html

@@ -1,27 +0,0 @@
-Place all custom route files here in this directory....
-
-Name file something anything you like...
-<pre>
-&lt;?php
-
-    /*
-     * The first thing you need to edit it the <code>get</code> part - options are get/post/delete/put/options
-     * The second thing you need to edit is the </code>/something</code>
-     * This will be the endpoints name and will be accessible from: http://organizr/api/v2/custom/something
-     */
-
-    $app->get('/custom/something', function ($request, $response, $args) {
-        // Let's define the Organizr Class to the $Organizr variable
-        $Organizr = ($request->getAttribute('Organizr')) ?? new Organizr();
-        // Now let's set auth on our function, 1 is for co-admin and upto 999 is for Guest
-        if ($Organizr->qualifyRequest(1, true)) {
-            // Let's assign the api response with our function that holds our data...
-            $GLOBALS['api']['response']['data'] = $Organizr->getAllUsers();
-        }
-        // You do not need to change anything else below this line
-        $response->getBody()->write(jsonE($GLOBALS['api']));
-        return $response
-            ->withHeader('Content-Type', 'application/json;charset=UTF-8')
-            ->withStatus($GLOBALS['responseCode']);
-    });
-</pre>