izartu API

index.php

Front controller: every request enters here (see `public/.htaccess`, which rewrites non-file requests to this script) and is dispatched by URL path to a view template, which is rendered inside `layout.php`. Paths are relative to `BASE` (see `config.php`), so the app works at a domain root or in a sub-directory.

Routes:

  • / Home: public bookmark feed + tag cloud.
  • /tag/NAMES The feed filtered by tags, comma-separated (/tag/php,docs lists bookmarks carrying both). The sidebar cloud shows the tags of the listed bookmarks; its links add to the filter.
  • /tags Tag index: every visible tag with its count, paginated; ?q=TERM narrows it to the matching tags.
  • /user/NAME The feed filtered by one user (your own page shows your private bookmarks too when logged in). /user/me is a reserved alias for the logged-in user's own page.
  • /login Login form (GET) + handler (POST).
  • /logout Destroy the session, redirect home.
  • /add Create bookmark (POST action). Login required.
  • /edit/ID Save bookmark (POST action). Owner/admin only.
  • /delete/ID Delete bookmark (POST action). Owner/admin only.

Editing is inline: on any list, ?edit=ID renders that row as an in-place form and ?add renders an empty one on top (a GET to /add or /edit/ID redirects to the user's own page with that state). The forms POST to the action routes above and return to the list they were on.

Later features add their own routes here (/bookmark/ID, ...); any unmatched path renders the 404 view.

Table of Contents

On this page
  • Table Of Contents

Search results