Filed Under (php) by admin on 19-02-2010
Tagged Under : php
The code below shows how to open a file from the server which cannot be accessed by the web server
$path = "/home/files/documents.doc";
header("Cache-Control: pre-check=0, post-check=0, max-age=0");
header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename=documents.doc);
header("Content-Description: File Transfer");
header("Content-Type:documents.doc);
header("Last-Modified: " . now());
echo readfile($path);
Filed Under (Others) by admin on 04-02-2010

A code view theme for dreamweaver based on zenburn low contrast console theme more info on zenburn official site.
To use in dreamweaver here are the Instructions:
1. Download file here
2. Go to C:\Documents and Settings\\Application Data\Adobe\Dreamweaver CS3\Configuration\CodeColoring
3. Backup first the original Colors.xml rename it as Colors-back.xml
4. Then paste our downloaded Colors.xml file
5. In your dreamweaver go to edit->preferences->code coloring then change your background color to #3f3f3f
Filed Under (mediawiki) by admin on 02-02-2010
Images on a MediaWiki wiki will by default, link to the description page
Here is a work around that when you click an image it will link to an ariticle
[[Image:Wiki.png|50px|link=MediaWiki]]
Note: The code above will work in mediawiki version 1.14 and above only
——————————————————————————————————-
Here is the workaround for older versions
Edit the Common.css
.imagelink_somename a {
width:100px;
height:100px;
display:block;
text-decoration:none;
background-image: url("http://fullurltoimage")
}
In your wiki code:
<div class="imagelink_somename">[[Some link| ]]</div>
——————————————————————————————————–
Or try the quick way
<div style="position: relative; width: {{{width}}}; height: {{{height}}}; overflow: hidden;">
<div style="position: absolute; top: 0px; left: 0px; font-size: 100px; overflow: hidden; line-height: 100px; z-index: 3;">[[{{{link}}}| ]]</div>
<div style="position: absolute; top: 0px; left: 0px; z-index: 2;">[[Image:{{{image}}}|{{{width}}}|{{{link}}}]]</div>
</div>
More workarounds found at mediawiki docs
http://www.mediawiki.org/wiki/Help:Linked_images#link.3D_Syntax_available_since_version_1.14