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
10066
Off-topic / Re: The reality of code for us [Rant]
« on November 12th, 2010, 10:10 AM »
Are you free starting Monday? :P
10067
Off-topic / Re: PHP 5.3
« on November 12th, 2010, 10:09 AM »
Never used goto in Javascript... It's also frowned upon in Pascal, so I scarcely, if ever, used it in Delphi.
However, it seems like a safe enough statement given that it doesn't work outside of the current function's flow. Meaning that it's only to be used as a way to easily exit the current code block without having to add temp vars or conditional blocks or whatever.
As such, Wedge is 5.0+ so we won't be using that anyway, but it's nice to know that there's at least an alternative to temp vars, even if not very elegant.
10068
Features / Re: Scheduled tasks interface
« on November 12th, 2010, 08:32 AM »
Seriously, who would use "drawers" to discuss mods ;)
No, I think we should just use "mods" everywhere, including where "packages" is being used. Nobody cares about the container.

This is really where the issue is: there's already a name for these. Mods. "Packages" is barely used, and confusing. If you choose "Drawers", or "Cogs", or anything silly or not, newbies are still not going to understand it, just like "packages" is hard to understand... While "Modifications" is a bit easier, and "plugins/extensions/add-ons" DEFINITELY is easy to understand. That's what matters. Remember one of our mottos: if it needs explaining, then it's not good ;) (Interestingly, the iPod Touch comes without a proper manual... I was quite surprised with that. But it's really efficient, most of the time.)
Posted: November 12th, 2010, 08:22 AM

Maybe we could do this:
- We change the whole terminology to "Extensions" or "Addons".
- We then use two sub-genres.
- Some extensions will be called "modifications" or "mods". They're the addons that use a xml file to modify the Wedge code. No warranty is given as to what happens when you upgrade, and in case of conflicts. "It may work, but good luck".
- Other extensions, those without the xml modifications, will be called "plugins", will be showed as such in the admin, and will be properly supported by Wedge. We will encourage modders to release plugins.
10069
Off-topic / Re: The reality of code for us [Rant]
« on November 12th, 2010, 08:12 AM »
You forgot the comma after the final ")".
10070
Plugins / Re: Plugin hooks
« on November 12th, 2010, 08:02 AM »
Quote from live627 on November 12th, 2010, 12:00 AM
Quote from Nao/Gilles on November 11th, 2010, 09:42 PM
Also, rename $context to $cx or something, to make it faster to type?
I'd recommend against it and leave it as a full word so as to be less confusing.
Well, we'll probably be renaming other vars, so...
Like, $smcFunc. What does SMC mean? Most people don't know. (And I don't even remember, myself.)
$wedgeFunc is too long and $weFunc may sound like "we fuck", so... $wf?
Might as well use $cx and $wf. And then document the change somewhere.
10071
Features / Re: Scheduled tasks interface
« on November 11th, 2010, 09:48 PM »
Quote from spuds on October 31st, 2010, 01:36 AM
Yeah ... probably not the best example of the various find waldo problems with that interface, I'm sure its programatically sequenced but often non intuitive, non natural (wrt other programs) for end users ....
I think if one wants to be intuitive for end users, one would have to start renaming the "package" stuff...
We have "modifications" and "packages". Basically, one is contained within the other or something, but really, some people say "plugin", others say "extensions", others say "add-ons", but SMF chose to say "packages" which is probably not as intuitive as the rest... They should stick to 'mods' entirely or choose something else!

+1 to rip out the installed packages list. I never understood it, myself.
10072
Plugins / Re: Plugin hooks
« on November 11th, 2010, 09:42 PM »
Quote from Arantor on November 10th, 2010, 10:55 PM
SMF's integration hooks were mostly useless up until 2.0 RC4 wherein they were upgraded to support multiple functions being called at the same point in the execution.
I'm thinking we could be doing things even better...
For instance, create a global local array (if I may say), something like $local_array, which we'd global everytime we write a function that offers hooks.
Now, instead of adding a hook point and specifying the vars that can be shared with it, we'd just add a hook point -- period. Hooks would then automatically be able to access the local array where we put all of the code. ($local_array['this_variable'] for instance.)
At the beginning of the original function, we could add $this_variable = &$local_array['this_variable'] or something. Then we can change $this_variable, and the hook function would still be able to access $this_variable without needing to determine which local vars we'll pass through the hook.

Aaaaand, once again, I'm totally obscure and probably offering to do something that would complicate everything needlessly. :P

Still, most of the SMF calls to call_integration_hook provide only a variable or two, AND they often 'forget' to provide a reference to the variable, instead of a copy of the variable. It not only makes it a bit longer to process -- but it also prevents the mod from tampering with the variable at all. Which can be counter-productive.
Quote
We're keeping most of the existing hooks and adding a lot more of them generally, and combined with SMF's general structure of keeping the current running state in $context (while we'd like to phase that out, doing so is less than trivial),
Yeah, $context could be a place to store most of these vars. We could also delete the vars after they become useless, but I don't know, maybe it'd be a waste of time.
Also, rename $context to $cx or something, to make it faster to type?
Quote
So yeah, we're not getting rid of them, we're jugging a few around and adding plenty more.
And we should/would/will try to be open about hook addition requests. Like, "if you add a hook here, I could do this or that without modding the code". If it seems like something that would benefit more mods, then it'll definitely warrant a mod.

Seriously, I think there are many places that should never have been moddable in the first place -- like, adding menu entries. It should be done exclusively via hooks. We just need to educate modders about it.

PS: maybe this conversation should be split into the private area.
10073
Off-topic / Re: The reality of code for us [Rant]
« on November 11th, 2010, 09:24 PM »
Yeah I know, just I was typing that through my iPod so I made it quick :P Stupid keyboard... (Although I found the way to type in English, phew.)

array(10))

I believe this (in your code) says "only album #10"... You can replace it with an empty array and add, just after it, a SQL clause for eliminating certain boards.

array(), 'a.id_album NOT IN (1,2,3)')

Untested, but should work.
10074
Off-topic / Re: This is how I feel about IE
« on November 11th, 2010, 06:53 PM »
It's the rounded corners topic really ;)
10075
Off-topic / Re: This is how I feel about IE
« on November 11th, 2010, 05:45 PM »
I already made an anti-Ie topic here :P
10076
Off-topic / Re: COD Black Ops
« on November 10th, 2010, 09:27 PM »
Quote from DirtRider on November 10th, 2010, 08:23 PM
:whistle: :whistle: I think I wasted my money on this one that is for sure.
Should have bought DeathSpank instead, man! :P
Best game I've played in months on the PC... (Probably best since Tales of Monkey Island... Ah ah.)
10077
Off-topic / Re: The reality of code for us [Rant]
« on November 10th, 2010, 08:28 PM »
Yes it can be done ;)
10078
Features / Re: New revs
« on November 10th, 2010, 08:25 PM »
rev 251

! $modSettings['pretty_enable'] didn't actually exist, so it screwed up a lot of Pretty URLs code... (ManageBoards.php, QueryString.php, ManageBoards.template.php)
! Fixed some styling. (ManageServer.php, ManageSettings.php, index.css)
! Foolishly trying to make all browsers like each other when showing popups. Sob. (script.js)
+ Added placeholder about a "Wedge license"... Need to setup an URL and actually put something there. (script.js)
10079
Off-topic / Re: The reality of code for us [Rant]
« on November 10th, 2010, 04:26 PM »
And I'm sorry about that, I just don't read posts much these days.

Code: [Select]
global $sourcedir;
loadLanguage('Aeva');
@include_once($sourcedir . '/Aeva-Subs.php');
echo aeva_listItems(aeva_getMediaItems(0, 16, 'RAND()', true, array(10)), true, 'center', 0);

(That would be the better version.)
10080
Features / Re: New revs
« on November 10th, 2010, 04:01 PM »
Was unrelated until now, but since this will probably all find its way into Wedge... Here's the Aeva Media latest rev changelog, eheh :)

rev 11

+ Added transparency flag to pictures, and functions to determine transparency. (db_aeva.php, Aeva-Gallery.php, Aeva-Gallery2.php, Aeva-Subs.php, Aeva.template.php)
* Changed album page layout to show only thumbnails and titles, and hide the rest, which will instead appear in a popup when you hover over the thumbnail or title. (Aeva-Subs.php, am.css)
* Instead of just kilobytes, show filesize in bytes, kilobytes or megabytes in item pages. (Aeva-Gallery.php, Aeva.template.php)
+ Added a function to hide/show popups in IE6. (Aeva-Subs.php, am.js)
! Fixed error when deleting a comment. (Aeva-Gallery.php)
! Fixed animated GIFs shown at incorrect sizes when using ImageMagick. (Aeva-Media.php)