[Home]WikiPatches/DontShowBordersOnUploadedImages

UseModWiki | WikiPatches | RecentChanges | Preferences

For UseMod Version 1.0

My tiny micro-patch avoids borders being shown for embedded local (uploaded) images, i.e. no borders are shown any longer for upload:image.jpg tags. Proposed for implementation in the next UseMod release.

TomGries 15.01.2004


 sub UploadLink {
  my ($filename) = @_;
  my ($html, $url);
 
  return $filename  if ($UploadUrl eq '');  # No bad links if misconfigured
  $UploadUrl .= '/'  if (substr($UploadUrl, -1, 1) ne '/');  # End with /
  $url = $UploadUrl . $filename;
  $html = '<a href="' . $url . '">';
  if (&ImageAllowed($url)) {
    $html .= '<img src="' . $url . '" alt="upload:' . $filename . '" border=0>';
  } else {
    $html .= 'upload:' . $filename;
  }
  $html .= '</a>';
  return $html;
 }


This may be better done with the .css file. --MarkButler 2004/01/15

img
{
    border: 0px;
    margin: 0px;
    padding: 0px;
}

Thank you for pointing out. During the first days using UseMod, I did not use a .css file and noticed the (only) inconsistency. Other image links were already shown with border=0. -- TomGries 20.01.2004

Borders are shown when the image is a link like in the upload or BracketText case. If one don't like it, better use CSS --MarkusLude


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited October 21, 2007 10:44 am by JuanmaMP (diff)
Search: