diff options
-rw-r--r-- | src/codegen/emoticons.php | 4 | ||||
-rw-r--r-- | src/pages/guestbook.php | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/codegen/emoticons.php b/src/codegen/emoticons.php index 51b9ed6..5b6f51f 100644 --- a/src/codegen/emoticons.php +++ b/src/codegen/emoticons.php @@ -4,7 +4,7 @@ $em_dir = SRCDIR . "/static/emoticons"; $emoticons = array_map( fn($i) => [ pathinfo($i, PATHINFO_FILENAME), - getimagesize($em_dir . "/" . $i)["3"] + ...array_slice(getimagesize($em_dir . "/" . $i), 0, 2), ], array_values( array_filter( @@ -32,5 +32,5 @@ return [ json_encode([ $emoticons, $emoticons_alpha_lookup, - ], JSON_PRETTY_PRINT) . ";\n", + ]) . ";\n", ]; diff --git a/src/pages/guestbook.php b/src/pages/guestbook.php index e7c3e28..6a3393d 100644 --- a/src/pages/guestbook.php +++ b/src/pages/guestbook.php @@ -28,7 +28,8 @@ function replace_emoticons(html) { html = html.split(":" + EMOTICONS[0][i][0] + ":") .join( '<img src="/static/emoticons/' + EMOTICONS[0][i][0] + '.gif" ' + - EMOTICONS[0][i][1] + + ' width="' + EMOTICONS[0][i][1] + '"' + + ' height="' + EMOTICONS[0][i][2] + '"' + ' alt="' + EMOTICONS[0][i][0] + '"' + ' title=":' + EMOTICONS[0][i][0] + ':" />' ); @@ -61,8 +62,9 @@ $(function() { idx = EMOTICONS[1][i]; win.document.write( "<tr><td>" + - '<img src="/static/emoticons/' + EMOTICONS[0][idx][0] + '.gif" ' + - EMOTICONS[0][idx][1] + + '<img src="/static/emoticons/' + EMOTICONS[0][idx][0] + '.gif"' + + ' width="' + EMOTICONS[0][idx][1] + '"' + + ' height="' + EMOTICONS[0][idx][2] + '"' + ' alt="' + EMOTICONS[0][idx][0] + '"' + ' title=":' + EMOTICONS[0][idx][0] + ':" />' + "</td><td><font face=Verdana size=2>" + |