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 - Arantor
1561
The Pub / Re: Language editing inside Wedge
« on February 18th, 2013, 06:05 AM »
I have a working version of this stuff. At least, I have a cut down working version of this stuff.

I have it able to load from cache, rebuild cache and query the DB in the process, so all the mainline language files are built appropriately. I have merely commented the old code out for now.

There's not exactly caveats to this, but what I have got thus far works by recording the theme id (not skins, since skins don't have their own language files), plus language and whatnot. It shouldn't matter whether a theme is pulling from different places or not, all that matters is that for a given theme (whether it has its own language files or not), a given thing is going to get loaded, and whatever the result of that, that's what's going to be extended by the DB check and then saved.

This does mean that, currently, it *is* stored per theme. Whether that will change, I don't know. I can always assign 0 to force it for all themes and juggle the code. I don't know yet, I just implemented the base functionality and I'm not entirely sure where this is going yet.

It's not battle tested, but it seems to work (including respecting the DB content). It also does not yet do plugins, but they're going to be special anyway haha.

I don't know also how this will affect JS caching, or whether editing a file means just flushing all the JS cached files of the same language, that would be the easiest, if not the cleanest.
Posted: February 18th, 2013, 03:49 AM

Also... how come we never had agreement_french.txt anywhere in SVN that I can find? SMF supported multiple languages for the agreement for ages, not that most people really understood that it worked :/

Anyway, making a note that I'm moving it to a proper language file now, and given its name I'm giving it its own language file. But unlike the original, I'm going to be running the preparser on it. It gets shoved through parse_bbc anyway but I want to store in the language files as a directly parseable string for bbc purposes. (And I'll be excluding it from the main language editor for fairly obvious reasons; there's a dedicated UI for it, and as such I want to reuse that rather than anything else, plus there I can set up the bbc editing for it since so many people do not realise that it actually gets bbc parsed.)
Posted: February 18th, 2013, 04:18 AM

Also, the table's PK should be PRIMARY KEY (id_theme, id_lang, lang_file, lang_var, lang_key) not what's currently in SVN. I'll commit when I submit everything else related to changing the registration form code.
1562
Features / Re: New revs
« on February 18th, 2013, 04:40 AM »
(5 modified, 1 added, 10KB)

Revision: 1928
Author: arantor
Date: 18 February 2013 03:39:30
Message:
! New table for language changes tracking. This is only the new DB structure. (install.sql)

! Installer should not bother checking for agreement.txt but it should ensure that certain other folders really are. More changes will likely emerge yet. (install.php)

! Settings files should not be checking for agreement.txt. (Settings.php, Settings_bak.php)

! In certain circumstances old code for updating DB last error could be used. (Class-DB.php)

! New agreement file. Note that I haven't yet removed the old agreement.txt file because there's still code that calls it. (Agreement language file)
----
Modified : /trunk/Sources/Class-DB.php
Added : /trunk/Themes/default/languages/Agreement.english.php
Modified : /trunk/root/Settings.php
Modified : /trunk/root/Settings_bak.php
Modified : /trunk/root/install.php
Modified : /trunk/root/install.sql
1563
Features / facepalm or headdesk smiley
« on February 18th, 2013, 01:31 AM »
I don't mind which we have, but I believe we need at least one of these in the core distribution.
1564
Bug reports / Re: Mini-menu implementation
« on February 17th, 2013, 03:44 PM »
Yup, reuploading the files will fix it, just as getting the admin to clear the file cache would too.
Quote
but don't forget that we use the Like button in Top Likes stats, and that we had trouble making it show up..
Did we? I had nothing to do with that stats block (other than a query bug fix after thought likes were implemented), but it seems to me that using a separate like image would be a simpler solution to that.
1565
Bug reports / Re: Mini-menu implementation
« on February 17th, 2013, 02:55 PM »
No, I was being flippant. It's a joke from H2G2 about a ship fitted with a device that makes something infinitely improbably and the 'quasi reciprocal nature of the universe' means that something that is supposed to be infinitely improbable is bound to happen almost immediately.
Quote
Anywhere outside of an ul.actions block... Well, I mean I'm sure that plugins would be glad to be able to use them.
I'm not sure where it would be useful, though. I'm fairly sure that anyone using such buttons would just drop the relevant ul in the first place.
1566
Features / Re: Reply to New Topic
« on February 17th, 2013, 01:21 AM »
I'd be inclined to disallow reply-to-new-topic in that situation. If you want to reply and make it a new topic, just make it a new topic. Otherwise it's encouraging people to continue discussions that were locked for a reason.
1567
Features / Re: Custom profile field changes
« on February 17th, 2013, 01:21 AM »
It's funny you should say that :whistle:

You're also not the only person to have commented upon it.
1568
Off-topic / Re: Opera goes WebKit, RIP Presto
« on February 17th, 2013, 12:39 AM »
Yeah, would be nice to have Dragonfly esque features in other browsers.
1569
Bug reports / Re: Mini-menu implementation
« on February 16th, 2013, 11:56 PM »
And you just know that the 1 in 100 chance will come back to bite. Still there's always the clear-file-cache ;)
Quote
What do you think?
I realize I'm pretty mental, but at least it means I'm half cured.
Where would we want to use buttons, exactly? There aren't many places I can think of where this would actually be an issue.
Quote
12 bytes before compression.
And unless the word Android is used elsewhere on the page, it's not going to compress particularly well anyway ;)
1570
Features / Re: Multiquote
« on February 16th, 2013, 11:52 PM »
Quote
Low importance. I tend to use that (and not fight the system) when it's default, otherwise I'd avoid it. I very much prefer to answer all messages one by one, and then doing post merging as needed.
Some SMF people see it as high importance that it functions that way, but I wanted to gauge how our users as a group would see it.
Quote
This feature is also potentially incompatible with a threaded representation of the topic
Quoting posts is potentially incompatible anyway. ;)
1571
Features / Re: Quote to PM
« on February 16th, 2013, 11:21 PM »
You mean just like I suggested in the first post?
1572
Features / Re: Quote to PM
« on February 16th, 2013, 11:03 PM »
I don't really see the display-individual-post happening. There is no shortage of space for this option either - there is an entire *menu* visible in each post already...
1573
Features / Re: Reply to New Topic
« on February 16th, 2013, 09:43 PM »
So. Anyway.

Reply to new topic (leaving a post behind the old topic, maybe)... or even quote to new topic. Thoughts?
1574
Features / Quote to PM
« on February 16th, 2013, 09:43 PM »
Something I've seen done - we can already send a PM to someone by clicking on it in the minimenu.

Would it be of use to be able to send a PM quoting a given post in the process? I'm thinking this would be a new item in the minimenu per post if the user can send PMs.
1575
Bug reports / Raw HTML in Custom Profile Fields
« on February 16th, 2013, 09:34 PM »
This has multiple consequences, depending on your perspective.

So, I created a dropdown with both raw HTML and bbcode in it, as I couldn't remember whether it allowed either or neither or what. bbcode is unparsed, understandably.

Now, raw HTML is not supported as such. I'm willing to take it that this is a security measure, because the way it is implemented, the value is stored as-is in the DB and displayed without further processing later on. So it would be a security issue to just accept and handle raw HTML there, and naturally it is htmlspecialchars'ified before use.

This leads us to the interesting situation where inside the dropdown, the htmlspecialchars'ified text will be rendered as HTML inside the selectbox.

Which means there's one bug, in that the content isn't twice-parsed.


There is a separate side bug related to the selectbox. I have a piece of text with an image that's substantially bigger than a single line of text. It was the first image at hand, and was 40x40. When the selectbox is expanded, it is displayed normally. But when closed and it is the selected item, something else happens entirely. See attached. The picture shows both the expanded behaviour and the unexpanded behaviour (i.e. it doesn't change height, and the text is base-line aligned, so the text is actually out of sight)

I'm not sure what *should* be the ideal behaviour here, though.