image handling: gallery
Download and unzip the gallery.zip files in the root folder of your server. That forms a basic package to display the images from a folder as a photo gallery. It also provides the infra-structure and optimized image production that are prerequisite for the rest of this framework. The download comes with a small test sample called slides which you display using /gallery.php/slides once it's installed on your server. Explanations are in a readme.txt file.
When visiting a gallery, cached optimized image versions are used after the first visit, but clicking on an image will open the full size original in a separate browser window. You may notice how much slower that loads as it's likely a much bigger file and you wouldn't want too many of them on any page.
Your browser probably provides menu options for downloading, so with a .htaccess file like the one I've provided, access to original images can be disallowed while still permitting reduced versions to be generated for display on the site. Note: If you do want to be able to display and download those originals then simply delete said .htaccess file from the slides folder, but do not confuse it with any .htaccess files in other folders.
Topics and Pages: ap
Download and unzip the ap.zip files in the root folder of your server. In order to function, ap relies on components of the gallery package mentioned above to also be there.
The ap package is responsible for controlling the layout of your pages and adapting it to different display sizes. It creates navigation menus from the folders and h1 tags in the files that it finds there. By default, pages are the files with the .en (English) extension and topics are the folders that have a topic.en page in them. Other languages can be added, but the default language (currently configured as 'en') serves as a template for the whole site.
The zip file contains a sample topic and page (this one) called
demo to which further pages can be added with separate download (see below).
Note: For the sake of efficiency, menus are currently only generated when there isn't one in the topic folder yet, so if you update the files in a topic you need to delete the superseded _menu file(s) to force automatic creation of new ones. In this system, any file or folder name that starts with _ will be one that is managed by scripts.
A variety of add on packages are under development.
An interface for Disqus comment system. You won't need to add anything to your pages, but as a site maintainer you will need to create your own account with Disqus. This package requires that you modify the definition of
canonical for your site's URL in the
ap_config.php script. You also have to edit in your Disqus
shortname as otherwise it's me that gets to moderate your disqussion forums 😋.
This installs multi-lingual capability with some samples in German. A language is enabled on the site by the presence of a nav.xx file. The xx represents the 2 letter abreviation for the language and the file contains definitions for site navigation captions in that language. Currently nav.en and nav.de are supplied.
You have to create translated versions of the individual pages yourself. Where pages in the requested language are not available the default (en) versions will be substituted. A note saying this has occurred may be displayed.
Presenation is done using a palette of coordinated colors (that can be redefined if you wish). Using these, elements can be renderd either dark or light theme, but I've created a more extensive theme mechanism in which a 'theme' is conceptually a separate way of displaying any given path on the site.
I've already introduced the gallery, and Disqus themes, while the default is called Angelica. A theme is invoked with it's own script, but I soon discovered that they can all be implemented with the same engine and all it needs is it's name to load corresponding components.
The theme package provides two more themes and a facility for switching between them all (rather than having to enter the theme name in the address bar.
Simple test and demonstration pages that can be added to this demo topic, but the most up-to-date ones will be online on my own site
~ enjoy ~
With a bit of luck you should now have the basic system installed and working on your apache server. To develop your own pages open the scripts with a text file editor like Notepad++ and have a look at the code that defines a page. Have a go at changing it, or adding your own.