Using bip, Part 2: bipa.php vs bipga.php

Using bip: what the processing admin (bipa.php) and gallery admin (bipga.php) each do, why they are separate, and when to use which.

A landscape-photo jigsaw with its last piece being slotted into the gap, with a padlock shield at the top right

Recap: in Part 1 we met bip’s four pages: two admin pages, a read-only public gallery and a log viewer. Now for the two admin pages.

New users often ask why there are two admin pages. The answer is that they do different jobs, at different times, with different risks. Using bip well means knowing which page to open for which task.

bipa.php: the processing admin

Think of bipa.php as the factory floor. Its question is, “what files have arrived, and have they been turned into gallery-ready images yet?”

  • It reads from the uploads folder, and shows how many files are waiting.
  • It runs batches in either “new” mode (only unprocessed files) or “all” mode (re-process everything).
  • It produces a full-size image and a thumbnail for each file, in WebP, and records them.
  • It reports how many files are left when a run stops at the batch or time limit.
  • It hosts the Security Self-Test, which checks that the private folders are really blocked from the web and repairs the protective files if they’ve gone missing.
  • It shows the database status, including a hint to check free disk space if the database ever appears to be disconnected on a site that was working before.
  • It offers the optional Script & Style Minify panel for faster page loads.

It does not care about albums, captions or what visitors see. It also does not let you edit sizes or output paths on the fly; those live in the configuration file.

bipga.php: the gallery admin

bipga.php is the front office. Its question is, “how should the processed images be presented?”

  • It creates and renames albums, in two levels: a main gallery and sub-galleries.
  • It assigns images to albums and edits their metadata, with paging so a big library stays manageable.
  • It holds two editable fields for the public page: Index Content, a welcome note shown above the gallery selector, and Photographer, a credit line shown in the footer. Both are stored as tiny files with permissions that explicitly exclude execution.
  • It sets the default public theme: Default, Light, Dark, or a neutral-grey Photographer’s Theme designed to keep the focus on the pictures. Visitors can still pick their own from a small switcher on the public page.
  • It manages the starter album, “My bip Gallery”. This album can be renamed but not deleted, and it is capped at four images. If it contains at least one image, it becomes the homepage. If it’s empty, nothing is shown until a visitor selects a gallery. If you use it as your homepage, consider renaming it to something like “Featured Photos”.

Why not one admin page?

Three reasons.

  1. Risk separation. Processing touches the filesystem heavily. Organising touches only the database. Keeping them apart keeps each page smaller and easier to reason about.
  2. Different rhythm. You process in bursts after an upload. You organise whenever you like.
  3. Shared pieces, shared behaviour. Both pages use the same login, the same CSRF protection and the same pagination, so what you learn on one carries over to the other.

A typical session

You upload a batch of photos over FTP. In bipa.php you see the count of unprocessed images and press the button. When the run finishes, you open bipga.php, create an album for the shoot, tick the new images and assign them, then add a few captions. The whole thing takes minutes, and the public page updates as soon as you’re done.

The admin pages always keep the same plain look, whichever theme the public gallery uses, so your tools stay familiar while the public face changes.

A rule of thumb

If you’re working with files, go to bipa. If you’re working with meaning, go to bipga.

In short: bipa.php turns uploads into images and checks security; bipga.php organises them and sets the public text and theme. They share a login and conventions but not responsibilities.

Read next: Using bip, Part 3: The Public Gallery and keeping things running.

Get the free batch image processor and gallery from the bip project page.

Bob's Projects Avatar

Written by

Previous post
Next post

Leave a Reply

Your email address will not be published. Required fields are marked *

More from the blog