Here are a few hacks that involve modifications to the the pmwiki style sheets.
- Opening external links in a new window and making them stand out
- Fixing Internet Explorer PNG transparency problems
Opening external links in a new window and making them stand out
This completements the cookbook recipe found on the pmwiki site ExternalLinks
To open external links in new windows, add the following in your
# and mark them with a small image on the right (throught CSS)
"<a class='external' target='_blank' href='\$LinkUrl'>\$LinkText</a>";
On this site, I have used the same effect used in WikiPedia for their external links.
For instance http://www.slashdot.org , notice the small picture on the right of the link that indicate that this is an external link to this site.
To enable this, you only need to download one of the small images below, place it in your skin directories, for instance
pub/skins/pmwiki/external.png and add in the
pub/skins/pmwiki/pmwiki.css the following:
background: url(external.png) center right no-repeat;
Now all external links in you main text body will be identified as such.
Right-click and choose save image to download a copy of the images on your PC:
If you're using mutliple skins for your site, don't forget to copy the image in your skin folders and modify the CSS for each of them!
Fixing Internet Explorer PNG transparency problems
In Firefox and IE7 there is no problem with PNG images and their transparency alpha channel.
On IE5.5 and IE6 though, if your PNG has some transparency (ie. not 100% opaque), then it will look like crap:
- This image as it looks in an image editor showing its checkerboard background through the transparent bits:
To solve this problem, download the following files and save them in your top
Then add the following to your
pub/skins/pmwiki/pmwiki.css style sheet :
behavior CSS tag is ignored in non-IE browsers so it will not affect Opera or Mozilla based browsers.
If you're using mutliple skins for your site, don't forget to modify the CSS for each of them!
If you're not saving those new files in
pub/skins, you will have to modify the path inside
pngbehaviour.htc that points to
blank.gif and change the path in the CSS as well, otherwise it won't work!