Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
1066
Features / Re: Poll: Default language
« on March 26th, 2014, 07:39 AM »
Okay
.. Will go for this, then!
1067
Features / Re: Poll: Default language
« on March 25th, 2014, 10:27 PM »
I guess so. Can simply skip the whole detection code if a preferred language was entered before of course.
1068
Features / Re: New revs
« on March 25th, 2014, 07:50 PM »
[Commit revision 0b5bc99]
Author: Nao
Date: Tue, 25 Mar 2014 10:23:15 +0100
Stats: 2 files changed; +18 (insertions), -7 (deletions)

  • Don't offer a search scope select box in the search popup if we're not in a topic, and not even in a board. (Search2.php, Search.template.php)

[Commit revision 61f16c8]
Author: Nao
Date: Tue, 25 Mar 2014 17:40:22 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • Renamed a risky variable. (Notifications.php)

[Commit revision c38bfa9]
Author: Nao
Date: Tue, 25 Mar 2014 19:48:21 +0100
Stats: 12 files changed; +41 (insertions), -53 (deletions)

  • Renamed $context['protocol'] to PROTOCOL. (Class-System.php, Credits.php, ManageServer.php, PrettyUrls-Filters.php, QueryString.php)
  • Renamed hidden variable $settings['forum_alias_urls'] to $aliases, which can be set in Settings.php, of course. (QueryString.php, Subs-Auth.php)
  • Renamed $settings['pretty_remove_index'] to $remove_index. (ManageSettings.php, OriginalFiles.php, QueryString.php)
  • Renamed loadPaths to loadConstants, because it now initializes other constants, such as PROTOCOL and AJAX. (index.php, SSI.php, QueryString.php)
  • Added German to the list of detected languages for the installer. (install.php)
  • Constant problems in the installer (and potentially, upgrader) should now be fixed, thanks to loadConstants() being callable *before* database settings are loaded.
  • I think I'm done with constants, at least for now... :)

[Commit revision 7b6c637]
Author: Nao
Date: Tue, 25 Mar 2014 19:50:03 +0100
Stats: 1 file changed; +2 (insertions), -3 (deletions)

  • Forgot this one... Removed one of the last $boardurl occurrences, as redirectexit() now properly supports SCRIPT, even early in the loading process. (Upgrade.php)
1069
Features / Poll: Default language
« on March 25th, 2014, 05:59 PM »
I was just wondering...
Two years ago, I added some code to the Wedge installer so that it detects your browser's default language, and then proceeds to show you the most appropriate language for the installer (either English, French or German.)
I was updating that to add German (it was missing), and then it struck me that maybe it should be done in all pages for guests..?!

- Does the user have a preference set in a cookie or session variable? Then use that.
- Otherwise, attempt to determine list of favorite browser languages.
- If it's available as a Wedge language (usually, all browsers have at least English as a fallback anyway), then use the language with the highest priority.
- If not, then use the forum's default language. Or, if this one's not even set, then English.

That's basically what the installer does. It does take some time to execute (a preg_match_all on a short string, a strtolower, an array_combine, 2 foreach's and a short array sort), but probably less than a millisecond. I guess, ideally, that would be nice for non-English users.

What do you think, guys..? Worth the minor performance hit or not? Should I do this only on guests, or everyone?
1070
Features / Re: New revs
« on March 25th, 2014, 10:16 AM »
[Commit revision 962885b]
Author: Nao
Date: Tue, 25 Mar 2014 10:16:38 +0100
Stats: 18 files changed; +63 (insertions), -66 (deletions)

  • And... $boardurl is almost entirely replaced with ROOT! I think I'm done with replacements, phew..! (SSI.php, install.php, Class-System.php, Load.php, ManageNews.php, ManagePaid.php, ManageSettings.php, PrettyUrls-Filters.php, Security.php, Subs-Auth.php, Subs-Cache.php, Subs-PrettyUrls.php, Subscriptions-PayPal.php, Upgrade.php, Aeva-Embed.php, Admin.template.php, Media.template.php, index.template.php)
  • So, as a reminder... These variables are replaced with their equivalent in parenthesis: $boardurl (ROOT), $boarddir (ROOT_DIR), $sourcedir (APP_DIR), $settings['theme_url'] (TEMPLATES), $settings['theme_dir'] (TEMPLATES_DIR), $settings['images_url'] (ASSETS), $settings['images_dir'] (ASSETS_DIR), and $cachedir (CACHE_DIR). Do not use the $variables, except for $boardurl if you're trying to override it before it's set in stone. I'm not even sure there's a hook for that, though...
1071
Bug reports / Re: 'Thoughts' privacy not functioning properly
« on March 25th, 2014, 07:27 AM »
Sorry missed this topic.

Yes, personal text is set either through direct edit or through a click on Posterity. If you wonder what Posterity does, you can always hover it and wait for a tooltip to show up and explain... ;)
1072
Features / Re: New revs
« on March 24th, 2014, 07:41 PM »
[Commit revision 0c03c5d]
Author: Nao
Date: Mon, 24 Mar 2014 19:39:37 +0100
Stats: 4 files changed; +5 (insertions), -10 (deletions)

  • Removed Flash express installer, a feature from another time. Aeva Media will eventually move on to exclusive HTML5 code, so let's at least remove this, as I never included the required SWF file in the repo anyway. Also replaced a $boardurl to ROOT. Not that many are left, phew... (Aeva-Embed.php, ManageMedia3.php, install.sql, ManageMedia.english.php)
1073
Features / Re: Language revs
« on March 24th, 2014, 07:41 PM »
[Commit revision 966a628]
Author: Nao
Date: Mon, 24 Mar 2014 19:37:04 +0100
Stats: 3 files changed; +0 (insertion), -6 (deletions)

  • Removed express installer. (ManageMedia)
1074
Features / Re: Plugin revs
« on March 24th, 2014, 07:41 PM »
[Commit revision b527b9b]
Author: Nao (Signed-off)
Date: Mon, 24 Mar 2014 19:40:55 +0100
Stats: 6 files changed; +2 (insertions), -78 (deletions)

  • Removed a $sourcedir, although from a file that's unused in the plugin, but... Might as well clean it up. (wedgedesk/install-xml/install-attachments.xml)
  • Removed a few index.php files that were really, really overkill... And, quite frankly, buggy.
1075
Features / Re: New revs
« on March 24th, 2014, 06:41 PM »
[Commit revision 9ac202a]
Author: Nao
Date: Mon, 24 Mar 2014 18:30:43 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • cache_get_data should return null if caching is disabled. This was already the case (return === return null), but I like it to be explicit, it's easier to debug later. (Subs-Cache.php)

[Commit revision fc2ba13]
Author: Nao
Date: Mon, 24 Mar 2014 18:35:07 +0100
Stats: 6 files changed; +25 (insertions), -27 (deletions)

  • Rewrote Aeva Media to use a unified folder relative to the current Wedge path. Ah, good. I could have removed the folder altogether, but I wasn't too thrilled about rewriting all occurrences of data_dir_path and data_dir_url, so I chose to do half of the job in a few lines. (ManageMedia.php, Subs-Media.php, install.sql, ManageMedia.english.php)
  • Dropped $amSettings['enable_cache'] in favor of the system-wide variable (it is, after all, ALWAYS available, unlike in Aeva Media 1.x, which was also compatible with old code), and upped the AeMe settings cache to one hour, instead of a minute. (ManageMedia.php, Subs-Media.php, install.sql, ManageMedia.english.php)
  • Spacinazi. (ManageMedia2.php)

[Commit revision 65a4fcb]
Author: Nao
Date: Mon, 24 Mar 2014 18:40:37 +0100
Stats: 2 files changed; +4 (insertions), -6 (deletions)

  • Removed $enableCompressedData variable at install time; I'll replace it with a proper installation checkbox if I find the time to do it. Just relying on the server declaring itself as Apache unfortunately doesn't mean htaccess files will work withou extra manual steps, e.g. if AllowOverride is set to false. (install.php)
  • Renamed a few variables, while I was at it. Nothing important. (install.php, install.sql)
1076
Features / Re: Language revs
« on March 24th, 2014, 06:41 PM »
[Commit revision ac82641]
Author: Nao
Date: Mon, 24 Mar 2014 18:35:40 +0100
Stats: 3 files changed; +6 (insertions), -15 (deletions)

  • Media updates. (ManageMedia)
1077
Bug reports / Repo missing some history
« on March 24th, 2014, 01:25 PM »
I just discovered that I screwed up part of the SVN to GIT conversion of the Wedge repo.
I clearly remember deleting the /other folder from history, because it was renamed and other stuff, but apparently I used to have an /other folder at the beginning of history, which was then renamed to /root, but any files that are in /root at that point appear as if they were thrown into the repo without prior history (on November 1st, 2012 for the curious.)

Unfortunately, this includes install.php and install.sql, which are IMHO two important files.
I don't know what to do at this point... I still have a backup of the original SVN repo, but I don't know if it's worth converting it (again!) to GIT, and removing all history after November 1st, and then limiting the repo to the /other folder, and publishing that repo somewhere, as 'documentation' for those trying to blame some install history.

What do you think, guys..?
1078
Features / Re: Plugin revs
« on March 24th, 2014, 07:51 AM »
[Commit revision 73864d7]
Author: Nao (Signed-off)
Date: Mon, 24 Mar 2014 07:51:17 +0100
Stats: 1 file changed; +1 (insertion), -2 (deletions)

  • $cachedir. Yes, I know it's one of those plugins I should remove from the repo... (lang_cache_flush/LangCache.php)
1079
Support / Re: I can not install
« on March 23rd, 2014, 08:56 PM »
It was a bit broken yesterday, a lot more broken today.
Hopefully my latest commit will make it work. I haven't tested, though, counting on you guys if you're in a mood to test broken stuff. :P
1080
Features / Re: New revs
« on March 23rd, 2014, 08:56 PM »
[Commit revision 85c6339]
Author: Nao
Date: Sun, 23 Mar 2014 20:55:50 +0100
Stats: 1 file changed; +19 (insertions), -24 (deletions)

  • Moved constants around and hopefully fixed the installer elegantly. Not tested for now. But it's broken in the first place, so might as well push it. (install.php)