SkyscrapersProfile

ProcessWire skyscrapers site profile

  • Owner: ryancramerdesign/SkyscrapersProfile
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

h1. ProcessWire Skyscrapers Site Profile

This is the profile for the skyscrapers demo site as seen at: "http://processwire.com/skyscrapers/":http://processwire.com/skyscrapers/

The main differences from the live site are that this profile excludes most of the photos and skyscraper text. Only the photos taken by me, Ryan Cramer are included. This is to ensure we aren't distributing any text or photos in case the license ever changes to something other than Wikimedia Commons. I can change the text/photos on my skyscrapers site, but can't on any sites someone else sets up with this profile, so figure it's better to play it safe.

h2. Requirements

  • ProcessWire 2.3
  • OR ProcessWire 2.2 "dev branch":https://github.com/ryancramerdesign/ProcessWire/tree/dev (2.2.12 or newer)

h2. How to install

Get the latest version of ProcessWire 2.3. At the time this text was written, ProcessWire 2.3 wasn't yet released, so if that is still the case you'll want to get version "2.2.12 or newer":https://github.com/ryancramerdesign/ProcessWire/tree/dev from the dev branch.

Before running the installer, replace all the files/directories in the /site-default/ directory of ProcessWire with those from this site profile. This includes the following:

** /site-default/config.php
** /site-default/install/
** /site-default/modules/
** /site-default/templates/

Now run the installer to complete the installation.

h2. Template details

The template files in the profile take the approach of populating variables that are output within a main/shared markup file. This is different from the basic profile that ProcessWire comes with. Specifically, make note of the following files:

  • "/site/templates/_init.php":https://github.com/ryancramerdesign/SkyscrapersProfile/blob/master/site/templates/_init.php - This file is automatically included before any template file is executed. We use it to initialize the variables we populate and include a shared library of functions.
  • "/site/templates/_out.php":https://github.com/ryancramerdesign/SkyscrapersProfile/blob/master/site/templates/_out.php - This file is automatically included after any template file is executed. In our case, we use it to contain our main markup that also outputs the variables we populated.
  • "/site/templates/includes/functions.php":https://github.com/ryancramerdesign/SkyscrapersProfile/blob/master/site/templates/includes/functions.php - This is where we are keeping a shared library of functions, most for generating skyscraper list markup.
  • "/site/templates/*.php":https://github.com/ryancramerdesign/SkyscrapersProfile/tree/master/site/templates - These are the site's template files, each named consistently with the page(s) they represent. The primary focus of these files is to populate the $content variable that is output by _out.php.

The use of _init.php and _out.php are something new to ProcessWire 2.3. These are specified in the /site/config.php:

bc. $config->prependTemplateFile = '_init.php';
$config->appendTemplateFile = '_out.php';

Use of this new feature is optional. We've used it in this profile because it reduces the amount of redundant include() code necessary in each of our template files.

h2. Screenshot

!http://modules.processwire.com/site/assets/files/1215/skyscrapers-screenshot.jpg(screenshot)!


Copyright 2013 by Ryan Cramer Design, LLC

Main metrics

Overview
Name With Ownerryancramerdesign/SkyscrapersProfile
Primary LanguagePHP
Program languageJavaScript (Language Count: 2)
Platform
License:
所有者活动
Created At2013-01-05 16:02:14
Pushed At2013-01-06 11:52:40
Last Commit At2013-01-06 06:52:28
Release Count0
用户参与
Stargazers Count29
Watchers Count5
Fork Count9
Commits Count10
Has Issues Enabled
Issues Count2
Issue Open Count2
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private