X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=view%2Ftheme%2Fvier%2Ftheme.php;h=e758cb65158bd915b550e4ce2cfba95cad486b14;hb=1017e244cae7cb1cfce46fe0d4fdc43fb117885e;hp=a35afa719bd5cd3207cef574f26ab8a756147c59;hpb=6a165656426a533848554e7b8e0fae2e70f21399;p=friendica.git
diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php
index a35afa719b..e758cb6515 100644
--- a/view/theme/vier/theme.php
+++ b/view/theme/vier/theme.php
@@ -9,17 +9,26 @@
* Description: "Vier" is a very compact and modern theme. It uses the font awesome font library: http://fortawesome.github.com/Font-Awesome/
*/
-require_once("include/plugin.php");
-require_once("include/socgraph.php");
-require_once("mod/proxy.php");
-
-function vier_init(App $a) {
-
+use Friendica\App;
+use Friendica\Content\ForumManager;
+use Friendica\Core\Addon;
+use Friendica\Core\L10n;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
+use Friendica\Core\System;
+use Friendica\Database\DBM;
+use Friendica\Model\GContact;
+use Friendica\Model\Profile;
+
+require_once "mod/proxy.php";
+
+function vier_init(App $a)
+{
$a->theme_events_in_profile = false;
- set_template_engine($a, 'smarty3');
+ $a->set_template_engine('smarty3');
- if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] or $a->argv[0] === "network" && local_user()) {
+ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname'] || $a->argv[0] === "network" && local_user()) {
vier_community_info();
$a->page['htmlhead'] .= "\n";
@@ -48,19 +57,11 @@ function insertFormatting(BBcode, id) {
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
- if (BBcode == "url") {
- selected.text = "["+BBcode+"]" + "http://" + selected.text + "[/"+BBcode+"]";
- } else {
- selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
- }
+ selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
- if (BBcode == "url") {
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + "http://" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- } else {
- textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
- }
+ textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
@@ -84,7 +85,7 @@ function cmtBbClose(id) {
EOT;
- if ($a->is_mobile || $a->is_tablet){
+ if ($a->is_mobile || $a->is_tablet) {
$a->page['htmlhead'] .= <<< EOT