rah_aimage
Published under current TXP projects
For those who want little more options to article images, but same simplity.
Image: rah_aimage
Intro and description
Almost same as <txp:article_image /> but little better because it includes some cool, or not so cool, functions. Used inside article forms or in individual article context, and as we can except it works same way as the default <txp:article_image />.
List of features
- Supports external linking, you can input links from image’s to somewhere directly from image edit page.
- If image’s alt-field is filled with URL, then image will be linked to that address.
- Captions and customizible alternative texts – no SEO mistakes – show images to bots.
Requirements
Rah_aimage requires to work properly:
- Textpattern 4.0.4+
Attributes
The plugins tag is <txp:rah_aimage />. Attributes for it follow.
class
Wraptag’s or image’s html-class that allow styling via CSS.
Default: class="" Example: "articleimage"
html_id
Wraptag’s or image’s html-id that can allow stylin via CSS.
Default: html_id="" Example: "articleimage"
thumbnail
Use thumbnail if avaible. If not, uses full sized image. Default 0, don’t use.
Default: thumbnail="0" Example: "1"
wraptag
(X)HTML tag to wrap the image and caption.
Default: wraptag="" Example: "p"
alt
Default image’s alt value if not any.
Default: alt="" Example: "An image"
caption
Default image’s caption value if not any.
Default: caption="" Example: "An image"
link
Use linking the image to the fullsized image, thumbnail, or somewhere else via alt-field.
Default: link="0" Example: "1"
linkthumb
Use linking to the thumb, if there ain’t URL submitted in alt input.
Default: linkthumb="0" Example: "1"
rel
Link’s rel attribute and value.
Default: rel="" Example: "external"
linkclass
HTML class of the link.
Default: linkclass="" Example: "imagelink"
usealturl
Use Textpatttern backend-image alt-input’s value as url. Only used if inputted alt contains link, like http://domain.com or www.domain.com.
Default: usealturl="1" Example: "0"
title
Use title below the image wrapped inside (X)HTML-element. Uses images caption as text-value.
Default: title="1" Example: "0"
titlewrap
Title’s (X)HTML wraptag.
Default: titlewrap="span" Example: "p"
titleclass
(X)HTML class of the title.
Default: titleclass="caption" Example: "imagecaption"
Example
<txp:rah_aimage link="1" wraptag="p" title="1" />
Changelog
Version 0.2
- Bug fixes.
- Better documention.
Version 0.1
- First release.