{"id":580,"date":"2007-03-06T15:49:30","date_gmt":"2007-03-06T15:49:30","guid":{"rendered":"http:\/\/www.nargalzius.com\/blog2\/http:\/www.nargalzius.com\/blog2\/archives\/2007\/03\/2007_03_06_2349.php"},"modified":"2017-02-10T02:30:32","modified_gmt":"2017-02-10T02:30:32","slug":"comment-section-improved","status":"publish","type":"post","link":"http:\/\/nargalzius.com\/blog\/archives\/2007\/03\/06\/comment-section-improved","title":{"rendered":"Comment section improved"},"content":{"rendered":"<p>As you all know, my comment form has always had a live preview feature that had limited support for [Markdown]<a href=\"http:\/\/daringfireball.net\/projects\/markdown\/syntax\" title=\"what is Markdown?\">0<\/a> syntax &#8211; which I discussed in a <a href=\"http:\/\/www.nargalzius.com\/blog\/archives\/2006\/07\/2006_07_18_1512.php\" title=\"read about it\">past entry<\/a><\/p>\n<p>Recently (a while ago to be exact), I found a somewhat full implementation of [Markdown]<a href=\"http:\/\/daringfireball.net\/projects\/markdown\/syntax\" title=\"what is Markdown?\">0<\/a> <em>via<\/em> JavaScript <a href=\"http:\/\/www.attacklab.net\/showdown-gui.html\" title=\"view page\">here<\/a>. Naturally I decided to integrate it into the live preview function. So I spent the whole practice session of our <a href=\"http:\/\/www.bukaspalad.com\" title=\"What choir?\">choir<\/a> hacking away at the code to fit my needs. Here&#8217;s what came out of it:<\/p>\n<div align=\"center\">\n<a rel=\"lightbox\" href=\"http:\/\/static.flickr.com\/181\/412655721_1351aaf648_o.jpg\" target=\"_blank\" title=\"You may click on the image for more details\"><img decoding=\"async\" alt=\"\" src=\"http:\/\/static.flickr.com\/181\/412655721_02119dc13a_m.jpg\"><\/a>\n<\/div>\n<p>Feel free to try commenting yourself \ud83d\ude42<!--more--><a href=\"http:\/\/www.attacklab.net\/showdown-gui.html\" title=\"view page\">1<\/a>: <a href=\"http:\/\/www.nargalzius.com\/blog\/archives\/2006\/07\/2006_07_13_1001.php\">http:\/\/www.nargalzius.com\/blog\/archives\/2006\/07\/2006_07_13_1001.php<\/a> &#8220;read post&#8221;<\/p>\n<p>On another note, I just realized now that my Lightboxing for Flickr images was messed up since entries from <em>January!<\/em> Apparently, Flickr did some jiggery-pokery on their image URLs as well and appended a &#8220;farm1&#8221; to most of them <span class=\"footnote_referrer\"><a role=\"button\" tabindex=\"0\" onclick=\"footnote_moveToReference_580_1('footnote_plugin_reference_580_1_1');\" onkeypress=\"footnote_moveToReference_580_1('footnote_plugin_reference_580_1_1');\" ><sup id=\"footnote_plugin_tooltip_580_1_1\" class=\"footnote_plugin_tooltip_text\">1 <\/sup><\/a><span id=\"footnote_plugin_tooltip_text_580_1_1\" class=\"footnote_tooltip\">Those pricks!<\/span><\/span><script type=\"text\/javascript\"> jQuery('#footnote_plugin_tooltip_580_1_1').tooltip({ tip: '#footnote_plugin_tooltip_text_580_1_1', tipClass: 'footnote_tooltip', effect: 'fade', predelay: 0, fadeInSpeed: 200, delay: 400, fadeOutSpeed: 200, position: 'top right', relative: true, offset: [10, 10], });<\/script> so when an image URL would normally start with a <code>http:\/\/static.flickr.com\/...<\/code> it was now <code>http:\/\/farm1.static.flickr.com\/...<\/code><\/p>\n<p>My <a href=\"http:\/\/www.attacklab.net\/showdown-gui.html\" title=\"view page\">Lightbox hack<\/a> uses <code>regex<\/code> replacement which looks for the <code>static.flickr.com<\/code> url to convert it to a proper redirect to the images&#8217; actual info pages (which is <code>http:\/\/www.flickr.com\/photos\/nargalzius\/XXXXXXXX...<\/code>). Naturally, most of the newer images I posted which had <code>farm1<\/code> didn&#8217;t match &#8211; hence weren&#8217;t processed by the Lightbox &#8211; eep!<\/p>\n<p>Fortunately, taking out the <code>farm1<\/code> pefix still works and doesn&#8217;t yield a broken link &#8211; so it just had to get a little tedious for me to change every single <code>&lt;img src=\"http:\/\/farm1...\"&gt;<\/code> address I could find. Hopefully it stays that way &#8211; else I&#8217;ll be in trouble.<\/p><div class=\"speaker-mute footnotes_reference_container\"> <div class=\"footnote_container_prepare\"><p><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_label pointer\" onclick=\"footnote_expand_collapse_reference_container_580_1();\">Notes<\/span><span role=\"button\" tabindex=\"0\" class=\"footnote_reference_container_collapse_button\" style=\"display: none;\" onclick=\"footnote_expand_collapse_reference_container_580_1();\">[<a id=\"footnote_reference_container_collapse_button_580_1\">+<\/a>]<\/span><\/p><\/div> <div id=\"footnote_references_container_580_1\" style=\"\"><table class=\"footnotes_table footnote-reference-container\"><caption class=\"accessibility\">Notes<\/caption> <tbody> \r\n\r\n<tr class=\"footnotes_plugin_reference_row\"> <th scope=\"row\" class=\"footnote_plugin_index_combi pointer\"  onclick=\"footnote_moveToAnchor_580_1('footnote_plugin_tooltip_580_1_1');\"><a id=\"footnote_plugin_reference_580_1_1\" class=\"footnote_backlink\"><span class=\"footnote_index_arrow\">&#8673;<\/span>1<\/a><\/th> <td class=\"footnote_plugin_text\">Those pricks!<\/td><\/tr>\r\n\r\n <\/tbody> <\/table> <\/div><\/div><script type=\"text\/javascript\"> function footnote_expand_reference_container_580_1() { jQuery('#footnote_references_container_580_1').show(); jQuery('#footnote_reference_container_collapse_button_580_1').text('\u2212'); } function footnote_collapse_reference_container_580_1() { jQuery('#footnote_references_container_580_1').hide(); jQuery('#footnote_reference_container_collapse_button_580_1').text('+'); } function footnote_expand_collapse_reference_container_580_1() { if (jQuery('#footnote_references_container_580_1').is(':hidden')) { footnote_expand_reference_container_580_1(); } else { footnote_collapse_reference_container_580_1(); } } function footnote_moveToReference_580_1(p_str_TargetID) { footnote_expand_reference_container_580_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } } function footnote_moveToAnchor_580_1(p_str_TargetID) { footnote_expand_reference_container_580_1(); var l_obj_Target = jQuery('#' + p_str_TargetID); if (l_obj_Target.length) { jQuery( 'html, body' ).delay( 0 ); jQuery('html, body').animate({ scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.2 }, 380); } }<\/script>","protected":false},"excerpt":{"rendered":"<p>As you all know, my comment form has always had a live preview feature that had limited support for [Markdown]0 syntax &#8211; which I discussed in a past entry Recently (a while ago to be exact), I found a somewhat full implementation of [Markdown]0 via JavaScript here. Naturally I decided to integrate it into the &hellip; <p class=\"link-more\"><a href=\"http:\/\/nargalzius.com\/blog\/archives\/2007\/03\/06\/comment-section-improved\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Comment section improved&#8221;<\/span><\/a><\/p><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[9],"tags":[196,267,741,810],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-nargalzius","tag-bukas-palad","tag-comments","tag-markdown","tag-nargalzius"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":1,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":1718,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions\/1718"}],"wp:attachment":[{"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nargalzius.com\/blog\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}