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
4786
Plugins / Re: Settings page integration
« on February 25th, 2012, 02:33 AM »
I thought the module's code was generally specified in the XML file and there was no extraneous files added (except for complete language files or sub files, but that the main block code was actually directly in the XML) - but that was a long time ago. Glancing through the current ones it doesn't seem like that now - though I think the format of embedding options into the XML sort of defeats the point of using XML a bit...
Quote
but, in the end, language entries got injected into a master file, if you remember.
I didn't remember but it seems to be that way based on the XML files.

So, all in all, it seems like it hasn't confused anyone?
4787
Plugins / Re: Settings page integration
« on February 25th, 2012, 02:05 AM »
How well did it work out for you?

I never did find out how well Dream Portal's plugins stuff did, I was vaguely aware of what one had to do to create such a thing but I never made any, and I remember being something related to amazement at seeing raw PHP embedded into XML,[1] but anything other than that, I don't remember, and I might even be remembering that incorrectly.

(Note that I'm not looking to remove the existing <settings> block which is used for settings defaults and housekeeping, because plugins that don't use this setup because it's too limiting, e.g. WedgeDesk, will still use <settings> to clean up after removal)
 1. Since unless I'm much mistaken, that's eval() right there...
4788
Features / Re: How about PMs being listed in Core Features?
« on February 25th, 2012, 01:41 AM »
Bumping this, now that Core Features is gone.

There are just about enough options to justify PMs having a page of their own now, but I'm not quite sure it needs front page prominence on the admin panel.

Thoughts?
4789
Plugins / Re: Settings page integration
« on February 25th, 2012, 01:01 AM »
While there is an implied performance aspect (since the admin menu has to be evaluated every page of the admin area) it's not a great stretch to actually cache all the active plugins' details and evaluate them in a single hit.
4790
The Pub / Re: Trying something a bit new
« on February 25th, 2012, 12:58 AM »
I like the idea of the regex but I suspect it's going to be a bit much for themers. Heck, regex is beyond most mod authors too.

Regarding @replace, what are the benefits and problems with doing it before parsing and what are the benefits/problems to doing it after?
4791
Plugins / Settings page integration
« on February 25th, 2012, 12:40 AM »
Had a random idea about this today. The plugin info file already lists all the $settings variables that a plugin uses (so that it can set defaults and clean up properly later) but I've been thinking about the interface side of things.

Right now, if a plugin wants to add a settings page, even a simple one, it's going to have to create a file, use at least two hooks[1] and create a stub file that is almost entirely identical from plugin to plugin. Heck, when I start a plugin now that uses a simple settings page, I just copy everything from an earlier one.

So, here's what I'm thinking. Everything that you would normally have to set up for a settings page ($config_vars etc.) can be streamlined. Of course, more complex plugins (of the likes of WedgeDesk) would still do their own thing, but the smaller stuff could be simplified.

For example, I have a stub plugin that will grow into a big scary share-topics-with-services monster, dubbed Flitter because it was originally just Facebook + Twitter. Right now, it's very straightforward however, with its settings page being:

Code: [Select]
$config_vars = array(
array('desc', 'flitter_desc'),
array('select', 'flitter_position', array('topic' => $txt['flitter_position_topic'], 'sidebar' => $txt['flitter_position_sidebar'])),
array('title', 'flitter_fb'),
array('check', 'flitter_showfb'),

array('title', 'flitter_twitter'),
array('check', 'flitter_showtwitter'),
$txt['flitter_twitter_via_desc'],
array('text', 'flitter_twitter_via'),
array('text', 'flitter_twitter_related'),
array('text', 'flitter_twitter_related_desc'),

array('title', 'flitter_google'),
array('check', 'flitter_showgoogle'),
);

Then you have a function which binds to the admin menu, and the rest of the boilerplate in this function that's used for saving and calling the relevant templates and stuff. It gets set up as action=admin;area=flitter and uses 'Flitter' as the title (which is the plugin's title anyway)

I'm thinking we could handle this in the plugin-info.xml file directly instead.

Code: [Select]
<settings-page area="flitter" icon="mgallery.png" bigicon="$plugindir/flitter.png">
<load-language file="Flitter-Admin" />
<desc name="flitter_desc" />
<select name="flitter_position">
<opt value="topic" name="flitter_position_topic" />
<opt value="sidebar" name="flitter_position_sidebar" />
</select>
<title name="flitter_fb" />
<check name="flitter_showfb" />
<title name="flitter_twitter" />
<check name="flitter_showtwitter" />
<literal name="flitter_twitter_via_desc" />
<text name="flitter_twitter_via" />
<text name="flitter_twitter_related" />
<text name="flitter_twitter_related_desc" />
<title name="flitter_google" />
<check name="flitter_showgoogle" />
</settings-page>

Assuming the plugin author uses this, it should be able to handle the menu item, the settings themselves, making them searchable and auto-linking it in the plugins area (minimising the need for using the <acp-url> element though not obsoleting it)

The area= part specifies what admin area it should be, the icon is the icon for the dropdown menu, the bigicon is the big icon to use, <load-language> identifies what language file(s) should be loaded when running the page, so that the relevant strings can be loaded. Everything else just correlates to the above.

Personally, I think it's less effort for the plugin developer generally, it's less they have to deal with - you don't expressly have to deal with hooks when doing this and you're still doing less work than you would doing it manually.

Thoughts?
 1. Three if you want to make it searchable as well, yup, even that isn't automated.
4792
Features / Re: Badges and the displaying thereof
« on February 24th, 2012, 11:08 PM »
....how exactly would you use it?

This is the thing I *need* to understand. I can build anything that's desired, but I need to understand how people will actually, realistically use it because I guarantee you that if I build it how I think you'll use it, it'll be wrong.
4793
The Pub / Re: Trying something a bit new
« on February 24th, 2012, 08:35 PM »
Yeah I see what you mean about not feeling natural.
4794
Other software / Re: Finally, they've made an announcement
« on February 24th, 2012, 08:28 PM »
It sounds to me as though it's formalising what 2.0 did using classes and so on. But I'll wait to see some actual progress first...
4795
The Pub / Re: Trying something a bit new
« on February 24th, 2012, 06:40 PM »
I LIKE IT! That said, I see your point about finding the end div, and I don't think there's a good way to solve that at all, sadly.
4796
Other software / Re: Finally, they've made an announcement
« on February 24th, 2012, 06:37 PM »
MVCS = Model/View/Controller/Storage. Whereas in traditional MVC, the model handles all the database stuff, and is very, very chunky as a result (many many files) as well as not exactly lending itself to DB abstraction, they're splitting the model in two. The model still deals with the logic attached but pushes all the queries themselves out to another component. It's likely to make for a less monolithic structure than MVC traditionally creates.

It's more meaningful than 'Agile' tends to be.
4797
The Pub / Re: Trying something a bit new
« on February 24th, 2012, 05:40 PM »
Quote
Okay, I hope you won't mind too much but I've fixed some things that needed fixing in the skeletons, so it's possible that you'll need to fix them too in Wintage... At worst, you'll just need to copy some of the stuff from the Wine/skin.xml file.
*nods* Well... I did spend some time last night poking at it and trying to break stuff, and more than once I wondered idly if I was doing it wrong or not - no matter what I did, it seemed like I could only have the sidebar on the right, or on the left above the content (because it wasn't floating correctly) but that in hindsight could just as easily have been me doing it wrong heh - yesterday was a very strange day for me in a lot of ways, nothing really made perfect sense...

Though looking at the latest rev, seems that it might have been more than just me that was intrigued by it.
Quote
Ah, yes... I think I added that one as a quick hack to make it 'work' because the padding wasn't very good for this particular occurrence.
Well, I might switch it out for a class, that way the theme can control it how they see fit.
Quote
But technically speaking, it might also break other design possibilities. (For instance, breaking up a large div into several horizontal divs certainly makes it impossible to put a gradient on the first div and expect it to continue flawlessly in the following ones. Unless you set the parent div's position to relative and the children to absolute, and set a large height for the first child... Uh.)
This is the problem, ultimately, with skins vs themes; sometimes the theme code just doesn't allow for a given combination of styling - so you end up having to have alternative markup available.
Quote
The first Noisen theme (back when it was running SMF 1.1) was based on Babylon. I still like it a lot.
Babylon is still well designed. It's just not quite what I want from a theme, and I find the smoother gradients in Core make it more palatable for me personally.
Quote
Well, it certainly would be feasable... Could even have an admin setting to determine whether you want 'correct' indenting (i.e. based on skeleton tabs), or bandwidth/CPU-saving indenting (i.e. nothing done), or bandwidth-saving indenting (i.e. removing all indents at run time, including the hard-coded ones.)
I'm sensing a touch of overkill here - most admins don't actually care whether it's correct or not. Plugins almost certainly won't be correct anyway.

The other thing is, does it make a difference in gzip size? I know that sometimes you can end up saving far less than you thought by not removing things like spaces.
4798
Other software / Re: Finally, they've made an announcement
« on February 24th, 2012, 05:19 PM »
Interesting. Depending on how much other stuff they've done as far as security tokens, or not as the case may be, it might be a few minutes' work to have implemented that, but the tokens stuff if done properly would make that a little harder.

I'm curious to know exactly what they mean by tokens, though. I remember SleePy vaguely (and it was vaguely) telling me about something he had an idea about, but I have no idea exactly what's been done.
4799
Other software / Finally, they've made an announcement
« on February 24th, 2012, 05:05 PM »
http://www.simplemachines.org/community/index.php?topic=469381.0

I'm disappointed it's taken this long to actually get some kind of announcement about SMF's future - it's been about 8 months since 2.0's gold release, and it sounds like 2.1 isn't making great strides, but it's making *something*, which is a good thing.

I'm not clear on exactly what they mean by the security tokens stuff, and by 'mod/admin sessions' (especially considering what's in SMF already) but the other stuff seems fairly run of the mill for 2.1 itself.

The announcement of 3.0 / smCore is nothing surprising, it's been talked about many times over the years but little has thus far come of it - but you never know. Going for the MVCS approach isn't a bad one (it's cleaner in most cases than MVC itself usually produces) either.

Intriguing but it feels a bit like 'we're not dead yet, honest' to me :(
4800
The Pub / Re: Trying something a bit new
« on February 24th, 2012, 04:12 PM »
Quote
Really...? Is that something in Wedge you mean? Where?
For the info centre, InfoCenter.template.php. Under the <we:title> is a div with an explicit 8px height.

For the thoughts, I believe it's index.template.php, but there's a div explicitly setting sizes there too.
Quote
Everything is doable in CSS...
Not everything. The specific case I have in mind seems to be one of those.

<div id="wedge".
  <div id="somestuff">
  </div>
  <div id="someotherstuff">
  </div>

  ... more markup

</div>

Now put a single border around those items, with a 1px padding between the border and the content, and leave the content such that you can still put borders on the content that butt up against the 1px padding+border (e.g. the someotherstuff div has a gradient but a 1px darker border on it)

i.e. replicating the Core layout.
Quote
Speaking about the skin system...
I was thinking about something a bit funny and idiotic. And very certainly too late in the process.
Certainly late, but interesting idea. Personally, though, I'd rather strip the indentation instead of outputting it - simply because it should save a bit of bandwidth, no?