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
7741
Off-topic / Re: I am looking for a favour
« on September 18th, 2011, 07:58 PM »
I only recently learned that "ij" is pronounced like the i in "mike".
I always thought the Dutch were crazy enough to have plenty of words they literally pronounced "ijjjj" :P
7742
Features / Re: New revs - Public comments
« on September 18th, 2011, 07:55 PM »
Okay for add-ons... I'd just like to make sure we're not wasting time (CPU cycles) on something that'll never happen.

Well, categories are what I was working on right now...
The URL I chose for now is action=boards;cat=1
I could use action=boards;c=1, though, because some items in Boards.php use 'c' instead.
Anyway that can be renamed easily later...

I'm not sure about index.php?cat=1, though. That would imply, again, extra CPU cycles in the index file.
7743
Features / Re: New revs
« on September 18th, 2011, 07:40 PM »
rev 1008
(15 files, 24kb)

+ Added info center to the Homepage sample, also demonstrating the usage of layer and block manipulation. (Homepage.php, Homepage.template.php)

! Make sure default_action hooks return a callable function, and disable $modSettings['default_index'] in Wireless mode (it's unlikely the admin will write a custom homepage just for Wap2, so their template would like look awful...) (index.php)

! loadBlock('', '', 'add') was being added to the beginning of the layer, rather than the end. Oops. (Subs-Template.php)

* Adding layers to the context layer was forbidden until now. The homepage code made me realize a good reason to allow them, so I did it. However, given the fact that a layer can easily be emulated through manually adding '_above' and '_below' blocks in this case, I'm still not sure whether it's best to allow them. (Subs-Template.php)

- Removed support for the ':side' hint. After some consideration, I think it may be confusing to themers and sidebars should only use the 'sidebar' layer, whatever the situation. Layer hints should represent something that can't be determined by Wedge itself, such as a position in the page. (index.php, Admin.php, Calendar.php, Display.php, Aeva-Gallery.php, MessageIndex.php, Subs-Menu.php, Subs-Template.php, Unread.php, UnreadReplies.php, index.template.php, Warm/skin.xml)

* Indenazi. (Boards.php)
7744
Features / Re: New revs
« on September 18th, 2011, 06:38 PM »
rev 1007
(20 files +5-3, 63kb)

+ For the very first time in a year, we wrote and committed the very same feature on the same day, months after we last discussed implementing it. Fixed the conflicts in index.php, and the default index system now accepts a default value ($modSettings['default_index']) without going through hooks. Set it to the name of a source file ('Homepage' for instance) that you want to be the default homepage, or set it to 'boardX', where X is the number of a board, if you want a default board as your entry point. Added a Homepage file, as an example. (index.php, Homepage.php, Homepage.template.php)

* Renamed boardindex action to boards, and BoardIndexInfoCenter to just InfoCenter -- in case we want to use it elsewhere. Related commenazi, too. (index.php, unit test, detailed-version.php, Boards.php, Collapse.php, Display.php, PrintPage.php, Subs-BoardIndex.php, Subs-Calendar.php, Subs.php, Boards.template.php, InfoCenter.template.php, Wireless.template.php, Xml.template.php, ManagePermissions.english.php)

* JumpTo now uses action=boards for redirecting to category URLs. Added compatibility code for Pretty URLs. (Ajax.php, script.js, Xml.template.php)

! Don't attempt loading a block if its target layer doesn't exist. (Subs-Template.php)

! Reverted a small error in rev 1006. (Settings.php)

* Minor commenazi/spacinazi. (Admin.php, ManageMedia.php, Subs-Template.php, Who.php, SSI.php)

@ Note: I still need to convert all #category links to use action=boards... I could use the opportunity to limit the output to just the category we requested? What do you think?
7745
Features / Re: New revs - Public comments
« on September 18th, 2011, 06:23 PM »
Quote from Arantor on September 18th, 2011, 05:58 PM
Let's say we want to offer page= as an option in the URL, like topic and board. Ae you saying that during the behaviour hook, they should just proceed to make the test and force it to their action if found? Seems a bit ugly to me, though it's the most workable compromise.
I don't know, we can still work it out later. Right now I'd just like to commit my stuff because my copy is broken otherwise ;)

BTW I managed to mix both of our implementations together. Your hook is called first, so it gets priority, and then my own code is implemented. However, my default board code is run before any of the two hooks, so it gets the top priority, but on top of that, the behavior hook now gets to manipulate $action so it can override the default board. Hopefully I managed to find the best logical balance here.
Quote
The fallback action really should be left though, otherwise if an invalid action is specified, you are doomed to go to the board index.
Yup. Don't worry, I kept it in.
Quote
Assuming your default will be applied in both places, I guess that's OK, but it does mean that an add-on actually has to do some work if it actually wants to be the front page, because it has no other way of overriding the admin's choice other than fudging the modSettings value softly, as opposed to setting up a hook.
Well, that was how I was envisioning the idea. Add-ons are great and everything, but we shouldn't consider they're not able to modify any setting in Wedge, because they can, plain and simple ;)

BTW, in reloadSettings() there's some long code related to the hook system... I haven't looked into the rest, but is it needed? Didn't Wedge already load the hook list somewhere else..? Or is it related to some design issue we hadn't seen before?
Quote
(And the same issue about contention applies, only worse because there's more places that add-ons can affect that value rather than centrally)
I don't see how, though. At least as a humble mod author. (Oops, I said "mod"! ::))
7746
Features / Re: New revs - Public comments
« on September 18th, 2011, 05:39 PM »
Thing is. Addons can already override the default action (provided we send $action to them or globalize it), through 'behavior' for instance. They just add their action to the action list and rewrite the action or even manually modify the query string. I'm not sure adding more options would help anyone here.

As for urls the only ones I can think of have #category in them and yes I was planning to fix them in the following commit ;)
7747
Off-topic / Re: I am looking for a favour
« on September 18th, 2011, 05:08 PM »
Or, in the same spirit, dew Gwößte :P
7748
Features / Re: New revs - Public comments
« on September 18th, 2011, 05:06 PM »
Quote from Arantor on September 18th, 2011, 04:42 PM
OK, neither of those changes were supposed to be committed. I have to use 127.0.0.1 instead of localhost to avoid a 1 second lookup on every single page to resolve the domain name in MySQL. Never understood why, just that since using WampServer, that's been the case.
As I suspected.
Quote
As for smf/wedge, that is my boardurl, and when I was messing around trying to debug the above, I set that and forgot to revert it.
But why in other/Settings.php and not your own Settings.php file...?
Quote
The main reason for ucfirst, as far as I can tell, is simply to indicate importance on folders that shouldn't be writable by defaults (notice that avatars and attachments are, but everything else isn't) but I have no reason to leave it as is, it's cool to change it.
I'd really like to change it. Anyone else?
The only issue is really with the Themes folder. But then again we could use the opportunity to rename 'default' to something shorter or just delete it...
Quote
This isn't finished, btw. It's a milestone that I consider practical for committing, as in the first usable version. There's plenty more to do but it is usable for activating add-ons even in its present form, and the bulk of add-ons shouldn't need much more than this anyway.
Okay.

Now for something completely stunning...

HO-LY-FUCK.

Really.

This is what happened to me today.
This morning I was looking at my Wedge.org import running Wedge, and was thinking that I really should get started on converting the homepage. But since I don't want to do any changes to the main codebase (so that I can easily update it later), I decided to go ahead and implement custom homepages. Are you following me.....? :whistle:

I was working on changelogging my new commit when you did yours. I mentioned I couldn't look into it because I was finishing up my feature.
Then I committed.
And it failed.
Oh, I have a conflict in index.php?!

Launching index.php...
OMG.
First line of the conflict, yours:

"      // Some add-ons may want to specify default "front page" behavior. If they do, they will return the name of the function they want to call."

Re-OMG.

This is the first time it happens to us. It happened that we had conflicts because we worked on the same 'generic' file at the same time. But it's the first time we both decide to implement the exact same feature on the exact same day and end up getting a conflict.
Heck, I hadn't thought of the homepage stuff for months...!!

Now to analyze this conflict and try to find if we can find a common ground...
Posted: September 18th, 2011, 04:52 PM

Okay, I'm looking into it...

- I like your version because add-ons can specify where to go by themselves. However, what if two add-ons want to redirect the index..? I'd rather have them add layers/blocks to the index, instead. Also, I have to admit I'm not used to your add-on system yet -- meaning that other SMF admins may not want to look into it, i.e. why should they develop an add-on just to add a homepage to their forum...? I was considering instead posting somewhere a documentation about adding a Homepage.template.php file and doing everything there.

- I like my version (:P) because it allows the admin to specify a board as the default entry point. I renamed all boardindex entries to 'action=boards' to make it sound less like an 'homepage' and more like just what it is -- the board list. Your version doesn't allow a board as an entry point because it's called after the loadBoard function.

- Your version allows to specify a function name in addition to a file name. I simply have a single string for now, allowing to choose your action, ultimately I wanted to simply load the related file and run the function with the same name, as is the case in almost every single action in Wedge.

- I don't understand the difference between default_action and fallback_action. My version actually calls a short extra function, index_action(), which first looks for the value of $modSettings['default_index'], and if the file doesn't exist, it redirects to 'Boards' (i.e. 'BoardIndex').

I'd be tempted to say I like my implementation better, if only because it can ultimately be modified easily by the admin from the admin area, choosing a default board or a file from the available list. However yours seems more streamlined than mine. I'd like to know your opinion on this. Do you want me to send you my file?
7749
Features / Re: New revs - Public comments
« on September 18th, 2011, 04:14 PM »
Wow! You committed much earlier than I expected... :P
I'm right in the middle of finishing some extra features, but I'll keep your diff around and try to look into it ASAP.

Just a quick note I forgot to make before.
I accept that everything's named 'add-on' and not 'mod' or 'plugin', but could we consider using lowercase on top-level folders...?
I never liked the ucfirst style of all folders such as Themes, Sources etc. As you can see, the media folder is just 'media', not 'Media'... To me, it would make sense to have all accessible folders (Themes, Addons, Smileys...) in lowercase, and others (i.e. only accessed through PHP) could retain their original case.
I believe it'd be something unrealistic to apply to Themes, though... But it's still worth debating. All URLs in SMF/Wedge are lowercase, except for these top-level folders.
Posted: September 18th, 2011, 04:10 PM

Okay, just loaded the diff patch and saw a strange thing in other/Settings.php... You replaced localhost with 127.0.0.1 (is it wanted?), and $boardurl with 'smf/wedge'... Any reason for the change, and most importantly, for adding a 'smf' string where there wasn't before...?
7750
Off-topic / Re: I am looking for a favour
« on September 18th, 2011, 04:11 PM »
Lawd? Are you familiar with the French area of Noisen maybe?
People over there used to call me "Gwand Patwon" (I even have a smiley with that name on it!), which could be translated as "Lawd"... :lol: (Well, it's "big boss", but "big boss" doesn't have any r's in it...)
7751
Off-topic / Re: I am looking for a favour
« on September 18th, 2011, 12:23 PM »
We shall have a similar bbc creator in the future, for Pete moved the BBC definitions from Subs.php to the database... (Which makes it harder for me to update them since we don't have an editor yet :P)
7752
Off-topic / Re: Doctor Who
« on September 18th, 2011, 12:02 PM »
Great episode indeed. Love the end too. And another Amy-less Craig doctor next, funny. Last episode will resolve the Utah story thread.

Last year we had the unexpectedly great eps Vincent followed with the great Craig eps. Moffat reused the same formula. The doctor even showed compassion for something he couldn't prevent in both cases. It's like Craig is here to give him back his sanity.
7753
Off-topic / Re: I love Wedge
« on September 18th, 2011, 10:00 AM »
How did you access my personal pictures?!  :wow:
7754
Yeah, I know, it's stupid... Considering less than 3% of the Western world uses it and I have no interest in catering for Chinese and Korean users... (Not that I don't *like* them... But I don't see any reason to bother until someone provides us with Chinese or Korean language files, to begin with.)

I'm not going to bother MUCH longer, but for instance I *had* to deal with IE7 because it still has minimal market share. (> Opera, I have to admit...)
Posted: September 18th, 2011, 12:06 AM

(Although it has to be said we only have country information for IE6... Given that IE7's share is less than IE6's, maybe IE7 is actually used more in Asia just like IE6.... Heck, I guess I should be checking out visitor stats for wedge.org. Excluding Baidu of course.)
7755
Features / Re: New revs
« on September 17th, 2011, 11:59 PM »
rev 1005
(4 files, 12kb)

! Fixed topic page layout for IE6 and IE7 (which don't support display:table, and honestly I don't care much about these browsers.) There are various things that are still broken, such as the mini-menus. Will deal with that later. (index.ie6.css, index.ie7.css)

* Minor tweaks to menu notifications. (index.css)

* Spacinazi. (Subs-Charset.php)