Advertisement:

Navigation

Readme

Image Quote Removal Package v1.0
-----------------------------------
Designed to automatically hide any images that appear in quotes, replacing them with a button, that when clicked will reveal the image.

File Edits

./Sources/Subs.php

Find: [Select]
if ($tag === null)
continue;
Add After: [Select]


if($tag['tag'] == 'img')
for($i = 0; $i < sizeof($open_tags); $i++)
if($open_tags[$i]['tag'] == 'quote')
{
$tag['content'] = '<span><input type="button" value="' . $txt['view_image'] . '" onclick="return showImage(this);" /><span style="display:none">' . $tag['content'] . '</span></span>';
break;
}

./Themes/default/languages/index.english.php

Find (at the end of the file): [Select]
?>
Add Before: [Select]

$txt['view_image'] = 'View Image';

./Themes/default/script.js

Find: [Select]
indicator.style.display = turn_on ? "block" : "none";
}
}
Add After: [Select]



// Shows the image when it is clicked on.
function showImage(obj)
{
obj.parentNode.childNodes[1].style.display = "";
obj.style.display = "none";
return false;
}