diff --git a/templates/2k11/commentform.tpl b/templates/2k11/commentform.tpl index 3536f487..ab7f952a 100644 --- a/templates/2k11/commentform.tpl +++ b/templates/2k11/commentform.tpl @@ -2,22 +2,22 @@
-
+
{$commentform_replyTo}
- +
- +
- +
@@ -27,11 +27,11 @@ {if $is_commentform_showToolbar}
- +
{if $is_allowSubscriptions}
- +
{/if}
@@ -40,8 +40,8 @@

{$CONST.COMMENTS_WILL_BE_MODERATED}

{/if}
- - + +
diff --git a/templates/2k11/config.inc.php b/templates/2k11/config.inc.php index ea75e1fa..d442d0e0 100644 --- a/templates/2k11/config.inc.php +++ b/templates/2k11/config.inc.php @@ -9,15 +9,17 @@ $serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOS function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); } $serendipity['smarty']->register_modifier('serendipity_smarty_html5time', 'serendipity_smarty_html5time'); -$required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc'); -$required_fields = explode(',', $required_fieldlist['value']); -$smarty_required_fields = array(); -foreach($required_fields AS $required_field) { - $required_field = trim($required_field); - if (empty($required_field)) continue; - $smarty_required_fields[$required_field] = $required_field; +if (class_exists('serendipity_event_spamblock')) { + $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc'); + $required_fields = explode(',', $required_fieldlist['value']); + $smarty_required_fields = array(); + foreach($required_fields AS $required_field) { + $required_field = trim($required_field); + if (empty($required_field)) continue; + $smarty_required_fields[$required_field] = $required_field; + } + $serendipity['smarty']->assign('required_fields', $smarty_required_fields); } -$serendipity['smarty']->assign('required_fields', $smarty_required_fields); $template_config = array( array( diff --git a/templates/2k11/entries.tpl b/templates/2k11/entries.tpl index 6bc368ec..ca8ae4d2 100644 --- a/templates/2k11/entries.tpl +++ b/templates/2k11/entries.tpl @@ -9,7 +9,7 @@
- {if $entry.categories}{foreach from=$entry.categories item="entry_category"}{if $entry_category.category_icon}{$entry_category.category_name|@escape}{/if}{/foreach}{/if} + {if $entry.categories}{foreach from=$entry.categories item="entry_category"}{if $entry_category.category_icon}{$entry_category.category_name|@escape}{/if}{/foreach}{/if} {$entry.body} {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} {$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title} diff --git a/templates/2k11/index.tpl b/templates/2k11/index.tpl index b7389877..6ba9e24f 100644 --- a/templates/2k11/index.tpl +++ b/templates/2k11/index.tpl @@ -5,30 +5,30 @@ - + {$head_title|@default:$blogTitle}{if $head_subtitle} | {$head_subtitle}{/if} - - + + {if $template_option.webfonts == 'droid'} - + {elseif $template_option.webfonts == 'ptsans'} - + {elseif $template_option.webfonts == 'osans'} - + {elseif $template_option.webfonts == 'cabin'} - + {elseif $template_option.webfonts == 'ubuntu'} - + {/if} - + {if $template_option.userstyles == true} - + {/if} - - + + {if $entry_id} - + {/if} {serendipity_hookPlugin hook="frontend_header"} @@ -47,15 +47,15 @@ {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} {if $template_option.header_img} - + {/if} {if $template_option.use_corenav} diff --git a/templates/2k11/info.txt b/templates/2k11/info.txt index 1be6f55f..b1f51846 100644 --- a/templates/2k11/info.txt +++ b/templates/2k11/info.txt @@ -1,4 +1,4 @@ Name: 2k11 Author: Matthias Mees, Veit Lehmann -Date: 2012-01-27 +Date: 2012-01-28 Require Serendipity: 1.6 diff --git a/templates/2k11/js/2k11.js b/templates/2k11/js/2k11.js index 42a99da2..b7bb924a 100644 --- a/templates/2k11/js/2k11.js +++ b/templates/2k11/js/2k11.js @@ -1,11 +1,11 @@ //https://github.com/scottjehl/iOS-Orientationchange-Fix -(function(j){var i=j.document;if(!i.querySelector){return}var l=i.querySelector("meta[name=viewport]"),a=l&&l.getAttribute("content"),h=a+", maximum-scale=1",d=a+", maximum-scale=10",g=true,c=j.orientation,k=0;if(!l){return}function f(){l.setAttribute("content",d);g=true}function b(){l.setAttribute("content",h);g=false}function e(m){c=Math.abs(j.orientation);k=Math.abs(m.gamma);if(k>8&&c===0){if(g){b()}}else{if(!g){f()}}}j.addEventListener("orientationchange",f,false);j.addEventListener("deviceorientation",e,false)})(this); +(function(m){var l=m.document;if(!l.querySelector){return}var n=l.querySelector("meta[name=viewport]"),a=n&&n.getAttribute("content"),k=a+",maximum-scale=1",d=a+",maximum-scale=10",g=true,j,i,h,c;if(!n){return}function f(){n.setAttribute("content",d);g=true}function b(){n.setAttribute("content",k);g=false}function e(o){c=o.accelerationIncludingGravity;j=Math.abs(c.x);i=Math.abs(c.y);h=Math.abs(c.z);if(!m.orientation&&(j>7||((h>6&&i<8||h<8&&i>6)&&j>5))){if(g){b()}}else{if(!g){f()}}}m.addEventListener("orientationchange",f,false);m.addEventListener("devicemotion",e,false)})(this); // https://github.com/davatron5000/FitVids.js -(function(a){a.fn.fitVids=function(b){var c={customSelector:null};var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";e.innerHTML="­";d.parentNode.insertBefore(e,d);if(b){a.extend(c,b)}return this.each(function(){var f=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector)}var g=a(this).find(f.join(","));g.each(function(){var j=a(this);if(this.tagName.toLowerCase()=="embed"&&j.parent("object").length||j.parent(".fluid-width-video-wrapper").length){return}var h=this.tagName.toLowerCase()=="object"?j.attr("height"):j.height(),i=h/j.width();j.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",(i*100)+"%");j.removeAttr("height").removeAttr("width")})})}})(jQuery); -// http://mths.be/placeholder v1.8.5 by @mathias -jQuery(function(g,a,$){var f='placeholder' in a.createElement('input'),b='placeholder' in a.createElement('textarea');if(f&&b){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((f?'textarea':':input')+'[placeholder]').bind('focus.placeholder',c).bind('blur.placeholder',e).trigger('blur.placeholder').end()};$.fn.placeholder.input=f;$.fn.placeholder.textarea=b;$(function(){$('form').bind('submit.placeholder',function(){var h=$('.placeholder',this).each(c);setTimeout(function(){h.each(e)},10)})});$(g).bind('unload.placeholder',function(){$('.placeholder').val('')})}function d(i){var h={},j=/^jQuery\d+$/;$.each(i.attributes,function(l,k){if(k.specified&&!j.test(k.name)){h[k.name]=k.value}});return h}function c(){var h=$(this);if(h.val()===h.attr('placeholder')&&h.hasClass('placeholder')){if(h.data('placeholder-password')){h.hide().next().show().focus().attr('id',h.removeAttr('id').data('placeholder-id'))}else{h.val('').removeClass('placeholder')}}}function e(){var l,k=$(this),h=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=$('').attr($.extend(d(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',c);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(this,document,jQuery)); +(function(a){a.fn.fitVids=function(b){var c={customSelector:null};var e=document.createElement("div"),d=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0];e.className="fit-vids-style";e.innerHTML="­";d.parentNode.insertBefore(e,d);if(b){a.extend(c,b)}return this.each(function(){var f=["iframe[src^='http://player.vimeo.com']","iframe[src^='http://www.youtube.com']","iframe[src^='http://www.kickstarter.com']","object","embed"];if(c.customSelector){f.push(c.customSelector)}var g=a(this).find(f.join(","));g.each(function(){var k=a(this);if(this.tagName.toLowerCase()=="embed"&&k.parent("object").length||k.parent(".fluid-width-video-wrapper").length){return}var h=this.tagName.toLowerCase()=="object"?k.attr("height"):k.height(),i=h/k.width();if(!k.attr("id")){var j="fitvid"+Math.floor(Math.random()*999999);k.attr("id",j)}k.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",(i*100)+"%");k.removeAttr("height").removeAttr("width")})})}})(jQuery); +/*! http://mths.be/placeholder v1.8.7 by @mathias */ +jQuery(function(f,h,c){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=c.fn,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){return this.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind('focus.placeholder',b).bind('blur.placeholder',e).trigger('blur.placeholder').end()};j.input=a;j.textarea=d;c(function(){c(h).delegate('form','submit.placeholder',function(){var k=c('.placeholder',this).each(b);setTimeout(function(){k.each(e)},10)})});c(f).bind('unload.placeholder',function(){c('.placeholder').val('')})}function g(l){var k={},m=/^jQuery\d+$/;c.each(l.attributes,function(o,n){if(n.specified&&!m.test(n.name)){k[n.name]=n.value}});return k}function b(){var k=c(this);if(k.val()===k.attr('placeholder')&&k.hasClass('placeholder')){if(k.data('placeholder-password')){k.hide().next().show().focus().attr('id',k.removeAttr('id').data('placeholder-id'))}else{k.val('').removeClass('placeholder')}}}function e(){var o,n=c(this),k=n,m=this.id;if(n.val()===''){if(n.is(':password')){if(!n.data('placeholder-textinput')){try{o=n.clone().attr({type:'text'})}catch(l){o=c('').attr(c.extend(g(this),{type:'text'}))}o.removeAttr('name').data('placeholder-password',true).data('placeholder-id',m).bind('focus.placeholder',b);n.data('placeholder-textinput',o).data('placeholder-id',m).before(o)}n=n.removeAttr('id').hide().prev().attr('id',m).show()}n.addClass('placeholder').val(n.attr('placeholder'))}else{n.removeClass('placeholder')}}}(this,document,jQuery)); // https://github.com/manuelbieh/Details-Polyfill -jQuery(function(a){(function(){var b=this;this.hideDetailChildren=function(c){var d=c instanceof jQuery?c[0].childNodes:c.childNodes,e=d.length;a(c).attr("open",false);if(a.browser.safari==true){for(var f=0;f");g.text(d[f].textContent).hide();a(d[f]).after(g);d[f].textContent="";e++}}}a.each(d,function(d,e){if(a(e)[0].nodeType==1&&e==a(e).parent().find("> summary:first-of-type")[0]){if(a(e).data("processed")!=true){a(e).css({display:"block",cursor:"pointer"}).data("processed",true).addClass("detailHidden").bind("click",function(){b.toggleDetailChildren(a(this))});a(c).prepend(a(e))}}else if(a(e)[0].nodeType==3&&!e.isElementContentWhitespace&&!!a.browser.safari==false){var f=a("");f.text(e.textContent).hide();a(e).after(f);e.textContent=""}else if(a(c).find("> summary").length==0){var g=a("").text("Details").css({display:"block",cursor:"pointer"}).data("processed",true).addClass("detailHidden").bind("click",function(){b.toggleDetailChildren(a(this))});a(c).prepend(g)}a(c).find("> :visible:not(summary:first-child)").hide()})};this.showDetailChildren=function(b){a(b).attr("open",true);a.each(a(b).find("> *"),function(b,c){a(c).show()})};this.toggleDetailChildren=function(a){if(a.hasClass("detailHidden")){a.removeClass("detailHidden");b.showDetailChildren(a.parents("details")[0])}else{a.addClass("detailHidden");b.hideDetailChildren(a.parents("details")[0])}};if("open"in document.createElement("details")==false){a.each(a("details"),function(c,d){b.hideDetailChildren(d);var e=a("