diff --git a/_sakura/cache/.htaccess b/_sakura/cache/.htaccess deleted file mode 100644 index 792d600..0000000 --- a/_sakura/cache/.htaccess +++ /dev/null @@ -1 +0,0 @@ -# diff --git a/_sakura/components/Templates.php b/_sakura/components/Templates.php index 53d0864..c94c23e 100644 --- a/_sakura/components/Templates.php +++ b/_sakura/components/Templates.php @@ -52,7 +52,7 @@ class Templates { // Enable caching if(Configuration::getConfig('enable_tpl_cache')) - $twigEnv['cache'] = ROOT .'_sakura/cache'; + $twigEnv['cache'] = ROOT .'cache'; // And now actually initialise the templating engine self::$_ENG = new Twig_Environment($twigLoader, $twigEnv); diff --git a/_sakura/config/config.example.ini b/_sakura/config/config.example.ini index 274a86f..c4faf36 100644 --- a/_sakura/config/config.example.ini +++ b/_sakura/config/config.example.ini @@ -31,21 +31,6 @@ database = sakura prefix = sakura_ -; Path configuration (DO NOT INCLUDE PROTOCOLS) -[urls] -; Main site location -main = yourdomain.com - -; API location -api = api.yourdomain.com - -; Content location -content = content.yourdomain.com - -; Chat location -chat = chat.yourdomain.com - - ; Data files relative to the _sakura directory [data] ; File containing CloudFlare IPv4 CIDRs diff --git a/_sakura/sakura.php b/_sakura/sakura.php index 8f6deb4..6dd7e78 100644 --- a/_sakura/sakura.php +++ b/_sakura/sakura.php @@ -66,12 +66,14 @@ if(!defined('SAKURA_NO_TPL')) { 'vlabel' => SAKURA_VLABEL, 'vcolour' => SAKURA_COLOUR, 'stable' => SAKURA_STABLE, - 'urls' => Configuration::getLocalConfig('urls'), + 'url_main' => Configuration::getConfig('url_main'), + 'url_api' => Configuration::getConfig('url_api'), + 'content_path' => Configuration::getConfig('content_path'), + 'resources' => Configuration::getConfig('content_path') .'/data/'. strtolower(Templates::$_TPL), 'charset' => Configuration::getConfig('charset'), 'currentpage' => '//'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], 'recaptcha_public' => Configuration::getConfig('recaptcha_public'), 'recaptcha_enable' => Configuration::getConfig('recaptcha'), - 'resources' => '//'. Configuration::getLocalConfig('urls')['content'] .'/data/'. strtolower(Templates::$_TPL), 'disableregister' => Configuration::getConfig('disable_registration'), 'locksite' => Configuration::getConfig('lock_site'), 'locksitereason' => Configuration::getConfig('lock_site_reason'), @@ -89,7 +91,7 @@ if(!defined('SAKURA_NO_TPL')) { 'maxusernamelength' => Configuration::getConfig('username_max_length'), 'disqus_shortname' => Configuration::getConfig('disqus_shortname'), 'disqus_api_key' => Configuration::getConfig('disqus_api_key'), - 'date_format' => Configuration::getConfig('date_format') + 'date_format' => Configuration::getConfig('date_format') ], diff --git a/_sakura/templates/yuuno/elements/indexPanel.tpl b/_sakura/templates/yuuno/elements/indexPanel.tpl index 50fcd51..0e90943 100644 --- a/_sakura/templates/yuuno/elements/indexPanel.tpl +++ b/_sakura/templates/yuuno/elements/indexPanel.tpl @@ -1,9 +1,9 @@ {% if user.checklogin %}
Hi, {{ user.data.username }}!
- +
{% else %} @@ -17,20 +17,20 @@
Welcome!
Welcome to Flashii! This is a site for a bunch of friends to hang out, nothing special. Anyone is pretty much welcome to register so why not have a go? {% endif %} {% endif %}
Stats
We have {{ stats.userCount }}, -{{ stats.newestUser.username }} is the newest user, +{{ stats.newestUser.username }} is the newest user, it has been {{ stats.lastRegDate }} since the last user registered and the forum has {{ stats.topicCount }} and {{ stats.postCount }}.
Online Users
{% if stats.onlineUsers %} All active users in the past 5 minutes:
{% for amount,onlineUser in stats.onlineUsers %} - {{ onlineUser.username }}{% if amount != (stats.onlineUsers|length - 1) %}, {% endif %} + {{ onlineUser.username }}{% if amount != (stats.onlineUsers|length - 1) %}, {% endif %} {% endfor %} {% else %} There were no online users in the past 5 minutes. diff --git a/_sakura/templates/yuuno/errors/http404.tpl b/_sakura/templates/yuuno/errors/http404.tpl index 3da1954..c1a3137 100644 --- a/_sakura/templates/yuuno/errors/http404.tpl +++ b/_sakura/templates/yuuno/errors/http404.tpl @@ -7,8 +7,8 @@

diff --git a/_sakura/templates/yuuno/forum/forumEntry.tpl b/_sakura/templates/yuuno/forum/forumEntry.tpl index fa9b931..8e85ffe 100644 --- a/_sakura/templates/yuuno/forum/forumEntry.tpl +++ b/_sakura/templates/yuuno/forum/forumEntry.tpl @@ -1,6 +1,6 @@ {% if category.forums|length and category.forum|length %} - {% if category.forum.forum_type != 1 %}Subforums{% else %}{{ category.forum.forum_name }}{% endif %} + {% if category.forum.forum_type != 1 %}Subforums{% else %}{{ category.forum.forum_name }}{% endif %} {% for forum in category.forums %} @@ -8,14 +8,14 @@
- +
{{ forum.forum_desc }} {% if board.forums[forum.forum_id]|length %}
Subforums: {% for forum in board.forums[forum.forum_id].forums %} - {{ forum.forum_name }} + {{ forum.forum_name }} {% endfor %}
{% endif %} @@ -29,7 +29,7 @@
{% if forum.last_poster.user.id %} - {{ forum.last_poster.post.post_subject }}
{{ forum.last_poster.elap }} by {% if forum.last_poster.user.id %}{{ forum.last_poster.user.username }}{% else %}[deleted user]{% endif %} + {{ forum.last_poster.post.post_subject }}
{{ forum.last_poster.elap }} by {% if forum.last_poster.user.id %}{{ forum.last_poster.user.username }}{% else %}[deleted user]{% endif %} {% else %} There are no posts in this forum.
  {% endif %} diff --git a/_sakura/templates/yuuno/forum/posting.tpl b/_sakura/templates/yuuno/forum/posting.tpl index 730fbde..5bf2332 100644 --- a/_sakura/templates/yuuno/forum/posting.tpl +++ b/_sakura/templates/yuuno/forum/posting.tpl @@ -25,7 +25,7 @@
{% for emoticon in posting.emoticons %} - {{ emoticon.emote_string }} + {{ emoticon.emote_string }} {% endfor %}

diff --git a/_sakura/templates/yuuno/forum/viewtopic.tpl b/_sakura/templates/yuuno/forum/viewtopic.tpl index b3d0b78..a48ba3d 100644 --- a/_sakura/templates/yuuno/forum/viewtopic.tpl +++ b/_sakura/templates/yuuno/forum/viewtopic.tpl @@ -11,15 +11,15 @@ {{ post.user.username }}
{% if not post.user.usertitle %}{{ post.rank.title }}{% else %}{{ post.user.usertitle }}{% endif %}
- Tenshi {{ post.country }} + Tenshi {{ post.country }}
{% if user.data.id == post.user.id %} {% else %} {% if post.is_friend != 0 %}{% endif %} - - + + {% endif %} {% else %} [deleted user] diff --git a/_sakura/templates/yuuno/global/footer.tpl b/_sakura/templates/yuuno/global/footer.tpl index fcf4f8a..9e6cdaf 100644 --- a/_sakura/templates/yuuno/global/footer.tpl +++ b/_sakura/templates/yuuno/global/footer.tpl @@ -2,19 +2,19 @@
diff --git a/_sakura/templates/yuuno/global/header.tpl b/_sakura/templates/yuuno/global/header.tpl index 9432d1f..38b4b4e 100644 --- a/_sakura/templates/yuuno/global/header.tpl +++ b/_sakura/templates/yuuno/global/header.tpl @@ -38,15 +38,9 @@ }, - "resources": "{{ sakura.resources }}", - - "urls": { - - {% for name,url in sakura.urls %} - "{{ name }}": "{{ url }}"{% if loop.index != sakura.urls|length %}, {% endif %} - {% endfor %} - - }, + "url_main": "{{ sakura.url_main }}", + "content": "{{ sakura.content_path }}", + "resources": "{{ sakura.resources }}", "minUserLen": {{ sakura.minusernamelength }}, "maxUserLen": {{ sakura.maxusernamelength }}, @@ -91,7 +85,7 @@ generateForm("headerLogoutForm", { "class": "hidden", "method": "post", - "action": "//{{ sakura.urls.main }}/logout" + "action": "//{{ sakura.url_main }}/logout" }, { "mode": "logout", @@ -126,7 +120,7 @@ generateForm("doFriendToggle", { "class": "hidden", "method": "post", - "action": "//{{ sakura.urls.main }}/friends" + "action": "//{{ sakura.url_main }}/friends" }, { "{% if profile.friend == 0 %}add{% else %}remove{% endif %}": "{{ profile.user.id }}", @@ -203,33 +197,33 @@