-{{ endif }}
+{{/if}}
diff --git a/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
old mode 100644
new mode 100755
index 0f4905638..a84f09031
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -1,28 +1,33 @@
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+ src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js">
diff --git a/view/tpl/contact_template.tpl b/view/tpl/contact_template.tpl
old mode 100644
new mode 100755
index ec1d35c3c..2f3ef645c
--- a/view/tpl/contact_template.tpl
+++ b/view/tpl/contact_template.tpl
@@ -1,9 +1,14 @@
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
-
+
-
+
-
$contact.name
+
{{$contact.name}}
diff --git a/view/tpl/contacts-template.tpl b/view/tpl/contacts-template.tpl
old mode 100644
new mode 100755
index ecb342bf4..66f3f5c87
--- a/view/tpl/contacts-template.tpl
+++ b/view/tpl/contacts-template.tpl
@@ -1,25 +1,30 @@
-
$header{{ if $total }} ($total){{ endif }}
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+
{{$header}}{{if $total}} ({{$total}}){{/if}}
-{{ if $finding }}
$finding
{{ endif }}
+{{if $finding}}
{{$finding}}
{{/if}}
-
-$tabs
+{{$tabs}}
-{{ for $contacts as $contact }}
- {{ inc contact_template.tpl }}{{ endinc }}
-{{ endfor }}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
+{{/foreach}}
-$paginate
+{{$paginate}}
diff --git a/view/tpl/conv.tpl b/view/tpl/conv.tpl
old mode 100644
new mode 100755
index b7222f154..c91ab635a
--- a/view/tpl/conv.tpl
+++ b/view/tpl/conv.tpl
@@ -1,17 +1,22 @@
-{{ for $threads as $thread }}
-
- {{ for $thread.items as $item }}
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+{{foreach $threads as $thread}}
+
+ {{foreach $thread.items as $item}}
{{if $item.comment_firstcollapsed}}
- {{ if $item.drop.pagedrop }}{{ endif }}
+ {{if $item.drop.pagedrop}}{{/if}}
-
$item.showlike
-
$item.showdislike
+
{{$item.showlike}}
+
{{$item.showdislike}}
-
+
-{{ if $item.toplevel }}
-{{ for $item.children as $child }}
- {{ inc $child.template with $item=$child }}{{ endinc }}
-{{ endfor }}
-{{ endif }}
+{{if $item.toplevel}}
+{{foreach $item.children as $child}}
+ {{include file="{{$child.template}}" item=$child}}
+{{/foreach}}
+{{/if}}
- $item.comment
+ {{$item.comment}}
-{{if $item.comment_lastcollapsed}}
{{endif}}
+{{if $item.comment_lastcollapsed}}
{{/if}}
diff --git a/view/tpl/conversation.tpl b/view/tpl/conversation.tpl
old mode 100644
new mode 100755
index 70cd389c9..837fbc11f
--- a/view/tpl/conversation.tpl
+++ b/view/tpl/conversation.tpl
@@ -1,28 +1,33 @@
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
-{{ for $threads as $thread }}
-
- {{ for $thread.items as $item }}
+{{foreach $threads as $thread}}
+
+ {{foreach $thread.items as $item}}
{{if $item.comment_firstcollapsed}}
\ No newline at end of file
diff --git a/view/tpl/smarty3/notifications_dislikes_item.tpl b/view/tpl/smarty3/notifications_dislikes_item.tpl
deleted file mode 100644
index 9913e6cf7..000000000
--- a/view/tpl/smarty3/notifications_dislikes_item.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/notifications_friends_item.tpl b/view/tpl/smarty3/notifications_friends_item.tpl
deleted file mode 100644
index 9913e6cf7..000000000
--- a/view/tpl/smarty3/notifications_friends_item.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/notifications_likes_item.tpl b/view/tpl/smarty3/notifications_likes_item.tpl
deleted file mode 100644
index 792b285bc..000000000
--- a/view/tpl/smarty3/notifications_likes_item.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/notifications_posts_item.tpl b/view/tpl/smarty3/notifications_posts_item.tpl
deleted file mode 100644
index 9913e6cf7..000000000
--- a/view/tpl/smarty3/notifications_posts_item.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/notify.tpl b/view/tpl/smarty3/notify.tpl
deleted file mode 100644
index 9913e6cf7..000000000
--- a/view/tpl/smarty3/notify.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/oauth_authorize.tpl b/view/tpl/smarty3/oauth_authorize.tpl
deleted file mode 100644
index d7f1963d2..000000000
--- a/view/tpl/smarty3/oauth_authorize.tpl
+++ /dev/null
@@ -1,15 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
{{$title}}
-
-
-
-
{{$app.name}}
-
-
{{$authorize}}
-
diff --git a/view/tpl/smarty3/oauth_authorize_done.tpl b/view/tpl/smarty3/oauth_authorize_done.tpl
deleted file mode 100644
index 12d4c6f48..000000000
--- a/view/tpl/smarty3/oauth_authorize_done.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
{{$title}}
-
-
{{$info}}
-{{$code}}
diff --git a/view/tpl/smarty3/oembed_video.tpl b/view/tpl/smarty3/oembed_video.tpl
deleted file mode 100644
index bdfa11509..000000000
--- a/view/tpl/smarty3/oembed_video.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
-
-
diff --git a/view/tpl/smarty3/oexchange_xrd.tpl b/view/tpl/smarty3/oexchange_xrd.tpl
deleted file mode 100644
index 04a8e1847..000000000
--- a/view/tpl/smarty3/oexchange_xrd.tpl
+++ /dev/null
@@ -1,38 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
-
- {{$base}}
-
- Friendika
- Friendika Social Network
- Friendika
- Send to Friendika
-
-
-
-
-
-
-
-
diff --git a/view/tpl/smarty3/opensearch.tpl b/view/tpl/smarty3/opensearch.tpl
deleted file mode 100644
index 63d2a1752..000000000
--- a/view/tpl/smarty3/opensearch.tpl
+++ /dev/null
@@ -1,18 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
- Friendika@{{$nodename}}
- Search in Friendika@{{$nodename}}
- http://bugs.friendika.com/
- {{$baseurl}}/images/friendika-16.png
- {{$baseurl}}/images/friendika-64.png
-
-
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/page_display.tpl b/view/tpl/smarty3/page_display.tpl
deleted file mode 100644
index e61a86fc9..000000000
--- a/view/tpl/smarty3/page_display.tpl
+++ /dev/null
@@ -1,12 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
diff --git a/view/tpl/smarty3/profile_edlink.tpl b/view/tpl/smarty3/profile_edlink.tpl
deleted file mode 100644
index 9424bcc3d..000000000
--- a/view/tpl/smarty3/profile_edlink.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/profile_entry.tpl b/view/tpl/smarty3/profile_entry.tpl
deleted file mode 100644
index 4774fd11b..000000000
--- a/view/tpl/smarty3/profile_entry.tpl
+++ /dev/null
@@ -1,16 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
-
diff --git a/view/tpl/smarty3/profile_photo.tpl b/view/tpl/smarty3/profile_photo.tpl
deleted file mode 100644
index 8c4fbfafa..000000000
--- a/view/tpl/smarty3/profile_photo.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
{{$title}}
-
-
-
-
-{{$select}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/profile_vcard.tpl b/view/tpl/smarty3/profile_vcard.tpl
deleted file mode 100644
index 422b43720..000000000
--- a/view/tpl/smarty3/profile_vcard.tpl
+++ /dev/null
@@ -1,57 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/smarty3/suggest_page.tpl b/view/tpl/smarty3/suggest_page.tpl
deleted file mode 100644
index 07999abfd..000000000
--- a/view/tpl/smarty3/suggest_page.tpl
+++ /dev/null
@@ -1,14 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
{{$title}}
-
-{{if $entries}}
-{{foreach $entries as $child}}
-{{include file="suggest_friends.tpl" entry=$child}}
-{{/foreach}}
-{{/if}}
-
-
diff --git a/view/tpl/smarty3/suggestions.tpl b/view/tpl/smarty3/suggestions.tpl
deleted file mode 100644
index b4f0cbbe5..000000000
--- a/view/tpl/smarty3/suggestions.tpl
+++ /dev/null
@@ -1,26 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
-
-
-
{{$str_notifytype}} {{$notify_type}}
-
{{$madeby}}
-
{{$fullname}}
-
-
{{$note}}
-
-
-
-
-
-
-
diff --git a/view/tpl/smarty3/threaded_conversation.tpl b/view/tpl/smarty3/threaded_conversation.tpl
deleted file mode 100644
index a2885ddc3..000000000
--- a/view/tpl/smarty3/threaded_conversation.tpl
+++ /dev/null
@@ -1,18 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-{{foreach $threads as $thread_item}}
-{{include file="{{$thread_item.template}}" item=$thread_item}}
-{{/foreach}}
-
-
-
-{{if $dropping}}
-
-
-
{{$dropping}}
-
-
-{{/if}}
diff --git a/view/tpl/smarty3/toggle_mobile_footer.tpl b/view/tpl/smarty3/toggle_mobile_footer.tpl
deleted file mode 100644
index 008d69663..000000000
--- a/view/tpl/smarty3/toggle_mobile_footer.tpl
+++ /dev/null
@@ -1,7 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-{{$toggle_text}}
-
diff --git a/view/tpl/smarty3/viewcontact_template.tpl b/view/tpl/smarty3/viewcontact_template.tpl
deleted file mode 100644
index a9837c7f9..000000000
--- a/view/tpl/smarty3/viewcontact_template.tpl
+++ /dev/null
@@ -1,14 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
{{$title}}
-
-{{foreach $contacts as $contact}}
- {{include file="contact_template.tpl"}}
-{{/foreach}}
-
-
-
-{{$paginate}}
diff --git a/view/tpl/smarty3/xchan_vcard.tpl b/view/tpl/smarty3/xchan_vcard.tpl
deleted file mode 100644
index 8878a773a..000000000
--- a/view/tpl/smarty3/xchan_vcard.tpl
+++ /dev/null
@@ -1,25 +0,0 @@
-{{*
- * AUTOMATICALLY GENERATED TEMPLATE
- * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
- *
- *}}
-
\ No newline at end of file
diff --git a/view/tpl/suggest_page.tpl b/view/tpl/suggest_page.tpl
old mode 100644
new mode 100755
index ab9150138..07999abfd
--- a/view/tpl/suggest_page.tpl
+++ b/view/tpl/suggest_page.tpl
@@ -1,9 +1,14 @@
-
$title
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+
{{$title}}
-{{ if $entries }}
-{{ for $entries as $child }}
-{{ inc suggest_friends.tpl with $entry=$child }}{{ endinc }}
-{{ endfor }}
-{{ endif }}
+{{if $entries}}
+{{foreach $entries as $child}}
+{{include file="suggest_friends.tpl" entry=$child}}
+{{/foreach}}
+{{/if}}
diff --git a/view/tpl/suggestions.tpl b/view/tpl/suggestions.tpl
old mode 100644
new mode 100755
index 656336496..b4f0cbbe5
--- a/view/tpl/suggestions.tpl
+++ b/view/tpl/suggestions.tpl
@@ -1,21 +1,26 @@
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
-
$str_notifytype $notify_type
-
$madeby
-
$fullname
-
-
$note
+
{{$str_notifytype}} {{$notify_type}}
+
{{$madeby}}
+
{{$fullname}}
+
+
{{$note}}
-
-
diff --git a/view/tpl/threaded_conversation.tpl b/view/tpl/threaded_conversation.tpl
old mode 100644
new mode 100755
index 098e399b7..a2885ddc3
--- a/view/tpl/threaded_conversation.tpl
+++ b/view/tpl/threaded_conversation.tpl
@@ -1,13 +1,18 @@
-{{ for $threads as $thread_item }}
-{{ inc $thread_item.template with $item=$thread_item }}{{ endinc }}
-{{ endfor }}
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+{{foreach $threads as $thread_item}}
+{{include file="{{$thread_item.template}}" item=$thread_item}}
+{{/foreach}}
-{{ if $dropping }}
+{{if $dropping}}
-
-
$dropping
+
+
{{$dropping}}
-{{ endif }}
+{{/if}}
diff --git a/view/tpl/toggle_mobile_footer.tpl b/view/tpl/toggle_mobile_footer.tpl
old mode 100644
new mode 100755
index 58695f4df..008d69663
--- a/view/tpl/toggle_mobile_footer.tpl
+++ b/view/tpl/toggle_mobile_footer.tpl
@@ -1,2 +1,7 @@
-$toggle_text
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+{{$toggle_text}}
diff --git a/view/tpl/viewcontact_template.tpl b/view/tpl/viewcontact_template.tpl
old mode 100644
new mode 100755
index d6f01643e..a9837c7f9
--- a/view/tpl/viewcontact_template.tpl
+++ b/view/tpl/viewcontact_template.tpl
@@ -1,9 +1,14 @@
-
$title
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}
+
{{$title}}
-{{ for $contacts as $contact }}
- {{ inc contact_template.tpl }}{{ endinc }}
-{{ endfor }}
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
+{{/foreach}}
-$paginate
+{{$paginate}}
diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl
old mode 100644
new mode 100755
index f0b623927..8878a773a
--- a/view/tpl/xchan_vcard.tpl
+++ b/view/tpl/xchan_vcard.tpl
@@ -1,18 +1,23 @@
+{{*
+ * AUTOMATICALLY GENERATED TEMPLATE
+ * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
+ *
+ *}}