Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14208
Modified Files:
serendipity_editor.js serendipity_admin_image_selector.php
NEWS
Log Message:
fix image comment display
Index: serendipity_editor.js
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_editor.js,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- serendipity_editor.js 4 May 2004 08:57:38 -0000 1.10
+++ serendipity_editor.js 12 May 2004 14:35:20 -0000 1.11
@@ -142,9 +142,13 @@
var f = document.forms['serendipity[selForm]'].elements;
if (f['serendipity[linkThumbnail]'][0].checked == true) {
- img = f['thumbName'].value;
+ img = f['thumbName'].value;
+ imgWidth = f['imgThumbWidth'].value;
+ imgHeight = f['imgThumbHeight'].value;
} else {
- img = f['imgName'].value;
+ img = f['imgName'].value;
+ imgWidth = f['imgWidth'].value;
+ imgHeight = f['imgHeight'].value;
}
if (f['serendipity[filename_only]'] && f['serendipity[filename_only]'].value == 'true') {
@@ -162,22 +166,22 @@
floating = 'center';
if (XHTML11) {
if (f['serendipity[align]'][0].checked == true) {
- img = "<img " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />\n";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
} else if (f['serendipity[align]'][1].checked == true) {
- img = "<img " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />\n";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'left';
} else if (f['serendipity[align]'][2].checked == true) {
- img = "<img " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />\n";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' " + (styled ? 'style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;"' : '') + ' src="' + img + "\" alt=\"\" />";
floating = 'right';
}
} else {
if (f['serendipity[align]'][0].checked == true) {
- img = "<img border='0' hspace='5' src='" + img + "' alt='' />\n";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' border='0' hspace='5' src='" + img + "' alt='' />";
} else if (f['serendipity[align]'][1].checked == true) {
- img = "<img border='0' hspace='5' align='left' src='" + img + "' alt='' />";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' border='0' hspace='5' align='left' src='" + img + "' alt='' />";
floating = 'left';
} else if (f['serendipity[align]'][2].checked == true) {
- img = "<img border='0' hspace='5' align='right' src='" + img + "' alt='' />";
+ img = "<img width='" + imgWidth + "' height='" + imgHeight + "' border='0' hspace='5' align='right' src='" + img + "' alt='' />";
floating = 'right';
}
}
@@ -190,10 +194,12 @@
if (document.getElementById('serendipity_imagecomment').value != '') {
comment = f['serendipity[imagecomment]'].value;
- block = '<div class="serendipity_imageComment_' + floating + '">'
+ block = '<div class="serendipity_imageComment_' + floating + '" style="width: ' + imgWidth + 'px">'
+ '<div class="serendipity_imageComment_img">' + insert + '</div>'
+ '<div class="serendipity_imageComment_txt">' + comment.replace("\n", "<br />\n") + '</div>'
- + '</div>';
+ + '</div>'
+ + '<span class="serendipity_imageCommentClosing_' + floating + '"><span></span></span>';
+
} else {
block = insert;
}
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- NEWS 11 May 2004 19:39:44 -0000 1.119
+++ NEWS 12 May 2004 14:35:20 -0000 1.120
@@ -3,14 +3,20 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Fixed image comment manager's "center" alignment mode and use
+ image width/height from the image manager to format the <img>-Tag,
+ with regards to Lewe.
+ (garvinhicking)
+
* Plugin 'serendipity_event_weblogping' now takes manually defined
- pinging service as parameter.
+ pinging service as parameter. (garvinhicking)
* Modified plugin 'serendipity_event_trackexits': New config
directive to deflect any links from commenting users using a
HTTP redirect. This destroys common search engine ranking and
will not benefit comment spammers. Notice that it also disables
the common linking to non-spammer authors, so use with caution.
+ (garvinhicking)
* New plugin 'serendipity_plugin_remoterss' - Can display a foreign
remote feed. Results are cached for a custom period of time.
Index: serendipity_admin_image_selector.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_image_selector.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- serendipity_admin_image_selector.php 26 Apr 2004 10:33:20 -0000 1.21
+++ serendipity_admin_image_selector.php 12 May 2004 14:35:20 -0000 1.22
@@ -35,9 +35,11 @@
switch ($serendipity['GET']['step']) {
case '1':
$file = serendipity_fetchImageFromDatabase($serendipity['GET']['image']);
- $imgsrc = $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
- $imgName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['name'] .'.'. $file['extension'];
- $thumbName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
+ $imgsrc = $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
+ $imgName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['name'] .'.'. $file['extension'];
+ $thumbbasename = $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
+ $thumbName = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $thumbbasename;
+ $thumbsize = getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $thumbbasename);
?>
<script type="text/javascript" language="JavaScript" src="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_define.js.php"></script>
<script type="text/javascript" language="Javascript" src="<?php echo $serendipity['serendipityHTTPPath']; ?>serendipity_editor.js"></script>
@@ -48,6 +50,10 @@
<p>
<form action="#" method="GET" name="serendipity[selForm]" onSubmit="serendipity_imageSelector_done()">
<div>
+ <input type="hidden" name="imgThumbWidth" value="<?php echo $thumbsize[0]; ?>" />
+ <input type="hidden" name="imgThumbHeight" value="<?php echo $thumbsize[1]; ?>" />
+ <input type="hidden" name="imgWidth" value="<?php echo $file['dimensions_width']; ?>" />
+ <input type="hidden" name="imgHeight" value="<?php echo $file['dimensions_height']; ?>" />
<input type="hidden" name="imgName" value="<?php echo $imgName; ?>" />
<input type="hidden" name="thumbName" value="<?php echo $thumbName; ?>" />
<?php if (!empty($serendipity['GET']['htmltarget'])) { ?>
|