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.
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...?
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...
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?