Difference between revisions of "Icons"
(link to Emoji list) |
(→Usage: adds new instructions) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
[[Help:Contents]] provides details about using graphics. | [[Help:Contents]] provides details about using graphics. | ||
− | + | In order to provide more utility for using Icons and graphics as interface elements in this wiki, we've installed the [[mw:Extension:Icon|Icon Extension]] This creates a new "parser function" which simply means that the syntax for using graphics is easier. | |
+ | |||
+ | == Usage == | ||
+ | <pre> | ||
+ | {{#icon: image title | image alt text | image width | page to link to }} | ||
+ | </pre> | ||
+ | * Only the '''image title''' argument is required - the rest are optional. | ||
+ | <pre> | ||
+ | {{#icon: Info.png|Info}} will display the Info.png icon in it's default size | ||
+ | {{#icon: Info.png|Info|24}} will display the Info.png icon with a width of 24px | ||
+ | {{#icon: Info.png|Info|24|Special:Help}} same as above and clicking on it will link to Special:Help | ||
+ | </pre> | ||
+ | |||
+ | {{Ambox | ||
+ | | text = I have modified this extension '''locally''' to be able to specify the HTML class attribute as the third argument. }} | ||
== Installing Icons == | == Installing Icons == | ||
Line 12: | Line 26: | ||
php importImages.php --extensions=svg --user=Freephile --comment='Get the whole set at http://www.oxygen-icons.org' /tmp/ | php importImages.php --extensions=svg --user=Freephile --comment='Get the whole set at http://www.oxygen-icons.org' /tmp/ | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 05:38, 26 October 2008
Help:Contents provides details about using graphics.
In order to provide more utility for using Icons and graphics as interface elements in this wiki, we've installed the Icon Extension This creates a new "parser function" which simply means that the syntax for using graphics is easier.
Usage[edit | edit source]
{{#icon: image title | image alt text | image width | page to link to }}
- Only the image title argument is required - the rest are optional.
{{#icon: Info.png|Info}} will display the Info.png icon in it's default size {{#icon: Info.png|Info|24}} will display the Info.png icon with a width of 24px {{#icon: Info.png|Info|24|Special:Help}} same as above and clicking on it will link to Special:Help
I have modified this extension locally to be able to specify the HTML class attribute as the third argument. |
Installing Icons[edit | edit source]
In order to get the Oxygen icons into this mediawiki system, I installed the icon set (well actually I think it came as a dependency with some kde4 application) which provides the compressed svg files. Then I copied the compressed files to a temporary location where I could decompress them and import them. Using the import tool provided by mediawiki, I batch imported the ~800 images. I didn't categorize them, which had I known about categorizing images I would have done first, rather than later. If you want to categorize your images on import, just add the category to the comment.
find /usr/lib/kde4/share/icons/oxygen/scalable/ -name '*svgz' -exec cp {} /tmp/ \;
gunzip --suffix=svgz /tmp/*svgz
for i in /tmp/*\.; do mv $i ${i}svg; done;
cd phase3/maintenance
php importImages.php --extensions=svg --user=Freephile --comment='Get the whole set at http://www.oxygen-icons.org' /tmp/