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
5896
Plugins / Re: Plugin servers / getting plugins to a system
« on October 13th, 2011, 09:20 PM »
Yeah, that's something that concerned me. That said, there is a PEAR library equivalent that can be safely used if needed.

What about the rest of my stream of quasi-nonsense? :P
5897
Plugins / Re: Plugin servers / getting plugins to a system
« on October 13th, 2011, 09:14 PM »
I'm thinking ZipArchive ;)
5898
Features / Re: Template skeleton!
« on October 13th, 2011, 09:00 PM »
Anything like that will work and yes, it would be better than using <we:*> for that. But I suggest not using <script> for the obvious confusion reason...
5899
Plugins / Plugin servers / getting plugins to a system
« on October 13th, 2011, 06:19 PM »
So, this is one of the things I've been thinking about lately, is how to make plugin servers work, on a technical level.

This is going to be something of a stream of consciousness rather than a focused discussion, to start with. It's more about trying to make sense of all my thoughts, and if you have anything to add, please do.

Let's look at what SMF has (not what it actually uses). It's all in the Packages > Download Packages page.

Up front that's stupid. You click a page called Download, so that you can upload something. It's almost as backward as the logic of clicking a Start Button to shut down, though at least they have the argument of 'starting the shutdown process'.

Idiot question of the day... should uploading plugins from your computer be a separate page to downloading from a plugin server? Gut instinct says yes, it should, because they're totally different options and processes.

That also leads in nicely to something Dragooon mentioned, about plugins having an 'app storefront' kind of deal. I've mentioned before that I'd like to be able to support the environment where creators can publish paid plugins, and still make use of something like the package server facility, currently not possible in SMF. (Incidentally I was thinking about that almost 18 months ago, if not further back)

Hmm. Seems to me that the actual process of getting a list of plugins is at least as dependent on what interface to use to display, as anything else. SMF provides the ability to accept a list of plugins, and/or a list of categories, wherein you can browse categories. Thing is, that most people don't realise, is that you can also segment the package server list by category so you only need serve a list of what categories there are, then what's in each one - as opposed to the behemoth served by SMF currently that actually breaks some installs with low memory limits.

Then again, that's when you have a public list. If the list is potentially private or semi private, or in any way filterable, it needs to be accommodated by the server, not the client, which means that just serving a packages.xml type file isn't an answer. Hmm. I'm sensing that you'd make a request on a given page much you do with feeds, and make it essentially similar to a RESTful style implementation, that the URL http://example.com/forum/index.php?action=plugins would provide a list of plugins available for download, and adding ;cat=x would filter the list by the specified category. Of course, that would be a detail provided by the server.

I'm a little wary of providing something that amounts to a storefront structure but I'm OK with the architecture providing lists of what's available and so on, especially as for anything that's premium, you'd have to be a member of their site anyway and have access to the relevant downloads.

Hmm. Should a plugin be able to list the plugin server or servers where it can be found?

Also, what exactly is the process for plugins requesting updates? I'm sensing it would be a daily process job, where the system goes to all the plugin servers it knows, with whatever credentials it has, and supplies a list of plugins. (Active plugins, all plugins?) The server itself should be doing the work on filtering down plugins, not the client. Though, if the plugin itself indicates a server or servers where it can be found, presumably only those need to be queried?

One last thing. Do we really need to support both .zip and .tar.gz? Gut instinct says no, just zip will cover the bulk of what's actually needed? (even if it does provide a shade of inconvenience for those who use *nix / OS X that write plugins... which is going to be a limited enough group anyway?)
5900
After a couple of days of slacking on the plugin front, here's a pic of the next one. Elsewhere you'll have seen me threaten to make birthdays a plugin. Well, now it is.

So far, I've just removed the birthdays stuff from core and dumped it into a plugin of its own. It's not finished but it should work as expected (not tested birthday emails yet) at least it certainly seems to for the front page.

Note that this isn't its final position, final layout or anything. I'll likely change the look slightly (using a birthday cake icon and putting in the group colour, amongst other things, oh and putting it up above the forum stats block, but that's pending some investigation in to the template skeleton code)

But it is otherwise a conventional plugin now rather than a core feature.

(No, it is not my birthday today or within the next 7 days)
5901
The Pub / [Archive] Re: Logo Madness
« on October 13th, 2011, 05:13 PM »
Nothing. Just that there's the risk of gradually moving towards it.

I like all the ones you posted earlier; but I have no specific preference or bias about any individual one.
5902
Features / Re: New revs
« on October 13th, 2011, 04:51 PM »
Revision: 1105
Author: arantor
Date: 15:51:21, 13 October 2011
Message:
! Allow hooks to indicate a priority value. Hooked functions of equal priority will be assumed to be able to run in any given order without any issue. It defaults to 50, and runs on a scale of 1 to 100, with 100 being the highest priority. While there's nothing to stop authors just forcing everything to 100, the default should be perfectly adequate in the vast majority of cases, except if you know in advance that you have to run something before or after something else. In my case, I need to run birthdays after the calendar, so that birthdays know to hook into the calendar properly in the board index. Is complicated. (Load.php, ManagePlugins.php, plugin-info.rng)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/other/plugin-info.rng
5903
Features / Re: Template skeleton!
« on October 13th, 2011, 04:35 PM »
There's no real hurry, just that it's something that needs to be fixed prior to release.
Quote
Isn't there any other 'realistic' character that gets turned into entities inside posts
The only guaranteed ones are <, > and & - plus apostrophes and quote marks if we leave ENT_QUOTES in (as opposed to ENT_COMPAT)

It is a bit ugly, but I don't really see an alternative, other than leaving everything how it is currently.
5904
Features / Re: Template skeleton!
« on October 13th, 2011, 03:27 PM »
There's something still up with this, even with the latest changes.

So, I want to add a block to the info_center layer, before the statistics (info_center_statistics is the target block I want to insert before)

So, naturally, I'm thinking the call should be:
Code: [Select]
wetem::load('birthdays_info_center', 'info_center_statistics', 'before');

This promptly causes it to get very upset and throw the skeleton error. Oddly it only renders a very limited set of the page (it renders the everything except the <body> tag in the source HTML, so I get the headers, <head> and closing </html>)

More interestingly, I get:
Quote
http://smf/wedge/index.php
 2: Invalid argument supplied for foreach()
 File: C:/Dev/public_html/smf_test/wedge/Sources/Subs-Template.php
Line: 1440
in the error log. Line 1440 is the foreach in wetem::render_recursive that performs the iteration through the skeleton and either calls render_recursive again or execBlock. Logical, I guess, if the template structure is broken and that what it's being fed isn't an array.


You want to debug or want me to do it?
5905
The Pub / Re: English British support
« on October 13th, 2011, 09:36 AM »
Quote from Nao on October 13th, 2011, 07:32 AM
- I meant array_merge of course.
That certainly works for the building of arrays for caching, but += is suitable (with aforementioned caveat) for loading language strings from cache.
Quote
- sounds good. Is it what smf used to update tier changelog number? ;)
No. The change log was updated by hand with more than one commit because a previous committer had forgotten to update it.
5906
Development blog / Re: Plugging in the Plugin Manager
« on October 13th, 2011, 09:35 AM »
I'm sensing it would be its own $modSettings entry maintained by the plugin manager.

Implementation details aside, is it practical and desirable to have these things controlled by the plugin manifest?
5907
Development blog / Re: Plugging in the Plugin Manager
« on October 13th, 2011, 03:02 AM »
I'm also thinking this might be useful for simple plugins to extend the admin search interface. I find it stupid that I have to declare a function just to put one line in it.

e.g.

Code: [Select]
function birthdayAdminSearch(&$settings_search)
{
$settings_search[] = array('ModifyBirthdaySettings', 'area=birthdays');
}

Hmm. It's time for bed, I'll sleep on it and see how I feel about it in the morning as like the above it has to be stored somewhere, you can't just keep hammering the XML on loading the admin (though it's marginally easier on searching because it's not every-single-admin-page the way the main admin areas list is.
5908
Features / Re: New revs
« on October 13th, 2011, 02:13 AM »
Revision: 1104
Author: arantor
Date: 01:13:01, 13 October 2011
Message:
! Removed globalisation of $helptxt variable in the Help language files, and just extended the two places it would actually make a difference in terms of making sure the variable was available. (Help language file, Subs.php, Subs-Template.php)
! Removed birthdays from the core code. Everything of use can either be retrieved from diffs, or I've already copied it over to the plugin. (install.sql, ssi_examples.php, SSI.php, skins/index.css; Sources: Boards, Calendar, Feed, ManageCalendar, ManageMail, ScheduledTasks, Subs-Calendar, Subs-Members, Subs-Template, Welcome; Templates: Calendar, InfoCenter; Languages: EmailTemplates, Help, index, ManageCalendar, ManageMail, ManagePermissions, ManageScheduledTasks)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/Boards.php
Modified : /trunk/Sources/Calendar.php
Modified : /trunk/Sources/Feed.php
Modified : /trunk/Sources/ManageCalendar.php
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Calendar.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Subs-Template.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Sources/Welcome.php
Modified : /trunk/Themes/default/Calendar.template.php
Modified : /trunk/Themes/default/InfoCenter.template.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/Help.french.php
Modified : /trunk/Themes/default/languages/ManageCalendar.english.php
Modified : /trunk/Themes/default/languages/ManageCalendar.french.php
Modified : /trunk/Themes/default/languages/ManageMail.english.php
Modified : /trunk/Themes/default/languages/ManageMail.french.php
Modified : /trunk/Themes/default/languages/ManagePermissions.english.php
Modified : /trunk/Themes/default/languages/ManageScheduledTasks.english.php
Modified : /trunk/Themes/default/languages/ManageScheduledTasks.french.php
Modified : /trunk/Themes/default/languages/index.english.php
Modified : /trunk/Themes/default/languages/index.french.php
Modified : /trunk/Themes/default/skins/index.css
Modified : /trunk/other/install.sql
Modified : /trunk/other/ssi_examples.php
5909
Features / Re: Birthday, calendar, plugin, core [VOTE NOW!]
« on October 13th, 2011, 02:13 AM »
OK, so I tackled that, and have refined the structure into something usable (and cut the code down in various places)

Right now, it's just a case of taking a machete to the core code to strip it of birthdays stuff, so I can put it in to the plugin. (In other news, there's various ways that things need to be extensible in the calendar that currently aren't. There's no reason, for example, why any arbitrary events shouldn't be able to be added to the calendar. I could envisage it in WD for example for ticket deadlines to be embedded into the calendar.)

But if I don't do things as plugins, I can see them sitting there as red-headed stepchildren, and no-one wants that.
Posted: October 13th, 2011, 02:01 AM

Also, please note that the little thing of leaving a cake image in the user's profile if it's their birthday, that probably should stay core for the time being.

I really don't want to add a hook that can cope with that, that would be inappropriate IMO. (Or we can remove it entirely, not fussed, and have something add to the user's profile underneath or similar. Don't really mind.)

Mind you... when I spent a little while looking last night for a suitable cake image, I found the image used in SMF, and I don't think it's actually compliant with the licence for it... it actually says 'free for desktop use', nothing about distributing it. Though I would hope they asked about it.
Posted: October 13th, 2011, 02:05 AM

Hmm. Do I commit this or do I leave it just removed while I work on things? (Using the power of diff to see the code itself, at least what I haven't just copied over to the new plugin. It does have to do other things that the original code doesn't)

That's a sure sign I haven't had enough tea, if I have to ask such philosophical questions.
Posted: October 13th, 2011, 02:07 AM

Meh, committed. If I broke anything (which I don't think I did) it's a revert away. Meantime, I'll crack on with the plugin.
5910
Development blog / Re: Plugging in the Plugin Manager
« on October 13th, 2011, 01:25 AM »
OK, so I've been thinking about this a bit more, having been making the Birthdays plugin.

Now, the performance engineer in me wants to create a file whose purpose is simply to add a new item to the admin area, and a file for handling settings, while the pragmatist in me wants to stick with the one file, accepting the limitations thereof.

I can't help but think I'd avoid this issue by creating structure in the plugin manager itself that made it able to append new items (or entire new sections), as appropriate. I was always reluctant to do it from there, from the position that I'd rather see plugins not be hampered by having to fit into boxes, so to speak, but I'm thinking that for typical plugins (i.e. those who just don't really care where they end up and are content to be 'end of the list') it would be useful.

Thoughts?