1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 00:37:02 +02:00

Remove site profiles: site-classic, site-default, site-beginner, site-languages, site-regular... leaving just site-blank. The other profiles have been moved to their own repos. Also some small updates to site-blank profile just so the template files are slightly more useful if someone doesn't install another.

This commit is contained in:
Ryan Cramer
2021-12-17 13:33:30 -05:00
parent 697158d653
commit fd204c6b01
312 changed files with 142 additions and 16394 deletions

View File

@@ -17,31 +17,31 @@
* This file is licensed under the MIT license
* https://processwire.com/about/license/mit/
*
* ProcessWire 3.x, Copyright 2019 by Ryan Cramer
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
* https://processwire.com
*
*/
if(!defined("PROCESSWIRE")) die();
/*** SITE CONFIG *************************************************************************/
/** @var Config $config */
/**
* Allow core API variables to also be accessed as functions?
*
* Recommended. This enables API varibles like $pages to also be accessed as pages(),
* as an example. And so on for most other core variables.
*
* Benefits are better type hinting, always in scope, and potentially shorter API calls.
* See the file /wire/core/FunctionsAPI.php for details on these functions.
*
* @var bool
*
*/
/*** SITE CONFIG *************************************************************************/
// Let core API vars also be functions? So you can use $page or page(), for example.
$config->useFunctionsAPI = true;
// Use Markup Regions? (https://processwire.com/docs/front-end/output/markup-regions/)
$config->useMarkupRegions = true;
// Prepend this file in /site/templates/ to any rendered template files
$config->prependTemplateFile = '_init.php';
// Append this file in /site/templates/ to any rendered template files
$config->appendTemplateFile = '_main.php';
// Allow template files to be compiled for backwards compatibility?
$config->templateCompile = false;
/*** INSTALLER CONFIG ********************************************************************/

12
site-blank/finished.php Normal file
View File

@@ -0,0 +1,12 @@
<?php namespace ProcessWire;
if(!defined("PROCESSWIRE")) die();
/**
* ProcessWire Request Finished
* ============================
* This finished.php file is called after ProcessWire has finished serving the current
* request. This occurs after the current page has been rendered. This file receives a
* copy of all ProcessWire API variables.
*
*/

12
site-blank/htaccess.txt Normal file
View File

@@ -0,0 +1,12 @@
# Start ProcessWire:pwbphp (install)
# Block PHP files from direct access (optional fallback if root .htaccess missing)
<FilesMatch "\.(php|module|inc)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</FilesMatch>
# End ProcessWire:pwbphp

17
site-blank/init.php Normal file
View File

@@ -0,0 +1,17 @@
<?php namespace ProcessWire;
if(!defined("PROCESSWIRE")) die();
/**
* ProcessWire Bootstrap Initialization
* ====================================
* This init.php file is called during ProcessWire bootstrap initialization process.
* This occurs after all autoload modules have been initialized, but before the current page
* has been determined. This is a good place to attach hooks. You may place whatever you'd
* like in this file. For example:
*
* $wire->addHookAfter('Page::render', function($event) {
* $event->return = str_replace("</body>", "<p>Hello World</p></body>", $event->return);
* });
*
*/

View File

@@ -1,6 +1,7 @@
<?php if(!defined("PROCESSWIRE_INSTALL")) die();
<?php namespace ProcessWire;
if(!defined("PROCESSWIRE_INSTALL")) die();
$info = array(
'title' => "Blank",
'summary' => "This profile includes only the bare minimum pages, fields and templates, giving you essentially a blank slate. ",
'screenshot' => ""
);
);

View File

@@ -1,90 +1,4 @@
ABOUT /SITE/MODULES/
====================
This directory /site/modules/ is where you may install additional plugin modules.
These modules are specific to your site only. There is also a corresponding
/wire/modules/ directory, which contains ProcessWire's core modules (and best to
leave those alone).
If safe for your hosting environment, you may wish to make this directory
writable to PHP so that the installation of your modules can be managed from
ProcessWire's admin. However, this is not necessarily safe in all shared hosting
environments and is completely optional.
Where to get modules?
---------------------
Visit the modules directory at: http://modules.processwire.com
Installing modules from the ProcessWire admin
---------------------------------------------
If your /site/modules/ directory is writable, you can install modules from
ProcessWire's admin directly from the Modules Directory, from a ZIP file or from
a URL to a ZIP file. In your ProcessWire admin, see Modules > New for
installation options.
Installing modules from the file system
---------------------------------------
Each module (and any related files) should live in a directory of its own. The
directory should generally carry the same name as the module. For instance, if
you are installing a module named ProcessDatabaseBackups.module, then it should
live in the directory /site/modules/ProcessDatabaseBackups/.
Once you have placed a new module in this directory, you need to let ProcessWire
know about it. Login to the admin and click "Modules". Then click the "Check for
new modules" button. It will find your new module(s). Click the "Install" button
next to any new modules that you want to install.
Removing modules
----------------
The first step in removing a module is to uninstall it from ProcessWire (if it
isn't already). You do this by going to the "Modules" page, and "Site" tab in
your ProcessWire admin. Click the "Uninstall" button next to the module you
want to remove.
After the module is uninstalled, you may remove the module files. If your
modules file system is writable to ProcessWire, it will give you a "Delete"
button next to the module in your "Modules" admin page. You may click that to
remove the module files.
If your file system is not writable, you may remove the module files manually
from the file system (via SFTP or whatever tool you are using to manage your
files on the server).
Interested in learning how to make your own modules?
----------------------------------------------------
We've created two "Hello World" modules as examples for those interested in
learning module development:
- Helloworld.module demonstrates the basics of modules and hooks.
http://modules.processwire.com/modules/helloworld/
- ProcessHello.module demonstrates the basics of how to create a Process
module. Process modules are those that create applications in the admin.
http://modules.processwire.com/modules/process-hello/
There is a module development forum located at:
https://processwire.com/talk/forum/19-moduleplugin-development/
For a tutorial on how to create modules, see:
http://wiki.processwire.com/index.php/Module_Creation
Additional resources
--------------------
To find and download new modules, see the modules directory at:
http://modules.processwire.com/
For more information about modules, see the documentation at:
http://processwire.com/api/modules/
For discussion and support of modules, see:
http://processwire.com/talk/forum/4-modulesplugins/
This directory is for site-specific plugin modules.
Please see the URL below for more information:
https://processwire.com/docs/modules/about-site-modules/

13
site-blank/ready.php Normal file
View File

@@ -0,0 +1,13 @@
<?php namespace ProcessWire;
if(!defined("PROCESSWIRE")) die();
/**
* ProcessWire Bootstrap API Ready
* ===============================
* This ready.php file is called during ProcessWire bootstrap initialization process.
* This occurs after the current page has been determined and the API is fully ready
* to use, but before the current page has started rendering. This file receives a
* copy of all ProcessWire API variables.
*
*/

View File

@@ -1 +0,0 @@
This file is here to ensure Git adds the dir to the repo. You may delete this file.

View File

@@ -0,0 +1,6 @@
<?php namespace ProcessWire;
// Optional initialization file, called before rendering any template file.
// This is defined by $config->appendTemplateFile in /site/config.php.
// Use this to define shared variables, functions, classes, includes, etc.

View File

@@ -0,0 +1,55 @@
<?php namespace ProcessWire;
// Optional main output file, called after rendering pages template file.
// This is defined by $config->appendTemplateFile in /site/config.php, and
// is typically used to define and output markup common among most pages.
//
// When the Markup Regions feature is used, template files can prepend, append,
// replace or delete any element defined here that has an "id" attribute.
// https://processwire.com/docs/front-end/output/markup-regions/
/** @var Page $page */
/** @var Pages $pages */
/** @var Config $config */
$home = $pages->get('/'); // homepage
?><!DOCTYPE html>
<html lang="en">
<head id="html-head">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $page->title; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>styles/main.css" />
<script src="<?php echo $config->urls->templates; ?>scripts/main.js"></script>
</head>
<body id="html-body">
<p id="topnav">
<?php echo $home->and($home->children)->implode(" / ", "<a href='{url}'>{title}</a>"); ?>
</p>
<hr />
<h1 id="headline">
<?php if($page->parents->count()): // breadcrumbs ?>
<?php echo $page->parents->implode(" &gt; ", "<a href='{url}'>{title}</a>"); ?> &gt;
<?php endif; ?>
<?php echo $page->title; // headline ?>
</h1>
<div id="content">
Default content
</div>
<?php if($page->hasChildren): ?>
<ul>
<?php echo $page->children->each("<li><a href='{url}'>{title}</a></li>"); // subnav ?>
</ul>
<?php endif; ?>
<?php if($page->editable()): ?>
<p><a href='<?php echo $page->editUrl(); ?>'>Edit this page</a></p>
<?php endif; ?>
</body>
</html>

View File

@@ -10,6 +10,8 @@
* Feel free to hook admin-specific functionality from this file,
* but remember to leave the require() statement below at the end.
*
* Note: this template file does not use the _init.php or _main.php
*
*/
/** @var Config $config */

View File

@@ -1,13 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $page->title; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" />
</head>
<body>
<h1><?php echo $page->title; ?></h1>
<?php if($page->editable()) echo "<p><a href='$page->editURL'>Edit</a></p>"; ?>
</body>
</html>
<?php namespace ProcessWire;
// Template file for pages using the “basic-page” template
?>
<div id="content">
Basic page content
</div>

View File

@@ -1,3 +1,10 @@
<?php
<?php namespace ProcessWire;
include("./basic-page.php");
// Template file for “home” template used by the homepage
?>
<div id="content">
Homepage content
</div>

View File

@@ -1 +1 @@
// Blank
// Example JS file

View File

@@ -1 +1 @@
/* blank */
/* Example CSS file */