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
6991
Plugins / Re: Crazy idea
« on November 26th, 2011, 08:45 AM »
Hmm I don't know. I personally wouldn't use that.
6992
Features / Re: Template skeleton!
« on November 26th, 2011, 12:19 AM »
An auto-loader..?

Anyway, that's not gonna solve the 'semantics' of a Class-Template file at any rate ;)
6993
Features / Re: Extending the postbit/poster info
« on November 25th, 2011, 11:06 PM »
But those you mention are similar between them ;)
6994
Features / Re: Template skeleton!
« on November 25th, 2011, 10:12 PM »
Quote from Arantor on November 25th, 2011, 01:08 PM
:/ I don't have much to say on anything other than the following. I think it doesn't help that both of us (my partner and me) are both under the weather today, feeling rubbish and ill.
Ah, my girlfriend too... :^^;:
Quote
We are demonstrating that the way things are is not ideal and that there is an alternative.
Well, we didn't need to 'demonstrate' that things were not ideal. But people don't generally expect free software to live up to commercial software. It takes crazy people like us, or Unknown back in the day, to do just that ;)
Quote
You haven't misunderstood anything. If you're curious about how others view what is fundamentally the same concept, look up Maslow's Hierarchy of Needs. It describes virtually the same thing, but from an economist's point of view.
I'll take note of that.
Quote
Once people have enough money to make sure their basic needs are met, they're generally pretty good but once their higher, not-necessarily-financial needs are met, they're even happier. I know I turned down a promotion at my former career once because while it would have made me more money, it would have meant longer hours and more stress.
I turned down so many things because of that, I understand perfectly... Well, actually I wouldn't be working on Wedge today if I hadn't suddenly started turning down *everything* back in September 2006. It felt like a dull life always working for other people to make money off my stuff... Even if I did make a decent share, too. Anyway...
Quote
Not quite the same thing. Making the sidebar look good horizontally isn't the same challenge. I'm talking about having the sidebar stuff be moved wholesale out of the sidebar and into the default layer.
And again, I'm positive that showing a sidebar block inside the default layer can work if done properly.
Quote
Or, and this is why I asked for a return value in the method that adds a block in, the plugin can attempt to add to the sidebar, and if that fails, it can do something else.
Well, it makes sense... wetem actually had this, but I realized when looking through my code that I'd 'stopped' doing it at some point, so the wetem::op() stuff was actually returning a value to no use, because it's a private method and the public methods that called it didn't return its value in turn.

Okay, so I removed my new code for comma-separated strings, if only because the whole thing was only used ONCE, after checking thoroughly (it's in Profile.php). The code was this, at the beginning of find():

Code: [Select]
// Turn 'sidebar,top,' into array('sidebar', 'top', '')
if (!is_array($targets))
$targets = explode(',', $targets);

Nothing big, really... But in the end, I felt a bit uncomfortable doing an unneeded explode() on every single wetem method call.
Quote
Class-SFTP and Class-FTP could be called from different points in the code, but Class-CSS can't (it's invoked early on, no?)
It's only invoked when Wedge actually needs to cache a CSS file. Otherwise it's not run at all, that is, 99% of the time...
6995
Features / Re: Extending the postbit/poster info
« on November 25th, 2011, 10:04 PM »
Apart from that, I'm really, really interested in having a common layout for all places in Wedge where we show posts (including PMs)... I thought we could have the best of both worlds... :P
6996
Features / Re: New revs
« on November 25th, 2011, 10:02 PM »
rev 1178
(3 files, 2kb)

! The wetem rewrite forgot to pass the result of wetem::op() onto the caller. (Subs-Template.php)

+ Also added a return value for most other wetem methods that users might wanna check. (Subs-Template.php)

! wetem::insert_layer() was testing for 'parent', instead of 'outer'. (Subs-Template.php)

! Fixed bad line heights for smalltext and normaltext CSS classes. (index.css)

* Commenazi. (Warm/skin.xml)

@ Should we bother testing for insert_layer and remove_layer return values in wetem::layer()..? I think that's the only place where we got missing return values, but OTOH it's very unlikely the functions will return false at this point...
6997
Features / Re: Extending the postbit/poster info
« on November 25th, 2011, 08:09 PM »
But it's harder to customize this way.
6998
Features / Re: Extending the postbit/poster info
« on November 25th, 2011, 07:31 PM »
Well, yes I suppose we could introduce mini-skeletons for repetitive items like posts and userboxes but good bye performance. Or we'd have to write a mini rendering system for them as well.
Posted: November 25th, 2011, 07:28 PM

It would be doable I suppose if we did it only for posts. Then in this mini skeleton we add the userbox blocks. At rendering time we provide the contents for each block and they're shown depending on the context. Eg we hide the user box if in the profile area.
6999
Features / Re: Template skeleton!
« on November 25th, 2011, 12:36 PM »
Quote from Arantor on November 25th, 2011, 01:59 AM
I haven't had chance to try it but it's certainly something that needs investigation. You know, you could always try writing a plugin :whistle:
I don't know, I would first like to hone my skills on OOP... I have a feeling that I need to fully grasp the meaning of cooperation between different elements of a program, before I even consider doing a plugin. Aeva Media was kind of a hard task to manage -- not because of the technicalities of a SMF add-on (Dragooon managed most of it really), but because it required thinking in two ways: the SMF way of doing things, and my way of doing things. With Wedge, the problem is no longer there because I'm doing things my way (and they're close enough to your way that we don't often get dragged into endless discussions about whether something should be done this or that way), but I need to have a feel of how to *allow* others to plug into my mind and my way of doing things -- and I think it's necessary for me to broaden my technique for that.

On a very, very slightly related topic, but it's something I wanted to discuss anyway and I couldn't bother to open a new topic... I finally watched Atlas Shrugged this morning. The movie. I had an interest in Ayn Rand's works because I'm very much interested in null-A logic, which has arguably (and thankfully) nothing to do with objectivism, but she was into null-A as well, so I thought maybe she had something interesting to say. I was not utterly convinced by The Fountainhead, as I found the main character to be mostly selfish and actually too far removed from the contributions to society that he's supposed to be making -- I'm not sure that ambition plays a huge role in your life after you're past your 20/30's. I know it's not in my book right now. But I still liked the idea of a philosophy of doing your own thing and not letting others get in the way. However, with Atlas Shrugged, I think I've finally understood what it's all about... It's an American thing.
From what I understand, Republicans and Democrats are not exactly the same as Right and Left wings in Europe. It's mostly a federal thing, so Republicans have 'laissez-faire', and Democrats represent the government as a means to control wealth in the US, in a way that could lead them to be accused of communism, or as they like to say, socialism. Atlas Shrugged, at least the movie, shows this in a way that reminded me of the current economy crisis in Europe: the wealthier European states, like France and Germany, don't want to 'chip in' for Greece. So, in that respect, we actually have a European leadership that chose the 'Democrat' way of doing things, while the people wants 'laissez-faire'. There's a similar trend in Belgium where the Flemish half of the country doesn't want to pay for the failing economy of the French speaking part -- even though a century ago, the French speaking Belgians were doing the exact same thing for their weak Flemish neighbors.
All in all -- I have a feeling that this is what it's about: when you ask someone to help someone else who's been less lucky, are you being charitable or selfish? It's interesting that in the movie, the 'good guys' are the ones who, as they clearly say themselves, 'are only interested in making money'. I'm not falling for that. The Reardon guy is clearly a geek who only has interest in success and discovery, not in getting paid for that. Now it'd be interesting to see how much that applies to financial institutions... They don't really create things, they only bet on other people's success or failure. That's not innovation to me. I'm not exactly sure why I should be supporting them...

Well, just wanna say that I'm not falling for either side of the issue, but at least I have a better understanding of the divide between Americans (and, let's say it, Europeans now.)

And on my current matters: what are we demonstrating by doing what we're doing? We're not doing it for money, we're not doing it for glory... We're doing it because we feel it has to be done. Because we want to innovate in our field. How would we react if we ended up making Wedge a huge success, and someone demanded of us that we be 'fair' to the competition or something? I don't know, because I think I'm being fair right now -- I'm certainly not trying to make money off anyone, or take market shares, or anything like that.

I think that's it... I think that innovation is not systematically something that should be monetized for the sake of being monetized. What one wants is to keep living doing something that makes them happy. This requires money, so often the two gets mixed together, but it doesn't have to. I think that's probably one of the big flaws in objectivism as I'm seeing it. Unless, of course, I totally misunderstood the concept... :^^;:
Quote
*nods* This is also why I'm slack about updating my plugins until things settle down. I still, as it happens, have one plugin that uses loadBlock() from before wetem even existed.
Could be worse... Could be loadSubTemplate() :P
Quote
That's workable. The thing is, whenever doing anything like this, two sets of circumstances need to be borne in mind: firstly, how Wedge itself uses these, and secondly how plugins and themes will use it (but mostly plugins).
Wedge doesn't use it that much. I think there are only a couple of places where multiple target layers are provided (probably when it comes to the menus, which are added to the 'top' layer?). Still, it makes sense to allow plugin authors to make sure their data is shown. I'll give you a quick example: let's say I want to show data in the sidebar at all times. However, Wedge doesn't guarantee me that I'll be able to access the sidebar at all times (another plugin may want to delete it to make room for something else), so I may want to give up on most data I'm showing, but if there's something particularly critical to show, I could just as well create my own layer inside the footer or something, NOT fill it with anything, and only provide it as a fallback for my critical data. Wedge won't budge if it doesn't find any code associated to layers you create. (Just check out Warm's recent indenazi changes -- I added a fake <indent> layer to cancel any indentation changes made by its parent layer. I think it's pretty neat.)

That's one thing among others...
Of course, we could also do it differently, like, instead of providing 'sidebar,fallback', the plugin author could use '!sidebar' or something, where the '!' would be seen by Wedge as a sign that the layer needs to be created if it's not there. It would force me to record all traces of previously deleted layers, though, but it's doable.
Quote
Wedge's use is almost entirely just dropping complete lists of templates into layers, but plugins may well want to insert individual things into layers, may want fallbacks, may want to do other things. To be honest, if I'm looking to insert into the sidebar and falling back to the default layer, I really won't want to do it like that, because the styling will be all wrong.
I'm not sure about that. You could very well prepare for this particular case by adding some CSS to adapt the styling for your data inside the fallback layer.
Quote
Consider any of the sidebar blocks that we have currently. Would they look right, style-wise, if simply dropped into the default layer? A few might get away with it but generally it'll look bad.
I still have plans to make the sidebar look good horizontally... :P I need to turn the blocks into inline-blocks for that.
Quote
Yeah, it's something to bear in mind. However, while there is little connection, it's going to be called together and used together ultimately, so there's little point in splitting it.
The main point is having all important objects into their own file, for easing editing. Some class files are only called from within one point in the source code (such as Class-CSS or Class-SFTP), so we might argue that they should be stored in the same file... (Well, they're not ALWAYS loaded though, so it's best to keep them apart, sorry for the poor analogy.)
7000
Features / Re: Template skeleton!
« on November 25th, 2011, 01:16 AM »
Bump, again....... :whistle:

Been holding myself from committing the changes mentioned in the last paragraphs because I'm not sure we want that.
7001
Features / Re: New revs
« on November 24th, 2011, 08:37 PM »
rev 1177
(4 files, 4kb)

+ Added proper retrieval of current thought (through Ajax) when editing a thought that has BBCode in it. (Ajax.php, script.js)

* Optimized getXMLDocument and sendXMLDocument for size. But it won't compensate for the few bytes added by the above... (script.js)

- The stats don't make use of oXmlRequestHandle. (stats.js)

! The auto-suggest does, though. Althought I'm not sure it works at this point, or is even needed, considering we're using jQuery and all that. (suggest.js)
7002
Features / Re: New revs
« on November 24th, 2011, 04:09 PM »
rev 1176
(12 files +1-1, 18kb)

! Overhauled the readme_*.html and ssi_examples.php files to actually look good instead of broken. Also updated Wedge logo to the latest... Until the next one, of course. (readme_*.html, wedgelogo.png)

- Removed the middletext class. The difference in size between normaltext and smalltext is already negligible enough, and it was barely used anyway... (install.php, readme_*.html, ssi_examples.php, upgrade.php, Display.template.php, index.css)

- Removed more unused CSS IDs (#postbuttons and a remaining #ic_recentposts). (sections.css)
7003
Features / Re: Template skeleton!
« on November 24th, 2011, 03:22 PM »
Quote from Arantor on November 24th, 2011, 02:10 PM
Didn't try it, because the whole point was to add a layer dynamically after the rest of the stuff had been created. To me, having a caveat that says 'you can only create new layers before resetting the default layer contents' is a bit banal.
Yeah, sure...
I'll take some time to look into this. Maybe it's "fixed" in the new code already, I don't know... (I mean, I found and fixed a bug with 'load(before)'.)
Quote
That's partly why I'm enthusiastic about building plugins, so that there are 'best practice' examples to work with. Besides, it does seem more logical to have add as a separate method because it does define what it's doing.
Yep... I think we discussed it in the early days of wetem, but I forgot to think further about it...
Quote
(I don't really mind updating my plugins. It's the curse of writing plugins this early, really.)
And besides, it's not going to be as annoying as my own work on the rewrite itself... Believe me, I had to double-check the entire friggin' code at least 10 times today... :^^;:
Too bad I deleted my test suite for wetem. I had to write a new one from scratch, and because it's annoying, I barely tested half the use cases I had before... Meh, it should work. And if it doesn't... It's an alpha anyway :P
Quote
Quote
Well, it's easy to understand when one of the params is an array, but if it's not, it could lead to misunderstandings... Was it wetem::add('side', 'sidebar') or wetem::add('sidebar', 'side') already?
Yeah...
I was thinking, the only reason we need an array for layer lists is to provide for fallbacks... Why not do an explode(',', $target) in ::load()? That way, we can provide 'sidebar,top,default' or even 'sidebar,top,' (empty last string) for the target...

Also, was thinking at this point we may wanna split wetem into its own class file... It's 22KB. Splitting it into another file, however, adds about 5ms of processing time on my local server, even if it's just that -- the process of taking one file and splitting it in two, and including both files from within Subs.php. There aren't a lot of connections between Subs-Template and Class-Template (or whatever we'd call it), just a few here and there, so it might be justified.

:edit: Hey! We both have 7777 posts each... LUCKY! :P
7004
Features / Re: New revs
« on November 24th, 2011, 03:15 PM »
rev 1175
(19 files, 19kb -- mostly in Subs-Template)

* An extensive rewrite of the wetem object adds support for static methods that were previously only in welay (now renamed to wetemItem), hopefully providing an easier to remember syntax. replace() is renamed to load(), erase() to replace(), find_parent() to parent(), wrap() to outer(), append/prepend() are back to add() and first(). Mostly because jQuery doesn't dictate our naming conventions, although I suppose we can add aliases. (Subs-Template.php)

* Updated Wedge codebase to use the new wetem methods. (index.php, Admin.php, Boards.php, Display.php, ManageAttachments.php, Aeva-Gallery.php, ManageMedia.php, ManageMedia3.php, MessageIndex.php, PersonalMessage.php, Post.php, Profile.php, Subs-Menu.php, Unread.php, UnreadReplies.php, Welcome.php, SSI.php, Warm/skin.xml)

! wetem::before (and its equivalent earlier incarnation) would actually act like ::after. (Subs-Template.php)
7005
Features / Re: Template skeleton!
« on November 24th, 2011, 08:01 AM »
Bump! For previous page.