}
}
- function showEXIFdata()
- {
- global $wgOut , $wgShowEXIF ;
- if ( ! $wgShowEXIF ) return ;
+ function showEXIFdata() {
+ global $wgOut, $wgShowEXIF;
+ if ( ! $wgShowEXIF ) return;
# Get the EXIF data
- $exif = $this->img->getExifData () ;
- if ( count ( $exif ) == 0 ) return ; # No EXIF data available
- if ( count ( $exif ) == 1 && isset ( $exif["EXIF"] ) && $exif["EXIF"] == "NO" ) return ; # This image does not have EXIF data
+ $exif = $this->img->getExifData();
+ if ( count ( $exif ) == 0 ) return; # No EXIF data available
# Create the table
- $r = "<table border='1' cellspacing='0' cellpadding='0' align='right'>" ;
- $r .= "<caption>EXIF data</caption>" ;
- foreach ( $exif AS $k => $v ) {
- $r .= "<tr>" ;
- $v = str_replace ( "\0" , "" , $v ) ;
- $r .= "<th><small>" . htmlspecialchars ( $k ) . "</small></th>" ;
- $r .= "<td><small>" . htmlspecialchars ( $v ) . "</small></td>" ;
- $r .= "</tr>" ;
- }
- $r .= "</table>" ;
- $wgOut->addHTML ( $r ) ;
+ $r = "{| class=exif\n" ;
+ $r .= '|+ ' . wfMsg( 'exifdata' ) . "\n|-\n" ;
+ foreach ( $exif as $k => $v ) {
+ $r .= "! $k\n";
+ $r .= '| ' . htmlspecialchars($v) . "\n|-\n";
}
+ $wgOut->addWikiText( substr($r, 0, -3) . '|}' );
+ }
function openShowImage()
{
function uploadNewVersionLink() {
global $wgOut;
+ $wgOut->addHTML("<div class='editExternally'>");
$wgOut->addWikiText( wfMsg( 'uploadnewversion', $this->getUploadUrl() ) );
+ $wgOut->addHTML("</div><br clear='both' />");
}
function externalEditorLink()
"action=edit&externaledit=true&mode=file" ) );
$wgOut->addWikiText( '<div class="editExternallyHelp">' .
wfMsg('edit-externally-help') . '</div>' );
- $wgOut->addHTML( '</div><br clear="both" />' );
+ $wgOut->addHTML( '</div><br clear="all" />' );
}
function closeShowImage()