M.Zharkikh's personal site logo
Mail to site
Print version
News (RSS)
Smereka / Smeretags / Images




This group of smeretags is designed to create images on web pages.


Module: smeretags/substfields.php (available by default)

Options: [src|ImageAttr] [border] [usemap] [align] [alt] [title] [Shadow].

Purpose: creates HTML image tag.

If optional src parameter is set it treates as the path to the image file regarding the main site directory (see GetMainDir smeretag). This direct (literal) way to determine file name, where name is stored in the smeretag.

If the parameter src not set, smeretag uses parameter ImageAttr. This parameter specifies the name of a file attribute that contains the file name. This indirect way of determining the file name, so one can use this name for other purposes. By default ImageAttr="Image", so this value can generally be omitted.

While using ImageAttr parameter, alt automatically gets the value of Description attribute for the node, and title parameter – results of the DocTitle method for it. Often this is exactly what we need. But if these parameters are explicitly defined in smeretag, these values will be used instead of automatic ones.

Optional parameters border, usemap, align, alt, title operate as normal attributes HTML. If given only one parameter from the pair alt / title, smeretag will automatically assign to the omitted parameter value of the defined one.

Optional Shadow parameter specifies the display of shadows around the image. This parameter should be the name of the directory of the shadow files. Examples shadows – in my photo gallery.

Example call: <Smereka Func="MakeImage" src="history/falsejubilee/zakonblag.gif" alt="Distribution of biblical citations in the «Slovo pro zakon i blahodat»" />

Example result: <img src="http://www.m-zharkikh.name/files/MZh/history/falsejubilee/zakonblag.gif" border="0" alt="Distribution of biblical citations in the «Slovo pro zakon i blahodat»" title="Distribution of biblical citations in the «Slovo pro zakon i blahodat»" />


Module: smeretags/substfields.php (available by default)

Options: src [border] […]

Purpose: creates HTML tag for a small image (thumbnail).

Required parameter src is treated as path to image file regarding the main site (see GetMainDir smeretag). Small image file (thumbnail) should be created separately and stored in a subdirectory _thumbs of the directory containing the main file. Small image file name should thus match the name of the main file.

Smeretag generates HTML code for small image that is graphical reference to the main image. If the optional parameter border not set, it becomes the default value of 2. Other optional smeretag parameters passed as attributes to the small image.

Example call: <Smereka Func="MakeThumbImage" src="heritage/plankpl.jpg" alt="Fragment of Kyiv-Pechers lavra plan" />

Example result: <a href="http://m-zharkikh.name/files/MZh/heritage/plankpl.jpg"><img src="http://m-zharkikh.name/files/MZh/heritage/_thumbs/plankpl.jpg" width="146" height="150" alt="Fragment of Kyiv-Pechers lavra plan" border="2" /></a>

Previous section | Table of content | Next section

Please this page? Help us to develop this site!

© 1978 – 2018 N.I.Zharkikh

Reprinting of articles from site are encouraged while
reference (hyperlink) to my site is provided

Site powered by

Load count : 1136

Modified : 8.08.2017

If you look up the type error
on this page, please select it
by mouse and press Ctrl+Enter.