Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX Fallback for ImageResizer #3

Merged
merged 10 commits into from Sep 6, 2011
Merged

Conversation

Randuin
Copy link
Contributor

@Randuin Randuin commented Sep 3, 2011

Couldn't convert my open issue to a pull request :(

@Randuin
Copy link
Contributor Author

Randuin commented Sep 3, 2011

okay so I added a bunch of shit... so... uhhhhhhh pull plz

@r888888888
Copy link
Collaborator

I want to do a more thorough code review before I merge, which I probably won't get around to until Tuesday evening.

@Randuin
Copy link
Contributor Author

Randuin commented Sep 5, 2011

I wish there was a way to break this pull request up :(

@r888888888 r888888888 merged commit c37766c into danbooru:master Sep 6, 2011
@r888888888
Copy link
Collaborator

merged manually

evazion added a commit that referenced this pull request Mar 21, 2024
Add the following syntax for embedding images in DText:

    !post #12345
    !asset #12345

This will embed a 720x720 size image.

You can add a caption beneath the image like this:

    !post #12345: This is the image caption.

You can embed a gallery of thumbnails like this:

    * !post #1
    * !post #2
    * !post #3

This will embed a grid of 180x180 size thumbnails.

Known issues:

* Currently you can only embed images in wiki pages. There need to be limits before they can be
  enabled in other places so that people don't flood threads with too many images.
* You can't embed images that are only visible to Gold or above users. You can only embed images
  that are visible to everyone. This is because making DText rendering dependent on the current user
  would preclude caching. It's also to discourage people from embedding images that not everyone can
  see.
* There's no way to blacklist embedded images. (It wouldn't work anyway for media assets, unless we
  used AI tags).
* There's no syntax for selecting the size of the image. Standalone images are always 720x720 and
  thumbnail galleries are always 180x180.
* We always use 720x720 .webp samples for embedded images, which may not be viewable for people with
  ancient browsers that don't support .webp.
* You can't put images inside tables (which would be necessary for Wikipedia-style infoboxes in wikis).
* You can't `float: right` images (which would also be necessary for infoboxes in wikis).
* Animated GIFs and PNGs load the static thumbnail instead of the animated image. We ought to
  generate sample videos for animated GIFs.
* Videos load the original video file, which may take a lot of bandwidth, especially if there are
  multiple videos on the page. We ought to generate 720p or 480p samples for each video.
* Video always autoplay, which may be undesirable.
* Videos don't show the audio icon when the video has audio (videos with sound are muted, however).
* You can't embed Flash posts.
* It's technically possible to embed arbitrary images using media assets, but it's a cumbersome
  process.
evazion added a commit that referenced this pull request Mar 21, 2024
Add the following syntax for embedding images in DText:

    !post #12345
    !asset #12345

This will embed a 720x720 size image.

You can add a caption beneath the image like this:

    !post #12345: This is the image caption.

You can embed a gallery of thumbnails like this:

    * !post #1
    * !post #2
    * !post #3

This will embed a grid of 180x180 size thumbnails.

Known issues:

* Currently you can only embed images in wiki pages. There need to be limits before they can be
  enabled in other places so that people don't flood threads with too many images.
* You can't embed images that are only visible to Gold or above users. You can only embed images
  that are visible to everyone. This is because making DText rendering dependent on the current user
  would preclude caching. It's also to discourage people from embedding images that not everyone can
  see.
* There's no way to blacklist embedded images. (It wouldn't work anyway for media assets, unless we
  used AI tags).
* There's no syntax for selecting the size of the image. Standalone images are always 720x720 and
  thumbnail galleries are always 180x180.
* We always use 720x720 .webp samples for embedded images, which may not be viewable for people with
  ancient browsers that don't support .webp.
* You can't put images inside tables (which would be necessary for Wikipedia-style infoboxes in wikis).
* You can't `float: right` images (which would also be necessary for infoboxes in wikis).
* Animated GIFs and PNGs load the static thumbnail instead of the animated image. We ought to
  generate sample videos for animated GIFs.
* Videos load the original video file, which may take a lot of bandwidth, especially if there are
  multiple videos on the page. We ought to generate 720p or 480p samples for each video.
* Video always autoplay, which may be undesirable.
* Videos don't show the audio icon when the video has audio (videos with sound are muted, however).
* You can't embed Flash posts.
* It's technically possible to embed arbitrary images using media assets, but it's a cumbersome
  process.
evazion pushed a commit that referenced this pull request Apr 3, 2024
Fix UTF-8 in urls and mentions
evazion added a commit that referenced this pull request Apr 3, 2024
* Both `[br]` and `<br>` work.
* `[br]` can be used inside paragraphs, lists, and tables, but not inside headers, links, or other places.
evazion added a commit that referenced this pull request Apr 3, 2024
Add the following syntax for embedding images:

    !asset #1
    !post #1

Produces:

    <media-embed data-type="asset" data-id="1"></media-embed>
    <media-embed data-type="post" data-id="1"></media-embed>

To add a caption beneath the image:

    !post #1: This is a caption beneath the image.

Produces:

    <media-embed data-type="post" data-id="1">This is a caption beneath the image.</media-embed>

To create a gallery of images:

    * !post #1: Caption one.
    * !post #2: Caption two.
    * !post #3: Caption three.

Produces:

    <media-gallery>
      <media-embed data-type="post" data-id="1">Caption one.</media-embed>
      <media-embed data-type="post" data-id="2">Caption two.</media-embed>
      <media-embed data-type="post" data-id="3">Caption three.</media-embed>
    </media-gallery>

The `!post #1` syntax has to go on a line by itself. It can't go in the middle of a paragraph,
inside a header, inside a table, etc.

On the Danbooru end, these tags will be written into the actual images.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants