> > uhm ok .. can I expect to get a release with this feature in the near future ?
>
> I checked how I would do that and did not find a good solution. If I put a
>
> <img width=300 ...>
>
> for example, this scales down a big picture to only 300 pixels width. But if you submit a small
> picture, like just an icon, it blows it up to 300 pixels as well, which does not look nice.
> Unfortunatle I don't know of any option like "maxwidth=x" which only scales pictures down if they
> are larger than x. Do you know?
the following patch should do the job:
#################################################################################
--- elogd_orig.c 2005-02-03 16:46:10.000000000 +0100
+++ elogd_imgscale.c 2005-02-08 18:58:14.000000000 +0100
@@ -13690,9 +13690,14 @@
("<tr><td colspan=%d class=\"attachment\">%s %d: <a href=\"%s\">%s</a>\n",
colspan, loc("Attachment"), index + 1, ref, attachment[index] + 14);
if (show_attachments)
- rsprintf
- ("</td></tr><tr><td colspan=%d class=\"messagelist\"><img
src=\"%s\"></td></tr>",
- colspan, ref);
+ if (!getcfg(lbs->name, "Attached image width", str, sizeof(str))) {
+ rsprintf("</td></tr><tr><td colspan=%d class=\"messagelist\"><img
src=\"%s\"></td></tr>",
+ colspan, ref);
+ } else {
+ rsprintf("</td></tr><tr><td colspan=%d class=\"messagelist\">"
+ "<div style=\"width: %s\"><img src=\"%s\" style=\"width:
100%\"></div></td></tr>",
+ colspan, str, ref);
+ }
} else {
rsprintf
("<tr><td colspan=%d class=\"attachment\">%s %d: <a href=\"%s\">%s</a>\n",
@@ -18090,7 +18095,10 @@
if (is_image(att)) {
rsprintf("<tr><td class=\"messageframe\">\n");
rsprintf("<a name=\"att%d\"></a>\n", index + 1);
- rsprintf("<img src=\"%s\"></td></tr>", ref);
+ if (!getcfg(lbs->name, "Attached image width entry", str, sizeof(str)))
+ rsprintf("<img src=\"%s\"></td></tr>", ref);
+ else
+ rsprintf("<div style=\"width: %s\"><img src=\"%s\" style=\"width:
100%\"></div></td></tr>", str, ref);
rsprintf("</td></tr>\n\n");
} else {
if (is_ascii(file_name)) {
##########################################################################################
two new elog.conf parameters are defined:
Attached image width ; width of full view image attached
Attached image width entry ; width of attached image in the entry list view
plz apply :-) |