GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Robpol86/EImage: Display images from image hosting services as if they were stored locally.

This repository was archived by the owner on Dec 13, 2020. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
includes
includes
 
 
schema
schema
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
EImage.i18n.magic.php
EImage.i18n.magic.php
 
 
EImage.i18n.php
EImage.i18n.php
 
 
EImage.php
EImage.php
 
 
LICENSE.txt
LICENSE.txt
 
 
README.mediawiki
README.mediawiki
 
 
empty.png
empty.png
 
 

Repository files navigation

Official page: http://www.mediawiki.org/wiki/Extension:EImage

EImage allows users to display images from external image hosts as if they were stored locally. External images may be thumbnailed/resized/framed just like local images and the syntax used is very similar to MediaWiki's Images syntax. EImage can also overlay text on top of images (based on Template:Annotated image).

Some of the features of EImage are:

  • Display Imgur, Flickr, and regular image URLs.
  • Display titles or comments from the image host.
  • Overlay text ontop of images.

Table of Contents

    • Installation
    • Syntax and Examples
      • Image
      • Annotation Defaults
      • Annotations
    • Credits

Installation

Syntax and Examples

EImage has three types of options:

Image: The "main" options for displaying the image. This is similar to MediaWiki's Images.
Annotation Defaults: Default options that are applied to all annotations in the image.
Annotations: This is a separate parser function for an annotation. You can have as many of these as you want.

Image

The full syntax for displaying an image is:

 {{#eimage:''image''|''options''|''caption''}}

Refer to http://www.mediawiki.org/wiki/Help:Images for detailed descriptions. Below is a list of options available in EImage:

  • Image option: the ID or URL of the image to display
    Imgur usually has 5 to 7 character alphanumeric image IDs (e.g. KO5ZaTX) and Flickr has 10-digit image IDs (e.g. 8055532325).
    If a raw URL is entered, you will need to also specify the width and height.
  • Format option: one of border and/or frameless, frame, thumb
  • Resizing option: one of
    • {width}px
    • x{height}px
    • {width}x{height}px
  • Horizontal alignment option: one of inline and/or left, right, center, none
    The inline option displays the image(+frame) inline instead of as a floating block (it overrides the float option). Works best with none. Useful for displaying multiple thumbnails on one line.
  • Vertical alignment option: one of baseline, sub, super, top, text-top, middle, bottom, text-bottom
  • Link option: one of
    • link={target}
    • link=
    Currently only external links that start with http/https/ftp are supported.
  • Other specific options:
    • alt={alternative text}
If a parameter does not match any of the other possibilities, it is assumed to be the caption text. Captions support wiki-formatting. EImage will also replace any instance of !!TITLE!! or !!COMMENT!! with the title/subject metadata and with the comments/description metadata from the image host respectively. The same thing applies to alt=.

Some examples:

 {{#eimage:8055532325|800px|thumb|none|inline|'''!!TITLE!!'''<br />!!COMMENT!!}}
 {{#eimage:nNBFF|x350px|thumb|link=}}
 {{#eimage:http://upload.wikimedia.org/wikipedia/mediawiki/e/e1/Eimage_example.png|410x579px|thumb}}

Annotation Defaults

These options change the defaults for all annotations in an image (not all images). If no annotations are used, these are ignored:

  • Horizontal alignment option: aalign=
  • Background color option: abg=
    Default is transparent
  • Font family option: afamily=
  • Font size option: asize=
  • Font weight option: aweight=
  • Font style option: astyle=
  • Font shadow option: ashadow=
  • Font color option: acolor=
  • Line height option: aheight=

Annotations

Each image can have any number of annotations. In the tag use the annot= option to specify an annotation. The value of annot= is another function called '. Below are the options available for ':

  • Horizontal alignment option: one of left, right, center, justify, inherit
  • Background color option: bg=
  • Font family option: family=
  • Font size option: size=
  • Font weight option: weight=
  • Font style option: style=
  • Font shadow option: shadow=
  • Font color option: color=
  • Line height option: height=
If a parameter does not match any of the other possibilities, it is assumed to be the annotation text. Annotations support wiki-formatting.

Some examples:

 {{#eimage:7942213966|200px|thumb|acolor=white|This is the comment from Flickr: !!COMMENT!!

|annot= |annot= |annot= |annot= |annot= |annot= }}

Credits

These are the sources I used for inspiration, ideas, and code.

  • http://en.wikipedia.org/wiki/Template:Annotated_image
  • http://code.fivefilters.org/php-readability/src/15782b1b8ee4/JSLikeHTMLElement.php
    A very big help with converting links common in Flickr comments to wiki-formatted links
  • https://svn.wikia-code.com/vendor/mediawiki/REL1_19/extensions/SelectionSifter/schema/ratings.sql

About

Display images from image hosting services as if they were stored locally.

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.