Welcome

BoltWire is a content management system developed by Dan Vis.

Modules
Plugins
Skins
Languages



Popular Posts

Version 5.11 Released
May 26, 2016

Big Changes Coming Soon...
April 28, 2016

Catching Up
April 6, 2016



Other Sites

Here's some other sites by Dan Vis:

Alexa Echoes
Join my adventures developing for Amazons exciting new voice platform.

Firefly Spot
Personal rambling about new gadgets, technology news, and space travel.

FAST Missions
My ministry hub, with news and updates about our online school.

You can follow him at www.danvis.info.

System File Alert

Extensions > Plugins > System File Alert

Here is a little function you can use to tell whether a page is in the local field, the system folder, or both. Sometimes it can be a bit confusing as to which page is being displayed.

To use it, create an action page called action.system and put the following content on it:

[(system extend.plugins.systempages)]

Then just put a link like this in your action bar or wherever you want:

[[{p}action.system|System Check]]

You could put it on a delete action, perhaps in an "if admin" conditional to know what exactly your are deleting. Or better still

To make it work, just copy this code to your config file or, optionally create a custom plugin:


function BOLTFsystem($args, $zone) {
     global $pageLink, $systemPath, $boltwire, $pageDir, $field;
     $page = BOLTinit($pageLink, $args[1]);
     $fpage = BOLTfolders($page, true);
      $loc = 0;
     if (file_exists("pages/$fpage")) $loc = 1;
     if (file_exists("$boltwire/system/$page")) $loc = $loc + 2;
     switch ($loc) {
          case '0': return 'This page does not exist.';    
          case '1': return 'This page only exists in the field.';    
          case '2': return 'This page is a system file.';    
          case '3': return 'This page is a local copy of a system file.';    
          }
     }

This could also be useful when doing upgrades. Generate a list of system pages, to show which system pages are currently copied over to your field, that might need to be upgraded. Try something like this:


The following system pages have been copied over to your local field:

{(search dir=system template="[if inline '[(system {+p})]' 'local'][[{+p}]][if]")}

Lot's of possibilities...