mirror of https://github.com/tildeclub/site.git
Compare commits
2 Commits
fc6612dab2
...
abd01981a2
| Author | SHA1 | Date |
|---|---|---|
|
|
abd01981a2 | |
|
|
1b7ed9a4b2 |
|
|
@ -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 request’s referrer must start with
|
||||
`https://tilde.club/~<your_username>/`
|
||||
If this doesn’t 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 don’t 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 aren’t 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
|
||||
```
|
||||
|
|
@ -1,57 +1,45 @@
|
|||
---
|
||||
title: Adding a web counter to your page
|
||||
title: Page Counter (counter.tilde.club)
|
||||
author: deepend
|
||||
category: tutorials
|
||||
category: software
|
||||
---
|
||||
|
||||
To display a visit counter on your webpage, you'll need to edit your `index.html` file and insert a `<script>` tag that loads the counter.
|
||||
Image-digit hit counter for your tilde page. Drops in with one `<script>` tag and increments on each load.
|
||||
|
||||
Type: `nano index.html` to open your file for editing.
|
||||
## Quick start
|
||||
|
||||
Add the following line *exactly where you want the counter to appear*:
|
||||
Put this where you want the digits to render (footer is common):
|
||||
|
||||
```html
|
||||
<script src="https://counter.tilde.club/?page=homepage&user=yourname&style=57chevy"></script>
|
||||
<script src="https://counter.tilde.club/?page=home&user=<your_username>"></script>
|
||||
```
|
||||
|
||||
- Replace `homepage` with any identifier for the page you're tracking.
|
||||
- Replace `yourname` with your username or something unique to your site.
|
||||
- Replace `57chevy` with a different style if you'd like.
|
||||
## What to know
|
||||
|
||||
Here’s an example:
|
||||
* Counts are keyed by **(page, user)**. Use a unique `page` per page (`home`, `about`, `guestbook`).
|
||||
* Digits are **zero-padded to 4** (e.g., `0042`).
|
||||
* **Counts every load** (not unique visitors).
|
||||
* Requires **JavaScript**.
|
||||
|
||||
## URL parameters
|
||||
|
||||
* `page` (required): letters/numbers/`._-` only.
|
||||
* `user` (required): your tilde username (no `~`).
|
||||
* `style` (optional): digit theme (default `web1`).
|
||||
* `ext` (optional): image extension (default `gif`).
|
||||
|
||||
Example with options:
|
||||
|
||||
```html
|
||||
<p>Visitor count:
|
||||
<script src="https://counter.tilde.club/?page=homepage&user=alice&style=web1"></script>
|
||||
</p>
|
||||
<script src="https://counter.tilde.club/?page=about&user=<your_username>&style=7seg&ext=gif"></script>
|
||||
```
|
||||
|
||||
Once you’ve added the line, save and close the file using `CTRL+X`, then press `y` and `[Enter]`.
|
||||
## Available styles
|
||||
|
||||
Refresh your site in your browser to see the counter.
|
||||
`57chevy`, `7seg`, `bbldotg`, `bellbtm`, `blgrv`, `cntdwn`, `computer`, `ds9`, `fdb`, `led`, `marsil`, `sbgs`, `web1`
|
||||
|
||||
### Available Styles
|
||||
## Troubleshooting
|
||||
|
||||
You can use any of these style names in the `style=` parameter:
|
||||
|
||||
- `57chevy`
|
||||
- `7seg`
|
||||
- `bbldotg`
|
||||
- `bellbtm`
|
||||
- `blgrv`
|
||||
- `cntdwn`
|
||||
- `computer`
|
||||
- `ds9`
|
||||
- `fdb`
|
||||
- `led`
|
||||
- `links`
|
||||
- `marsil`
|
||||
- `sbgs`
|
||||
- `web1`
|
||||
|
||||
Try different styles to see which one fits your site best.
|
||||
|
||||
Note: The counter uses sessions and cookies to count *unique* visits per user every 24 hours (or whatever time is configured). Page refreshes won’t increase the count unless unique mode is off.
|
||||
|
||||
If you need help or want a custom style added, reach out to the site admin.
|
||||
```
|
||||
* **No digits**: open the script URL directly—fix invalid `page/user` or typos.
|
||||
* **Broken images**: ensure `style` exists and `ext=gif`.
|
||||
* **Shared counts**: give each page a distinct `page` value.
|
||||
|
|
|
|||
Loading…
Reference in New Issue