Create guestbook.md with usage instructions

Added a new guestbook feature for users to store and display messages.
This commit is contained in:
deepend-tildeclub 2025-09-04 17:16:38 -06:00 committed by GitHub
parent fc6612dab2
commit 1b7ed9a4b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 84 additions and 0 deletions

84
wiki/source/guestbook.md Normal file
View File

@ -0,0 +1,84 @@
---
title: Tilde Guestbook
author: deepend
category: software
---
A simple, shared guestbook hosted at **guestbook.tilde.club** that you can link to from your personal tilde page.
## What it does
* Stores messages (name, email, message) per tilde user.
* Renders your guestbook at:
`https://guestbook.tilde.club/index.php?user=<your_username>&theme=<theme_or_default>`
## Requirements
* **Link must come from your tilde page**: the requests referrer must start with
`https://tilde.club/~<your_username>/`
If this doesnt match, the guestbook shows *“Access denied: Invalid referrer.”*
## Quick start
1. On your tilde page (e.g., `~/public_html/index.html`), add a link:
```html
<a href="https://guestbook.tilde.club/index.php?user=<your_username>&theme=default">
Sign my guestbook
</a>
```
## Optional theme
* Create a CSS file in your tilde home, e.g. `~/public_html/guestbook.css`.
* Link to the guestbook with `&theme=guestbook` (omit `.css`).
The guestbook will load:
`https://tilde.club/~<your_username>/guestbook.css`
* If you dont set `theme`, it uses `https://guestbook.tilde.club/default.css`.
## CSS customization (what you can style)
When you pass a `theme`, **only your CSS is loaded** (the default stylesheet is not). Your CSS should style the page completely.
### Stable HTML hooks (selectors you can rely on)
* Page title: `h1` (has `align="center"`; override with CSS if desired).
* Intro paragraph and form:
* `form`
* `input[type="text"]` for Name and Email
* `textarea` for Message
* `input[type="submit"]` for the button
* Entries list:
* Container: `.entries`
* Each entry: `.entry`
* Entry header: `.entry h3`
* Email inside header: `.entry h3 span`
* Message text: `.entry p`
## Embedding notes
* Works fine when linked from inside frames/iframes **as long as** the referrer includes your full path (`/~<user>/...`). The meta tag above usually fixes “origin-only” referrers.
* Do **not** use `rel="noreferrer"` on the link—this strips the referrer entirely.
## Troubleshooting
* **“Access denied: Invalid referrer.”**
* Make sure the link is on `https://tilde.club/~<your_username>/...` (not just the domain root).
* Check that browser extensions or privacy settings arent stripping referrers.
* The error page will display what referrer was received and the expected pattern.
## Example links
* Default styling:
```
https://guestbook.tilde.club/index.php?user=deepend&theme=default
```
* Custom styling (with `~/public_html/guest.css` present):
```
https://guestbook.tilde.club/index.php?user=deepend&theme=guest
```