<?xml version='1.0' encoding='UTF-8'?><uidget><metadata><name>Kommentar</name><api_version>1.0</api_version><size height='290' width='440' /><server>local://CommentCptServer</server><blog en='10' /><gdpr enabled='true' /></metadata><view><content>&lt;div&gt;
  &lt;div class=form&gt;
		&lt;div class=&quot;item_div uic_name_input&quot;&gt;
			&lt;label&gt;
				&lt;span&gt;Angezeigter Name &lt;span class=&apos;uic_require&apos;&gt;*&lt;/span&gt;&lt;/span&gt;
				&lt;input class=&quot;site_textbox&quot; type=&quot;text&quot; name=&quot;name&quot; value=&quot;&quot;/&gt;
			&lt;/label&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div uic_email_input&quot;&gt;
			&lt;label&gt;
				&lt;span&gt;E-Mail (Nicht angezeigt)&lt;/span&gt;
				&lt;input class=&quot;site_textbox&quot; type=&quot;email&quot; name=&quot;email&quot; value=&quot;&quot;/&gt;
			&lt;/label&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div uic_website_input&quot;&gt;
			&lt;label&gt;
				&lt;span&gt;Website&lt;/span&gt;
				&lt;input class=&quot;site_textbox&quot; type=&quot;text&quot; name=&quot;url&quot; value=&quot;&quot;/&gt;
			&lt;/label&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div uic_comment_input&quot;&gt;
			&lt;label&gt;
				&lt;span&gt;Nachricht&lt;span class=&apos;uic_require&apos;&gt;*&lt;/span&gt;&lt;/span&gt;
				&lt;textarea name=&quot;comment&quot;&gt;&lt;/textarea&gt;
			&lt;/label&gt;
			&lt;div class=help_cmt&gt;URL werden automatisch in Links umgewandelt. Kein html Code.&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div&quot;&gt;
			&lt;label&gt;
				&lt;span&gt;Diesen Code eingeben&lt;span class=&apos;uic_require&apos;&gt;*&lt;/span&gt;&lt;/span&gt;
				&lt;div uitype=&quot;captcha&quot; name=&quot;captcha&quot;&gt;&lt;/div&gt;
			&lt;/label&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div&quot;&gt;
		  &lt;div class=&quot;component_gdpr_container uic_gdpr&quot;&gt;&lt;/div&gt;
		&lt;/div&gt;
		&lt;div class=&quot;item_div&quot; style=&quot;text-align:center;&quot;&gt;
			&lt;input class=&quot;site_button&quot; type=submit value=&quot;Kommentar posten&quot; /&gt;&lt;img src=&quot;/assets/loadingAnimation.gif&quot; class=&quot;loading&quot;&gt;
		&lt;/div&gt;
		&lt;div class=&quot;require_info&quot;&gt;
			*:Erforderliche Felder
		&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;stat font_title_2&quot;&gt;&lt;/div&gt;
  &lt;div class=comments&gt;&lt;/div&gt;
&lt;/div&gt;</content><properties><server_manage help='Von Benutzern gepostete Kommentare bestätigen, löschen, bearbeiten. Sie können auch Ihre Kommentare hinzufügen: diese werden den Besuchern in einer anderen Farbe angezeigt.' icon='ui_forum' name='manage' text='Verwaltung' url='/cpt_comments/manage' /><server_manage ame='add_comment' help='Fügen Sie einen Kommentar hinzu. Dieser wird den Besuchern in einer anderen Farbe angezeigt.' icon='bubble_up' text='Kommentar hinzufügen' url='/cpt_comments/new' /><number default='20' help='Festlegen, wie viele Kommentare werden pro Seite gezeigt.' maximum='50' minimum='1' name='rows' title='Pro Seite' /><checkbox default='true' help='Falls angekreuzt, werden Sie durch E-Mail über jeden Kommentar, der von Besuchern gepostet wird, benachrichtigt.' name='notify' value='Benachrichtigen' /><checkbox default='true' help='Falls angekreuzt, wird ein Kommentar, der von Besuchern gepostet wird, nicht angezeigt, bis Sie ihn bestätigen.' name='validation' value='Bestätigung' /><checkbox default='true' help='Falls angekreuzt, wird die Höhe des Moduls automatisch an die Anzahl der Nachrichten angepasst, was unter Umständen Module weiter unten verdeckt. Andernfalls erscheint eine Schiebeleiste.' name='auto_size' value='Automatische Größe' /><option class='form_position' default='&apos;bottom&apos;' display='Oben|Unten' help='Wählen Sie, wo das Formular zum Posten eines Kommentars angezeigt werden soll: vor den Kommentaren, nach den Kommentaren oder beides.' name='form_pos' title='Position des Formulars' values='top|bottom' /><checkbox default='false' help='Falls angekreuzt, werden die neuesten Kommentare ganz oben angezeigt.' name='desc' value='Neueste ganz oben' /></properties><design_properties><trigger_preset class='gtbackdrop_prop_custom' gt_type='backdrop' help='Select a predefined background style' icon='palette' mode='select' name='backdrop_preset' text='Background style' /><trigger_preset class='gttextbox_prop_custom' gt_type='textbox' help='Select a predefined style for the form text fields' icon='palette' mode='select' name='textboxes_preset' text='Text field style' /><trigger_preset class='gtbutton_prop_custom' gt_type='buttonsgroup' help='Select a predefined style for the pagination' icon='palette' mode='select' name='pagination_preset' text='Pagination style' /><trigger_preset class='gtbutton_prop_custom' gt_type='button' help='Select a predefined style for the button to post a comment' icon='palette' mode='select' name='buttons_preset' text='Button Design' /></design_properties></view><script>UI_List.UI_Comment={initialize:function(t){this.cpt=t
;t.setOptions([&quot;locked&quot;])},onDisplay:function(t){this.node=t
;this.pageSelected=0
;this.stat_node=$(t.find(&quot;&gt; div&quot;).children()[1])
;this.list_node=$(t.find(&quot;&gt; div&quot;).children()[2])
;this.form_node=$([t.find(&quot;&gt; div&quot;).children()[0],$(t.find(&quot;&gt; div&quot;).children()[0]).clone().appendTo(t.find(&quot;&gt; div&quot;))[0]])
;this.size_getter_el=$(&quot;&lt;div&gt;&lt;/div&gt;&quot;).appendTo(t)[0];var e=this
;this.comments=this.cpt.data.comments||[]
;delete this.cpt.data.comments;this.updateForms()
;this.updateCommentList();this.n={
gdpr:this.node.find(&quot;.component_gdpr_container&quot;)}
;var s=e.form_node.find(&quot;.loading&quot;);s.hide()
;this.form_node.find(&quot;:submit&quot;).bind(&quot;click&quot;,function(){
var t=e.form_node.find(&quot;:submit&quot;)
;if(!e.testFormGdpr($(this).parents(&quot;.form&quot;)))return!1;t.hide()
;s.show();var i=$(this).parents(&quot;div.form&quot;),n={
request:&quot;add_comment&quot;,comment:{},gdpr:e.getGdpr(e.n.gdpr)}
;i.find(&quot;input,textarea&quot;).each(function(t,e){
&quot;url&quot;==e.name?n.comment.url=&quot;&quot;==e.value?&quot;&quot;:&quot;http://&quot;+e.value:n.comment[e.name]=e.value
});e.cpt.ask(n,function(i){e.comments=i.comments
;e.updateCommentList()
;e.cpt.data.validation?alert(&quot;Ihr Kommentar wurde gepostet und wartet auf Best\xe4tigung.&quot;):alert(&quot;Ihr Kommentar wurde gepostet.&quot;)
;s.hide();t.show()},function(e){s.hide();t.show()
;alert(&quot;Ihr Kommentar wurde nicht gepostet:\n&quot;+e.join(&quot;\n&quot;))},i)
});$.extend(this,componentGdpr);this.initGdpr()
;this.cpt.use_graphical_preset(&quot;button&quot;,[&quot;buttons_preset&quot;])
;this.cpt.use_graphical_preset(&quot;textbox&quot;,[&quot;textboxes_preset&quot;])
;this.cpt.use_graphical_preset(&quot;backdrop&quot;,[&quot;backdrop_preset&quot;])
;this.cpt.use_graphical_preset(&quot;buttonsgroup&quot;,[&quot;pagination_preset&quot;])
;this.applyPreset();e=this
;sigCtl.connect(&quot;Theme.changed&quot;,function(){e.updateCptSize()})},
getComments:function(){var t=this;t.cpt.ask({
request:&quot;get_comments&quot;,desc:t.cpt.data.desc},function(e){
t.comments=e.comments;t.updateCommentList()},function(t){
alert(&quot;Es ist nicht m\xf6glich Kommentare zu aktualisieren.\n&quot;+t.join(&quot;\n&quot;))
})},updateCommentList:function(){var t=this,e=this.comments
;this.cpt.data.rows&amp;&amp;null!=this.cpt.data.rows&amp;&amp;0!=this.cpt.data.rows||(this.cpt.data.rows=20)
;var s=Math.ceil(e.length/this.cpt.data.rows)
;this.pageSelected=Math.max(0,Math.min(this.pageSelected,s-1))
;this.stat_node.text(sprintf(e.length&gt;1?&quot;%1$s Kommentare&quot;:&quot;%1$s Kommentar&quot;,e.length))
;0==$(&quot;.ui_list_pages&quot;,this.list_node).length?this.list_node.append(&apos;&lt;div class=&quot;ui_list_pages&quot;&gt;&lt;/div&gt;&apos;):$(&quot;.ui_list_pages&quot;,this.list_node).empty()
;s&gt;1?$.fn.paginate($(&quot;.ui_list_pages&quot;,this.list_node),s,this.pageSelected,1,3,function(e){
t.pageSelected=e;t.updateCommentList();t.create_comments()
}):$(&quot;.ui_list_pages&quot;,this.list_node).empty()
;this.create_comments()},create_comments:function(){
var t=this,e=this.comments.slice(this.pageSelected*this.cpt.data.rows,(this.pageSelected+1)*this.cpt.data.rows)
;0==$(&quot;.list_comments&quot;,this.list_node).length?this.list_node.append(&apos;&lt;div class=&quot;list_comments&quot;&gt;&lt;/div&gt;&apos;):$(&quot;.list_comments&quot;,this.list_node).empty()
;e.each(function(e){
var s=$(&quot;&lt;div&gt;&lt;/div&gt;&quot;).addClass(&quot;comment_holder&quot;).appendTo($(&quot;.list_comments&quot;,t.list_node))
;e.admin&amp;&amp;s.addClass(&quot;admin&quot;)
;e.url?s.append($(&quot;&lt;a rel=&apos;nofollow noopener noreferrer&apos; target=&apos;_blank&apos;&gt;&lt;/a&gt;&quot;).attr(&quot;href&quot;,e.url||&quot;#&quot;).text(e.name).addClass(&quot;name&quot;)):s.append($(&quot;&lt;span&gt;&lt;/span&gt;&quot;).text(e.name).addClass(&quot;name&quot;))
;e.published?s.append($(sprintf(&quot;&lt;span&gt;&amp;nbsp;%s&lt;/span&gt;&quot;,e.date)).addClass(&quot;date&quot;)):s.append($(&quot;&lt;span&gt;&amp;nbsp;Dieser Kommentar wartet auf Best\xe4tigung.&lt;/span&gt;&quot;).attr(&quot;title&quot;,e.date).addClass(&quot;date&quot;))
;s.append($(&quot;&lt;div&gt;&lt;/div&gt;&quot;).html(e.comment).addClass(&quot;comment&quot;))
})
;this.cpt.data.auto_size?this.node.css(&quot;overflow-y&quot;,&quot;hidden&quot;):this.node.css(&quot;overflow-y&quot;,&quot;auto&quot;)
;this.updateCptSize()},onShow:function(){this.updateCptSize()},
onSelect:function(){this.updateGdpr();this._showProp()},
updateCptSize:function(){if(this.cpt.data.auto_size){
var t=this,e=function(){t.cpt.setSize({h:1e4});var e=[]
;$(&quot;*&quot;,$(&quot;.UI_Comment&quot;)).each(function(){
e.push([this.offsetTop,this.offsetHeight,this.tagName,this.id,this.className])
});t.cpt.setSize({h:t.size_getter_el.offsetTop})};e()
;setTimeout(e,1e3);setTimeout(e,2500)}},updateForms:function(){
-1!=this.cpt.data.form_pos.indexOf(&quot;top&quot;)?$(this.form_node[0]).show():$(this.form_node[0]).hide()
;-1!=this.cpt.data.form_pos.indexOf(&quot;bottom&quot;)?$(this.form_node[1]).show():$(this.form_node[1]).hide()
},onPropertyChanged:function(t){
if(t.include(&quot;buttons_preset&quot;)||t.include(&quot;textboxes_preset&quot;)||t.include(&quot;backdrop_preset&quot;)||t.include(&quot;pagination_preset&quot;)){
this.updateForms();this.applyPreset()}
if(t.include(&quot;desc&quot;)||t.include(&quot;manage&quot;)||t.include(&quot;add_comment&quot;))this.getComments();else{
this.updateForms();this.updateCommentList()}this._showProp()},
_showProp:function(){
var t=$(this.component.propertyNode).add(this.component.propertyDesignNode)
;$(&quot;.gtbutton_prop_custom, .gttextbox_prop_custom, .gtbackdrop_prop_custom&quot;,t).toggle(GraphicalType.available)
},onResizeStop:function(){this.updateCptSize()},
onFontFamilyUpdate:function(){this.updateCptSize()},
applyPreset:function(){if(GraphicalType.available){
var t=GraphicalType.graphical_types.button.preset_data.prefix,e=this.form_node.find(&quot;input[type=submit]&quot;).parent()
;e.removeClassMatch(new RegExp(t))
;(s=this.cpt.getGTPreset(&quot;button&quot;,&quot;buttons_preset&quot;))&amp;&amp;e.addClass(&quot;gtbutton_preset &quot;+t+&quot;_&quot;+s)
;t=GraphicalType.graphical_types.textbox.preset_data.prefix
;var s=this.cpt.getGTPreset(&quot;textbox&quot;,&quot;textboxes_preset&quot;)
;this.form_node.removeClassMatch(new RegExp(t))
;s&amp;&amp;this.form_node.addClass(t+&quot; &quot;+t+&quot;_&quot;+s)
;t=GraphicalType.graphical_types.backdrop.preset_data.prefix,
s=this.cpt.getGTPreset(&quot;backdrop&quot;,&quot;backdrop_preset&quot;)
;this.node.removeClassMatch(new RegExp(t));if(s){
this.node.find(&quot;&gt; div:first&quot;).addClass(&quot;gt_backdrop_content&quot;)
;this.node.addClass(t+&quot; &quot;+t+&quot;_&quot;+s)
}else this.node.find(&quot;&gt; div:first&quot;).removeClass(&quot;gt_backdrop_content&quot;)
;t=GraphicalType.graphical_types.buttonsgroup.preset_data.prefix,
s=this.cpt.getGTPreset(&quot;buttonsgroup&quot;,&quot;pagination_preset&quot;)
;this.node.find(&quot;.ui_list_pages&quot;).removeClassMatch(t)
;s&amp;&amp;this.node.find(&quot;.ui_list_pages&quot;).addClass(t+&quot; &quot;+t+&quot;_&quot;+s)
;this.updateCptSize()}}};</script><style>div.UI_Comment textarea{box-sizing:border-box;width:100%;height:100px}
div.UI_Comment span.date{display:block;font-size:xx-small;font-style:italic}
div.UI_Comment .name{text-transform:capitalize}
div.UI_Comment div.comments{margin:0}
div.UI_Comment div.comment_holder{margin:5px;padding:5px}
div.UI_Comment div.help_cmt,div.UI_Comment .info{font-size:xx-small;font-style:italic}
div.UI_Comment .info{padding-left:5px}
div.UI_Comment div.comment{margin-top:5px;text-align:justify}
div.UI_Comment a.name{text-decoration:underline}
div.UI_Comment a.name:hover{text-decoration:none}
div.UI_Comment div.stat{font-weight:700;text-align:center}
.item_div{padding:5px}
.item_div input:not([type=checkbox]){width:100%;box-sizing:border-box}
div[name=captcha]{display:inline-block}
input.captcha_field,.item_div input[type=submit]{width:auto}
.uic_require,.require_info{color:red}
div.UI_Comment.gtbackdrop_preset{box-sizing:border-box}</style></uidget>