[Solved] Request for another img-tag called shot!

Do you want to say something about UT99.org?
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

[Solved] Request for another img-tag called shot!

Post by papercoffee »

Ok we have this problem that many pictures are much too big for this board.
Therefore I request an additional tag.
[shot] <= this tag works like the [img] tag but resizes the linked picture to the maximum width of the forum.
If someone want to see the real size can he click the image and get to its origin where it's hosted.

We can throw out the
  • tag because it doesn't work properly anyway. Or I haven't found out how it works.
    But at any rate no one uses it.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Request for another img-tag called shot!

Post by Wormbo »

  1. This
  2. tag
  3. works
  4. as
  5. designed

Code: Select all

[list=1]
[*]This
[*]tag
[*]works
[*]as
[*]designed[/list]
And for the record: I used it this morning.

[edit]
  1. alternate
  2. list
  1. and
  2. another
  3. one
  4. (roman)
  1. also
  2. caps
Yup, works quite nicely.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Request for another img-tag called shot!

Post by Barbie »

papercoffee wrote:many pictures are much too big for this board
Instead of automatic generating a mini preview pic I'd use the HTML tags "width" and "height" while the forum's page is delivered to the browser. These HTML tags can limit the display size of an image. If user user selects "show image" in his browser, the image will be displayed in full original size.

Or the dimensions of an uploaded image can be limited simply.
papercoffee wrote:But at any rate no one uses it
I use the LIST tag whenever it makes sense.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Request for another img-tag called shot!

Post by papercoffee »

Wormbo wrote:

Code: Select all

[list=1]
[*]This
[*]tag
[*]works
[*]as
[*]designed[/list]
And for the record: I used it this morning.
[...]
Yup, works quite nicely.
:ironic: Did see it the first time. Now I know it works.
Still the [shot] tag would make everything easier ...Especially EvilGrins could finally post pictures without me have to visit tinypic or ctrl- the whole forum.

@Barbie
I don't want a mini preview ...I want a similar function as they use on the Epic Forum. Like in this post.
https://www.epicgames.com/unrealtournam ... post185688
The post looks like this behind the stage:

Code: Select all

[QUOTE=papercoffee;185688]modified logos!

[shot]https://forums.unrealtournament.com/attachment.php?attachmentid=19153&stc=1[/shot]

[shot]https://forums.unrealtournament.com/attachment.php?attachmentid=19152&stc=1[/shot]

I still need feed back on the new Trident variation. ;)
S/M is still in the pipeline... maybe I can show something this weekend.[/QUOTE]
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Request for another img-tag called shot!

Post by Barbie »

papercoffee wrote:The post looks like this behind the stage
Yes, they realized it as I suggested above with the WIDTH tag. The delivered HTML code of your mentioned web page for the image is

Code: Select all

<img title="This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version" src="https://forums.unrealtournament.com/attachment.php?attachmentid=19153&stc=1" alt="This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version" width="400">
width="400" does the trick. Work for phpBB modders - maybe there exists already a plug in?
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Request for another img-tag called shot!

Post by papercoffee »

Barbie wrote:
papercoffee wrote:The post looks like this behind the stage
Yes, they realized it as I suggested above with the WIDTH tag. The delivered HTML code of your mentioned web page for the image is

Code: Select all

<img title="This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version" src="https://forums.unrealtournament.com/attachment.php?attachmentid=19153&stc=1" alt="This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version" width="400">
width="400" does the trick. Work for phpBB modders - maybe there exists already a plug in?
Now I understand ...

Yes such a plug-in would be very useful. But Shade has to implement it.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Request for another img-tag called shot!

Post by Barbie »

That solution with a fixed width is not really flexible: different users have different monitor and browser window sizes, so that width=400 may be too small or too big.
If I were asked how to implement this, I'd recommend using a small java script that sets the width to the current browsers canvas width ("responsive design").
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Request for another img-tag called shot!

Post by papercoffee »

Barbie wrote:That solution with a fixed width is not really flexible: different users have different monitor and browser window sizes, so that width=400 may be too small or too big.
If I were asked how to implement this, I'd recommend using a small java script that sets the width to the current browsers canvas width ("responsive design").
Wait, isn't there a % value in html possible? or was this just in CSS ...I don't remember. :sad2:
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Request for another img-tag called shot!

Post by Barbie »

I did not find anything in the W3C standard about percent values as valid values for the WIDTH attribute. Anyway: You don't want to resize every image but only those where Width(Image) > Width(Canvas). So I guess that pure HTML nor CSS will not be enough to detect this. But this is only a guess - my knowledge in CSS is limited. :tongue:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Request for another img-tag called shot!

Post by Wormbo »

Fixed width can be fun... e.g. if you need an extra large version of :???: (<-- is that another double-assigned smilies shortcut? I wanted Image) or :confused2: - which both seem relevant in a number of recent threads, as far as I can tell.
User avatar
Shade
Site Admin
Posts: 1481
Joined: Sun Jan 27, 2008 12:03 pm
Personal rank: Founder of UT99.org
Location: Germany
Contact:

Re: Request for another img-tag called shot!

Post by Shade »

I've added the following CSS lines:

Code: Select all

.postbody .content img {
  max-width: 100%;
}
Test it by resizing your browser window. Is this solution okay?

Image
UT99.org Discord Server: https://discord.gg/6CP2UjZ
UT Server Browser: https://ut99.org/servers
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Request for another img-tag called shot!

Post by papercoffee »

I think it works great. :tu:
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: [Solved] Request for another img-tag called shot!

Post by Barbie »

Nice solution. :gj:
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: [Solved] Request for another img-tag called shot!

Post by Chamberly »

Awesome, this is great! Now I don't have to see very big pic taking over the places!
Image
Image
Image Edit: Why does my sig not work anymore?
User avatar
Dr.Flay
Godlike
Posts: 3347
Joined: Thu Aug 04, 2011 9:26 pm
Personal rank: Chaos Evangelist
Location: Kernow, UK
Contact:

Re: [Solved] Request for another img-tag called shot!

Post by Dr.Flay »

Personally I would be happier if people learned the difference between images for print, and images for the web.
You should prepare images for the intended use.
If you post large images with lots of colours, don't use PNG, but if you must because some one needs to print it, then set it as "interlaced" or "progressive"
Only use 24bit PNG if you were going to use a TIFF, and use 8bit PNG as a GIF replacement.

People tend to ignore other people data limits and costs, when they are not as limited.
When browsing on a mobile device I switch off images because it eats my credit like crazy.

As a "general rule of thumb" your desktop resolution is not suitable for web pictures, no matter what it is.
Before you upload to any site, consider using a tool like RIOT.
http://luci.criosweb.ro/riot/
In full automatic mode you can see the optimisations you should be doing in your other software.
Post Reply