Skip to content

Commit

Permalink
Troll Flags are now Board Flags
Browse files Browse the repository at this point in the history
  • Loading branch information
desuwa committed May 1, 2021
1 parent 16c59ec commit d095a7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
14 changes: 7 additions & 7 deletions pages/Boards.md
Expand Up @@ -3,7 +3,7 @@
|:----------------|:-------------------------------------|
| **Status 200** | Content-Type: application/json |

The `boards.json` file is a comprehensive list of all boards and their major settings. The `boards.json` file also contains a list of all meme flags available on boards where `troll_flags` is enabled.
The `boards.json` file is a comprehensive list of all boards and their major settings.


## Boards.json Attributes ##
Expand All @@ -26,7 +26,7 @@ The `boards.json` file is a comprehensive list of all boards and their major set
| `spoilers` | `integer` | `only if enabled` | Are [spoilers](https://4chan.org/faq#spoiler) enabled | `1` or `0` |
| `custom_spoilers` | `integer` | `only if enabled` | How many custom spoilers does the board have | `Any positive integer` |
| `is_archived` | `integer` | `only if enabled` | Are [archives](https://4chan.org/faq#archive) enabled for the board | `1` or `0` |
| `troll_flags` | `integer` | `only if enabled` | Are troll flags enabled on the board | `1` or `0`|
| `board_flags` | `array` | `only if enabled` | Array of flag codes mapped to flag names | |
| `country_flags` | `integer` | `only if enabled` | Are flags showing the poster's country enabled on the board | `1` or `0`|
| `user_ids` | `integer` | `only if enabled` | Are poster ID tags enabled on the board | `1` or `0`|
| `oekaki` | `integer` | `only if enabled` | Can users submit drawings via browser the Oekaki app | `1` or `0` |
Expand Down Expand Up @@ -85,12 +85,12 @@ The `boards.json` file is a comprehensive list of all boards and their major set
"images": 15
},
"meta_description": "\u0026quot;\/b\/ - Random\u0026quot; is the birthplace of Anonymous, and where people go to discuss random topics and create memes on 4chan.",
"forced_anon": 1
"forced_anon": 1,
"board_flags": {
"AB": "Flag Name AB",
"XY": "Flag Name XY"
}
}],
"troll_flags": {
"AC": "Anarcho-Capitalist",
"AN": "Anarchist"
}
}

```
9 changes: 5 additions & 4 deletions pages/User_images_and_static_content.md
Expand Up @@ -5,20 +5,21 @@

**User images**: `https://i.4cdn.org/[board]/[4chan image ID].[file extension]`

**Thumbnails**: `https://i.4cdn.org/[board]/[4chan image ID]s.jpg`
**Thumbnails**: `https://i.4cdn.org/[board]/[4chan image ID]s.jpg`
The `s` after the image ID indicates the file is a thumbnail.

**Country flags**: `https://s.4cdn.org/image/country/[country code].gif`
**Country flags**: `https://s.4cdn.org/image/country/[country code].gif`

**/pol/ special flags**: `https://s.4cdn.org/image/country/troll/[country code].gif`
**Board flags sprite sheet**: `https://s.4cdn.org/image/flags/[board]/flags.css`

This comment has been minimized.

Copy link
@catamphetamine

catamphetamine May 4, 2021

Contributor

Does it really make a difference?
I wonder how mobile apps will struggle with parsing CSS and then shifting a "sprite" image just to show a single icon.

This comment has been minimized.

Copy link
@catamphetamine

catamphetamine May 4, 2021

Contributor

I guess I won't be supporting this feature: including 3rd party CSS on a page is too messy.
I'll default to using the old /troll/ flags until they no longer work.
Maybe by that time angry mobile users will force you to come up with a better solution.

This comment has been minimized.

Copy link
@catamphetamine

catamphetamine May 4, 2021

Contributor

I better create an issue so that others could see.
#90


**Spoiler image**: `https://s.4cdn.org/image/spoiler.png`

**Custom spoilers**: `https://s.4cdn.org/image/spoiler-[board][1-5].png`

**Note about custom spoilers:**
**Note about custom spoilers:**
Different boards can have different numbers of potential custom spoilers. For boards with custom spoilers enabled, a custom spoiler thumbnail is randomly assigned to each spoilered image on a page every time a new post is made and the page is refreshed.


### Special icons ###
| **Icon** | **Description** | **Location**|
|:---------|:----------------|:------------|
Expand Down

0 comments on commit d095a7a

Please sign in to comment.