Wedge

Public area => The Pub => Plugins => Topic started by: live627 on November 10th, 2010, 10:51 PM

Title: Plugin hooks
Post by: live627 on November 10th, 2010, 10:51 PM
And what about the integration hooks SMF has?
Title: Re: Plugin hooks
Post by: 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.

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), means that you can manipulate an awful lot of things whilst running in the hooks without having to do any editing of the code itself.

So yeah, we're not getting rid of them, we're jugging a few around and adding plenty more.
Title: Re: Plugin hooks
Post by: Nao 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.
Title: Re: Plugin hooks
Post by: Arantor on November 11th, 2010, 11:31 PM
Quote
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.
That's called $context :P
Quote
Aaaaand, once again, I'm totally obscure and probably offering to do something that would complicate everything needlessly.
It's an interesting idea but not entirely practical, mostly because there's already $context, and partly because hooks are there for a specific purpose, not just a convenient place in time; the actions hook for example is there specifically to be used with modifying the list of actions.

Anything already in $context, $settings, $options, $modSettings etc is already available if the hook wants it, it's only really if the hook needs to send something through to the hooked function that's not a global scope, e.g. the list of actions, or if calling the new-topic one, the details for the new topic and so on.

Really, pushing things to a 'global local' function is bad juju because really one thing I want to do is empty some stuff out of $context rather than fill it up more.
Quote
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?
Faster, yes, more likely to collide with new local (temporary) variables but no real issue either way. Pruning only helps with saving memory in low memory configurations; it isn't an issue normally.
Quote
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.
Sure :) Though a fair amount will be anticipation as well, I have a litany of mods in mind that I'm constantly thinking... "how can I make that work without editing the code?" That's really my baseline when I'm thinking of the changes to make.
Quote
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.
Yes on both counts.
Quote
PS: maybe this conversation should be split into the private area.
I'm actually fine with it here, because I want to not only explain why things won't work but also the rationale behind the level of changes we're doing and the real benefits of hooks - while I'm actively going to be encouraging hooks, I want people to understand not only the 'how' but the 'why' as well. Remember, those modders who migrate from SMF are going to initially want to reuse what they've done before, and while I'm not planning on pruning the package manager that far, I really don't want to encourage them to continue bad habits. I want them to learn new ones, better ones, ones that will help them grow as developers, knowing as I do that most mod writers are not professional grade programmers.
Title: Re: Plugin hooks
Post by: 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.
Title: Re: Plugin hooks
Post by: Nao 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.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 08:58 AM
SMC = Simple Machines Core, for things that wouldn't necessarily be strictly forum based but usable in other SM apps; it was in the mists of time actually $smfFunc.

There are other things we can do at this point, more on that elsewhere.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 10:16 AM
Quote from Arantor on November 12th, 2010, 08:58 AM
SMC = Simple Machines Core, for things that wouldn't necessarily be strictly forum based but usable in other SM apps; it was in the mists of time actually $smfFunc.
Back in Beta 2, I think.
Quote
There are other things we can do at this point, more on that elsewhere.
First of all we should really consider renaming global variables...
Shortening them is a solution. $wf, $cx, $opt, $set, $mset or something.

BTW I never understood why $modSettings is named as such... I mean, it's certainly not reserved to mods! It's a bit disturbing, even for a veteran like me.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 10:20 AM
Well, I'd love to get stuff out of the global scope generally, there's really not a need for some of the stuff to pollute global scope the way it does.

$modSettings is for modifiable settings, it contains the contents of the admin panel's options that are forum wide (as opposed to $settings which is theme wide and $options which is user-centric) that are modifiable through the admin panel without editing any files, and is the general home of modification settings too.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 10:31 AM
Quote from Arantor on November 11th, 2010, 11:31 PM
It's an interesting idea but not entirely practical,
Yeah, probably isn't, but I just wanted to discuss that.
Quote
mostly because there's already $context, and partly because hooks are there for a specific purpose, not just a convenient place in time; the actions hook for example is there specifically to be used with modifying the list of actions.
But, see, what if the modder wants to do something in that place, but unrelated to the list of actions?

...

...Granted, it's VERY unlikely they would want to. They'll probably even struggle to use the correct hook in itself, uh.
I think modders can start using hooks, as long as we provide them with a dummy mod that would show the correct ways of doing things. (Or some prominent mods start using hooks and they look into their code.)

And as I said earlier, we really should rename the hook functions, too. Right now, it's a bit too long. Do you remember the exact function to call? Yes you do, but how about everyone else?
add_hook('hook_name', 'my_function') would be better, for instance. Or wedge_add_hook().
Even just adding an alias or something...
Quote
Really, pushing things to a 'global local' function is bad juju because really one thing I want to do is empty some stuff out of $context rather than fill it up more.
Yeah, beginning with $context['user']...
Quote
Faster, yes, more likely to collide with new local (temporary) variables but no real issue either way.
This is the kind of change that would be added to the list for modders and themers to look into, so it wouldn't be a problem, they'd just need to do a mass rename and make sure they're not already using $cx somewhere...
Just an idea though, not something I believe in religiously.
Quote
Sure :) Though a fair amount will be anticipation as well,
I'm not much of a fan of anticipation, not because it's extra work for us, but more likely because if we start adding hooks in useless places, like at the beginning of every single function, it will waste CPU time for everyone, possibly for nothing.
Quote
I have a litany of mods in mind that I'm constantly thinking... "how can I make that work without editing the code?" That's really my baseline when I'm thinking of the changes to make.
And that's commendable!
Quote
I'm actually fine with it here, because
...it shows people how we come up with dozens of new ideas every minute, fail miserably at most of them and think of new ideas to build on the failed ones :P
Quote
I want to not only explain why things won't work but also the rationale behind the level of changes we're doing and the real benefits of hooks - while I'm actively going to be encouraging hooks, I want people to understand not only the 'how' but the 'why' as well. Remember, those modders who migrate from SMF are going to initially want to reuse what they've done before,
Maybe for the most important mods, if there are any, we could offer the modder to convert their mods for them. (Uh, well, what do you know, I did exactly that to get SMF2 versions of most of the mods I'm using on Noisen :P)
Quote
and while I'm not planning on pruning the package manager that far, I really don't want to encourage them to continue bad habits.
I think a good policy would be to add a warning when installing a package. In red. "This addon makes modifications to the Wedge files. Please note that if you ever upgrade Wedge, the add-on will stop working. Also, it may get into conflicts with other modification-type addons. Please consider using a plugin-type addon if this doesn't suit you."
Quote
I want them to learn new ones, better ones, ones that will help them grow as developers, knowing as I do that most mod writers are not professional grade programmers.
We've all been noobs before, yes :)
Quote from Arantor on November 12th, 2010, 10:20 AM
$modSettings is for modifiable settings, it contains the contents of the admin panel's options that are forum wide (as opposed to $settings which is theme wide and $options which is user-centric) that are modifiable through the admin panel without editing any files, and is the general home of modification settings too.
Yes, but it's not very instinctive, see?
'mod', to me, really means 'modification', not 'modifiable'... Another fail of SMF's terminology system.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 10:45 AM
Quote
But, see, what if the modder wants to do something in that place, but unrelated to the list of actions?
I did that, actually, in a shoutbox I built; as part of the plugin system SimpleDesk had, I did actually add the same hook that the action handler routine has (though calling SD's hook rather than SMF having it), and abused the hook to not only add my action but also to receive the AJAX calls and handle them, as well as manipulating $context at the same time.

Goes back to what I said before - the running state in $context is fully manipulatable, but really there should be no need to abuse such a hook when a better structure can be put in place.
Quote
I think modders can start using hooks, as long as we provide them with a dummy mod that would show the correct ways of doing things. (Or some prominent mods start using hooks and they look into their code.)
Yes :) This is something I'm quite keen on, not only providing the framework for modders but working with them to build add-ons, so not only providing dummy add-ons but full new features as add-ons that demonstrate how to achieve various things.
Quote
And as I said earlier, we really should rename the hook functions, too.
Well, they were designed for integration which is where the name comes in, but sure, we can rename them to be more appropriate.
Quote
Yeah, beginning with $context['user']...
I still have no idea why that exists when $user_info contains virtually everything you'd want to know anyway.
Quote
I'm not much of a fan of anticipation, not because it's extra work for us, but more likely because if we start adding hooks in useless places, like at the beginning of every single function, it will waste CPU time for everyone, possibly for nothing.
I wasn't going to do it that way, I had a simpler plan - once the action handler was known and the index knew where it was sending the user, I planned to add a hook before and after it has run (since some functions don't return back, and some users will no doubt want to expand upon what's already been done). Yes, there is of course a performance hit there, but the increased flexibility more than makes up for it.
Quote
Maybe for the most important mods, if there are any, we could offer the modder to convert their mods for them.
For the ones that aren't in the core itself, I'll likely put some time aside to sit and implement some of the smaller ones, partly as an example of 'how-to' and partly so we have that functionality available for people. But I'd definitely want to work with mod authors to help them make the jump.
Quote
I think a good policy would be to add a warning when installing a package. In red.
/melikes that idea.
Quote
Yes, but it's not very instinctive, see?
Oh, I'm not disputing that :P I'm well aware of the idiosyncratic nature of SMF's code, just explaining the basis for it...
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 10:56 AM
Quote from Arantor on November 12th, 2010, 10:45 AM
I did that, actually, in a shoutbox I built; as part of the plugin system SimpleDesk had, I did actually add the same hook that the action handler routine has (though calling SD's hook rather than SMF having it), and abused the hook to not only add my action but also to receive the AJAX calls and handle them, as well as manipulating $context at the same time.
I don't understand a word of it, but for instance we could modify said hook to do what SD needs. :P
(You want SD to be ported to Wedge, don't you...? :^^;:)
Quote
Well, they were designed for integration which is where the name comes in, but sure, we can rename them to be more appropriate.
Integration is its purpose, but it shouldn't be its definition. Its definition is a hook.
Imagine that instead of calling parse_bbc(), you had to call parse_bbc_into_an_html_string()
:lol:
Quote
Quote
Yeah, beginning with $context['user']...
I still have no idea why that exists when $user_info contains virtually everything you'd want to know anyway.
Me neither. Probably another example of two vars that developed at pretty much the same time and were favored by one dev or another... Or they wanted to have the "me" equivalent to you's "$context['member']" or something.
Quote
I wasn't going to do it that way, I had a simpler plan - once the action handler was known and the index knew where it was sending the user, I planned to add a hook before and after it has run (since some functions don't return back, and some users will no doubt want to expand upon what's already been done). Yes, there is of course a performance hit there, but the increased flexibility more than makes up for it.
Yeah, adding hooks in the main callee is perfectly fine and I would recommend it, too. Just don't add hooks in every Subs.php function, that's all ;)
Quote
Quote
I think a good policy would be to add a warning when installing a package. In red.
/melikes that idea.
I'm sure most modders will work into making sure their modifications are all turned into hooks at that point.
(It's that's possible, of course. But right now I can't think of anything that isn't.)
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 11:02 AM
Quote
You want SD to be ported to Wedge, don't you...?
Well, it's more a rewrite than port given the changes already to the editor component, not to mention the other changes we've already done. More importantly, though, the plugin system would need to be rethought and brought more in line with how RC4 implemented it (which, I have to say, was cleaner than how I did it in some ways)
Quote
Integration is its purpose, but it shouldn't be its definition. Its definition is a hook.
Imagine that instead of calling parse_bbc(), you had to call parse_bbc_into_an_html_string()
Sign me up :D
Quote
Me neither. Probably another example of two vars that developed at pretty much the same time and were favored by one dev or another... Or they wanted to have the "me" equivalent to you's "$context['member']" or something.
$context['member'] actually makes sense for the most part since its main use is in the profile area when you're looking at another user's profile, so it is the contextual information for that user. $context['user'] though overlaps mostly with $user_info for no discernible reason.
Quote
Yeah, adding hooks in the main callee is perfectly fine and I would recommend it, too. Just don't add hooks in every Subs.php function, that's all
That's not anticipation, that would just be stupid :P
Quote
I'm sure most modders will work into making sure their modifications are all turned into hooks at that point.
(It's that's possible, of course. But right now I can't think of anything that isn't.)
A lot of the really little tweaks currently published as mods would be tricky to implement directly because of what they do - rearranging little bits of templates, and realistically, those are not possible to hook simply because of the mess you get into because you'd be adding hooks for every single minor point.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 02:16 PM
Quote from Arantor on November 12th, 2010, 11:02 AM
$context['member'] actually makes sense for the most part since its main use is in the profile area when you're looking at another user's profile,
Yeah, didn't complain about 'member' but about 'user' instead ;)
Quote
Quote
Yeah, adding hooks in the main callee is perfectly fine and I would recommend it, too. Just don't add hooks in every Subs.php function, that's all
That's not anticipation, that would just be stupid :P
I'm working on hooks right now...
- Changing call_integration_hook to call_hook and same for add_hook and remove_hook
- Changing all of the "integrate_*" strings to just "*". This saves space and the modder shouldn't have to care about colliding into a $modSettings variable or something. I haven't decided whether I'll automatically add integrate_ to the name, or do a 'hooks' array, serialized or something, that will be more logically integrated (ahah) into $modSettings.
- Looking into reference passing. It's a bit confusing... Basically, in PHP5, passing references at call time is deprecated, but since an array of references (of varying length) is passed, there's no other way (and that, is not deprecated, obviously.)
However, sometimes SMF passes vars by reference, sometimes not. It's not always obvious WHY. One would think, security? For instance, integrate_reset_pass doesn't pass by reference... Except for ONE function, resetPassword precisely, which does. Now that makes it complicated, doesn't it..? I don't know why exactly one would want to add a hook to resetPassword, but let's say they do. Then should they expect to be able to modify the original variables? If yes, what for? If not, then why do we pass vars by variable in one function?
Anyway, I'll be committing when I'm done. I'll try to document all of my changes to reference passing.
Quote
A lot of the really little tweaks currently published as mods would be tricky to implement directly because of what they do - rearranging little bits of templates, and realistically, those are not possible to hook simply because of the mess you get into because you'd be adding hooks for every single minor point.
I was thinking... Maybe, maybe, we could allow them to rearrange these little bits of templates at runtime, for instance in ob_sessrewrite...? It'd probably be overkill, though. But do you see what I mean? Doing what SMF would usually do at mod applying time, but this time in real time. "Look for <div id='something'>, and add <hello> before it."
Yeah... Overkill, I know ;) But it's something that could avoid having to uninstall & reinstall when upgrading.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 02:26 PM
To a point you're getting into the game of second-guessing the developer intent, and without any secondary information, it's hard to be sure.

Remember, the integration functions were originally for linking SMF to a third party app, so reset_pass makes sense there, because what you're doing is when a user changes their password in SMF, you're flagging a routine in A.N.Other system to update the same user's password there too.

I'd argue in that case, there shouldn't be a need for the value to be byref. Other instances, however, yes it should be a byref, particularly if it seems logical for a third party app to want to modify something before SMF has its wicked way with it.

We're sort of taking that idea and expanding on it, meaning that any original purpose is likely now somewhat irrelevant. For each hook, look at where it is, what local variables are applicable and make a judgement call as to whether it is reasonable and appropriate for third party code (of any kind) to be modifying that. reset_pass is one case it shouldn't be necessary, for example.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 02:41 PM
Quote from Arantor on November 12th, 2010, 02:26 PM
To a point you're getting into the game of second-guessing the developer intent, and without any secondary information, it's hard to be sure.
I have a neat feeling that it can be considered a bug...
But really, it's hard to draw a line between power and security.
For instance, right now I'm in error_handler... Basically, adding a hook to output_error allows a plugin to get data on what error will be shown. However, it can't change anything in that -- whether it be the message or error level. It's pretty much useless, apart maybe for adding a message that says "The error below is normal, don't worry about it."
But if I give plugins the ability to change the error message, they can actually cancel the error itself. Can't they? For instance if I pass a reference to $file, and the plugin replaces it with 'Unknown', voilĂ , the function just returns without calling anything...
'Oh my'.
Quote
Remember, the integration functions were originally for linking SMF to a third party app, so reset_pass makes sense there, because what you're doing is when a user changes their password in SMF, you're flagging a routine in A.N.Other system to update the same user's password there too.

I'd argue in that case, there shouldn't be a need for the value to be byref. Other instances, however, yes it should be a byref, particularly if it seems logical for a third party app to want to modify something before SMF has its wicked way with it.
So... Where would you put the references, eh? :^^;:
Quote
We're sort of taking that idea and expanding on it, meaning that any original purpose is likely now somewhat irrelevant. For each hook, look at where it is, what local variables are applicable and make a judgement call as to whether it is reasonable and appropriate for third party code (of any kind) to be modifying that. reset_pass is one case it shouldn't be necessary, for example.
I'll let you think about it, too.
There are less than 70 hook calls all in all, so it shouldn't take too long. I'll just rename the hooks for now and I'll let you look into the params call by call if you have time.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 03:08 PM
Hmm, I'm nearly done and it's overall okay because most of the calls don't really need to pass a reference. And many of them don't even pass any variables.

I'm just a bit bothered with my cleanup. Instead of having $modSettings['integrate_this_shit'], I now have $modSettings['hooks']['this_shit']. But I was pretty sure $modSettings entries could be arrays, and were serialized and unserialized at load/write time. Apparently, this isn't the case. I can fix that in updateSettings by adding a single is_array() followed by serialize, but is it useful or not? I think it's useful, because modders might find it useful to store arrays into $modSettings at load time, but... Well, I'm just not sure about that particular change.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 03:46 PM
There are instances where arrays are stored in $modSettings. None of them are consistent (e.g. the signature settings is a comma-separated value list, the censored words good/bad lists are newline-separated items, as are news items)

Storing an array is fine, but I personally wouldn't make it automatic, because you only have to unserialise it again later - and unless you're going to maintain a list of those things, you won't know what to unserialise en masse at the start.

Better would be to manage individual items yourself as and when.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 04:58 PM
Quote from Arantor on November 12th, 2010, 03:46 PM
There are instances where arrays are stored in $modSettings. None of them are consistent (e.g. the signature settings is a comma-separated value list, the censored words good/bad lists are newline-separated items, as are news items)
Hmm... More afterthoughts, eh? ;)
Quote
Storing an array is fine, but I personally wouldn't make it automatic, because you only have to unserialise it again later - and unless you're going to maintain a list of those things, you won't know what to unserialise en masse at the start.
Yeah, all right, I just unserialize hooks from reloadSettings (in the precache code), and then I serialize them again in add_hook(). I'm making sure to save the hooks before calling updateSettings, because otherwise $modSettings['hooks'] would suddenly be serialized. (I suppose it's faster to save the value beforehand rather than unserializing it afterwards.)

Other issues: 'buffer', 'pre_include' are strange beasts... They're undocumented (except by you!), but they're pretty necessary, at least pre_include because without it, you can't call hooks within another file. (I'm considering adding the ability to specify an include file in the hook string... What do you think? It might lead to more include_once than necessary, though.)

Okay, I think I'm ready to commit... Too bad I don't have any hooks under the hand to test it, ahah!
Posted: November 12th, 2010, 04:57 PM

Also of note: $modSettings['integrate_magic_quotes'] is never used.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 05:37 PM
Neither is integrate_eggnog but hey, who's counting?

magic_quotes shouldn't really be needed though (only for those really weird CMSes that do strange mystic things when magic quotes is enabled)
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 05:44 PM
Quote from Arantor on November 12th, 2010, 05:37 PM
Neither is integrate_eggnog but hey, who's counting?
Except that 'integrate_magic_quotes' REALLY is tested against in the source code... :^^;:
Quote
magic_quotes shouldn't really be needed though (only for those really weird CMSes that do strange mystic things when magic quotes is enabled)
But from the name of it, it should be a hook, shouldn't it...? Well, it isn't. It's just a hidden setting that just happens to have the same name as a hook function. Uh.

Okay, I'm done, up to you now...
I'm reposting the changelog here for future readers' convenience, since the New Revs topic isn't public yet.

rev 252

* Renaming hook-related functions and variables. Integration functions become call/add/remove_hook for simplicity reasons. Hooks are renamed from $modSettings['integrate_something'] to $modSettings['hooks']['something'], and are now proper arrays. Finally, SMF_INTEGRATION_SETTINGS is renamed to WEDGE_HOOK_SETTINGS. So what? (index.php, Activate.php, Admin.php, Class-Editor.php, Errors.php, Load.php, LogInOut.php, ManageMembers.php, Profile-Actions.php, Profile-Modify.php, Profile.php, Register.php, Reminder.php, Security.php, Subs-Auth.php, Subs-Members.php, Subs-Post.php, Subs.php, Who.php, Display and MessageIndex templates)
* Made sure that the error message can be tampered with by the output_error hook. Otherwise, it's relatively useless. (Errors.php)
* Given that the outgoing_email hook has permission to tamper with e-mail data, personal_message and create_topic hooks should be able to play around with their data, too. Same with $data in the change_member_data hook in updateMemberData. (Subs.php, Subs-Post.php)
Posted: November 12th, 2010, 05:43 PM

Do you think 64KB (the max variable length (TEXT) in wedge_settings) will be enough to store all possible hooks...?
I think so, but what if a forum is modded to death...? I guess it'd stop functioning quickly, anyway. Hmm.
The only issue with my own implementation is that it requires unserializing all entries, while SMF's version explodes the strings only when needed. SMF's may be slightly faster, but I don't know if it's worth filling the settings table with hook names...
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 05:49 PM
Quote
Do you think 64KB (the max variable length (TEXT) in wedge_settings) will be enough to store all possible hooks...?
Hmm, good question. Not sure right now... need to think about that.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 05:57 PM
Obviously I can simply store them again in $modSettings['hook_*'] or something, but it'd force me to go through the entire array to find these keys and unserialize them or something. Uh.

Anyway, to reach 64KB, you'd probably need to have about, hmm... a thousand hooks?
That would probably be a bad idea, eheh.
Title: Re: Plugin hooks
Post by: Arantor on November 12th, 2010, 09:29 PM
Don't forget the padding introduced by serialize'ing though, that adds a surprising amount of stuff.
Title: Re: Plugin hooks
Post by: Nao on November 12th, 2010, 10:57 PM
Well, I'd taken that into account...
Because I honestly doubt a hook function would take up to 64 characters ;)
More likely around 10 characters...

I chose serialize because it has a reputation for being extremely fast. (It may even be faster than an implode(',')... Haven't tested, though.)
Title: Re: Plugin hooks
Post by: Nao on November 15th, 2010, 07:12 PM
I'm not 100% happy with the add-on structure, "add-on = mod(ification) or plugin". (mod = source code modification, plugin = something that uses hooks.)
I'd like to discuss changing this to "mod (modULE) = hack or plugin". I think the word "hack" really represents what this would be. Modifying the source code can cause issues, and thus isn't very solid, and is just a plain hack.
"Module" would be fine because people would then say "mods", like they do right now. "Mods" as "modifications" doesn't go well with the plugin system, so I think "mods" as "modules" would be better.

What do you think?

(Sorry, couldn't find where we discussed all of this originally...)
Title: Re: Plugin hooks
Post by: Arantor on November 15th, 2010, 11:28 PM
It's a mindset problem. People think mods, they think of modifications under the hood. They won't see it as modules, no matter how hard we try. We need a clean break to be able to get away from that mentality.
Title: Re: Plugin hooks
Post by: Nao on November 15th, 2010, 11:51 PM
I'm just having a hard time with the hyphen in "add-on"... :P
Seriously, I always like "mods". Just wanted to get rid of "packages"...
Title: Re: Plugin hooks
Post by: Arantor on November 15th, 2010, 11:57 PM
Could always actually call it plugins. Doesn't really matter, as long as it's a little different to be able to break the mindsets of old.
Title: Re: Plugin hooks
Post by: YogiBear on November 16th, 2010, 12:16 AM
Whatever is chosen someone somewhere will be asking what it means.

I like Modifications or Modules but for originality maybe Additions or Extras would be suitable ?
Title: Re: Plugin hooks
Post by: Dismal Shadow on November 16th, 2010, 01:26 AM
Plugins
Title: Re: Plugin hooks
Post by: snoopy-virtual on December 31st, 2010, 06:26 PM
Going back to what you were talking some time ago:
Quote from Nao/Gilles on November 12th, 2010, 10:31 AM
Maybe for the most important mods, if there are any, we could offer the modder to convert their mods for them.
Quote from Arantor on November 12th, 2010, 10:45 AM
For the ones that aren't in the core itself, I'll likely put some time aside to sit and implement some of the smaller ones, partly as an example of 'how-to' and partly so we have that functionality available for people. But I'd definitely want to work with mod authors to help them make the jump.
I definitely like more Arantor's approach.

I won't learn if you do the work for me.

Well, I can learn watching examples of finished plugins. (Reading the code and seeing how it has been done). I can even learn from the "bad written ones" (I will learn what things I need to avoid) but I definitely always learn faster (and it gets better into my mind) if I do it myself. Making my own mistakes and learning the hard way how to do things properly.

If you can spare some time (whenever we are ready to start modding) to work with me (not doing my work, but supervising what I am doing and correcting me when I take the wrong path) I will end up learning faster and doing a better work.

I think.
Title: Re: Plugin hooks
Post by: Xarcell on March 28th, 2011, 01:42 AM
I agree with Nao

Module(add-on) & Plugin(hack)
Title: Re: Plugin hooks
Post by: Nao on March 28th, 2011, 08:01 AM
That's the other way around actually.
And you are.........?
Where did you find this website?
Title: Re: Plugin hooks
Post by: Xarcell on March 28th, 2011, 06:50 PM
Quote from Nao/Gilles on March 28th, 2011, 08:01 AM
That's the other way around actually.
And you are.........?
Where did you find this website?
I heard rumors awhile back at smf.org, about 3 months ago I think. Yesterday I googled the site by familiar names rumored to be working on the project. I didn't believe a site was already available, until I found this one. I didn't even know what the name was until now.

Although, I see now it's still not supposed to be public?

You are welcome to delete my posts & account.

Thanks, and good luck with the project. Looking forward towards it's release...
Title: Re: Plugin hooks
Post by: Nao on March 28th, 2011, 07:06 PM
Quote from Xarcell on March 28th, 2011, 06:50 PM
Although, I see now it's still not supposed to be public?
It's a bit of a blunder on my side, technically.
I had a robots.txt file telling Google not to spider it. Then months later, we decided we could go public. So I removed the file. Then a few days passed, and we didn't have the time to prepare the marketing footwork that would be needed for a proper announcement. So we just postponed the public announcement... Only, I forgot to restore the file. When we received our first external visitor, we discussed this and we decided that it was okay to leave it that way.
Well, it was several months ago so it's kind of a joke by now...

I guess we could announce the name, now that I've secured all of the key domain names (I bought nearly 20 with "wedgesomething", but will probably only keep the one wedge.org and a couple others in the end -- making up over time for the price I had to pay to purchase wedge.org from a third party.)
Quote
You are welcome to delete my posts & account.
Not our way of doing things. We just like knowing whether people are discussing Wedge by its name in other places.
Quote
Thanks, and good luck with the project. Looking forward towards it's release...
As indicated, it won't be out before SMF2 Gold is ready, unfortunately. Because of the current license...
Of course, one may think that it's in their interest to delay that release as much as possible. But in the end, they're just shooting themselves in the feet... Whatever they do. Funny to think that Gold was pretty much announced for November/December, then pushed back to... Well, no date now.
Title: Re: Plugin hooks
Post by: Xarcell on March 28th, 2011, 08:04 PM
FYI, talking about SMF gold, I read somewhere by a SMF staff member that RC5 was supposed to be gold, but they are currently trying to change their license, and will not release gold until then. So no date set.

It makes me wonder if wedge is the reason why. :P
Title: Re: Plugin hooks
Post by: Nao on March 28th, 2011, 08:21 PM
Officially, they're only postponing because of the "delays in having the ownership transferred to the NPO".
Officiously, there's nothing preventing them from going BSD as of now, of course. But what's happening is that they still have a dozen bugs or so to fix -- they're actually easy to tackle, but I'd venture into saying that all of the dev team is exhausted at this point.
Can you realize that both Pete and I were rumored for a proper developer spot at some point last year? SMF 3.0 would already be out by now... :P
Title: Re: Plugin hooks
Post by: Arantor on March 28th, 2011, 08:25 PM
Quote
As indicated, it won't be out before SMF2 Gold is ready, unfortunately
Duke Nukem Forever - even with its latest delay - will be out before SMF 2 Gold.

I can confirm that Wedge is *not* the cause of the delay, at least not the official reason; they are still trying to tie up transferring assets between the NPO and LLC, and because of all the history, they are being extra thorough about it.
Quote
Officiously, there's nothing preventing them from going BSD as of now, of course. But what's happening is that they still have a dozen bugs or so to fix -- they're actually easy to tackle, but I'd venture into saying that all of the dev team is exhausted at this point.
The tracker count is going up, not down.
Quote
Can you realize that both Pete and I were rumored for a proper developer spot at some point last year?
It almost happened for me back in 2009 when things were beginning to flail and I actually withdrew saying that I didn't feel ready - in truth, I wasn't, because I was still very much in the 'every commit must be perfect' mindset. It took SimpleDesk to teach me that wasn't necessarily the case, so in March, I offered, heard nothing for weeks, and told them to get stuffed when a vague offer did materialise on the basis of 'an apprenticeship'. We all know how it turned out for Nao with their ideas of apprenticeship...
Title: Re: Plugin hooks
Post by: Xarcell on March 28th, 2011, 09:35 PM
Quote from Arantor on March 28th, 2011, 08:25 PM
Quote
As indicated, it won't be out before SMF2 Gold is ready, unfortunately
Duke Nukem Forever - even with its latest delay - will be out before SMF 2 Gold.
LMAO!
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 08:12 AM
Still, Pete. Do we go public now?
Title: Re: Plugin hooks
Post by: Arantor on March 29th, 2011, 09:09 AM
Don't see why not :)
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 10:38 AM
It's been so long, and I still haven't got inspiration to write a proper announcement... So why don't we just, I don't know... Take bits from the data available on the public board? I'm sure it can make for a proper announcement message altogether.

Or maybe simply, "Go to wedge.org if you dare" :P
Title: Re: Plugin hooks
Post by: Arantor on March 29th, 2011, 11:05 AM
That works for me ;)
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 11:29 AM
Okay, I've created a FAQ board styled to be a blog (and ordered from oldest to newest post), and modified my sm.org signature to use the Wedge logo.

I'll also update my sig on Noisen.com. Dunno for other websites...
Title: Re: Plugin hooks
Post by: Arantor on March 29th, 2011, 12:53 PM
Well, it should be cached, but let's see what happens when I crank it up to 11...
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 01:39 PM
Woohoo.... 44k links to Wedge.org already :niark:

Maybe I should look into my stats... I don't even know where to look ahah!
Title: Re: Plugin hooks
Post by: CJ Jackson on March 29th, 2011, 01:52 PM
@Nao, nice motto.  :lol:
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 01:55 PM
Which one? There are many random slogans in the top left corner ;)
Title: Re: Plugin hooks
Post by: CJ Jackson on March 29th, 2011, 02:02 PM
The Wedge one, "Simple Math. Really"
Title: Re: Plugin hooks
Post by: Arantor on March 29th, 2011, 02:06 PM
It works on all the same levels that the name Wedge itself does, hehe.
Title: Re: Plugin hooks
Post by: Nao on March 29th, 2011, 02:20 PM
Quote from CJ Jackson on March 29th, 2011, 02:02 PM
The Wedge one, "Simple Math. Really"
Ah yeah... That one!
Well it's simple math whether you should adopt it or not. Should be apparent in just a few minutes once you try it. Of course, half of the real numbers are negative but as I said, it's simple math either way.

As for us developers... Unfortunately, the math isn't that simple eheh. But it's part of the fun!
Title: Re: Plugin hooks
Post by: Dragooon on March 29th, 2011, 03:22 PM
A plugin and module system would be nice, and no, I haven't been keeping up with this site or any other as a matter of fact. The reasons are same as using a proper template engine as opposed to PHP based one.
Title: Re: Plugin hooks
Post by: Nao on March 30th, 2011, 12:14 AM
I think we already established that ToxG, as excellent as it is (given that it was made by talented people!), would be a no-no for as long as it can't allow mixing (if only temporarily) PHP templates with tox templates... :^^;:
Title: Re: Plugin hooks
Post by: dorje on March 30th, 2011, 07:12 AM
Quote from Nao/Gilles on November 12th, 2010, 08:02 AM
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.
Why not $wtf?  :lol:

Title: Re: Plugin hooks
Post by: Dragooon on March 30th, 2011, 08:23 AM
Quote from Nao/Gilles on March 30th, 2011, 12:14 AM
I think we already established that ToxG, as excellent as it is (given that it was made by talented people!), would be a no-no for as long as it can't allow mixing (if only temporarily) PHP templates with tox templates... :^^;:
I was talking about the plugin system, and not ToxG. But FWIW, it *is* possible to do so and I've told you my theory, you guys just never came to the decision to use it.
Title: Re: Plugin hooks
Post by: Dragooon on March 30th, 2011, 11:55 AM
Quote from Bloc on March 30th, 2011, 10:35 AM
Quote from Nao/Gilles on March 30th, 2011, 12:14 AM
I think we already established that ToxG, as excellent as it is (given that it was made by talented people!), would be a no-no for as long as it can't allow mixing (if only temporarily) PHP templates with tox templates... :^^;:
Good call.

As much as I love the mod/template solving of ToxG, its something that shouldn't be needed in the first place(mods modifying templates) and I really like to keep the PHP parts. :)
Mods *need* to modify the output in one way or the another, although modifying a template is not a good idea, I'd agree with that. Is that what you're trying to say?
Title: Re: Plugin hooks
Post by: Arantor on March 30th, 2011, 11:59 AM
Yeah, modifying the output isn't the same as modifying the template. Anything that's fragile enough to require editing the template itself is going to hit problems sooner or later.
Title: Re: Plugin hooks
Post by: Dragooon on March 30th, 2011, 12:02 PM
Quote from Arantor on March 30th, 2011, 11:59 AM
Yeah, modifying the output isn't the same as modifying the template. Anything that's fragile enough to require editing the template itself is going to hit problems sooner or later.
In that case ToxG really solves those problems when compared to a simple PHP engine, although since I know you guys don't need another advertisement I'd leave it at that.
Title: Re: Plugin hooks
Post by: Nao on March 30th, 2011, 01:34 PM
Quote from dorje on March 30th, 2011, 07:12 AM
Why not $wtf?  :lol:
We already finished the rewrite ;)

It's one of these "nice little features" in Wedge... You no longer have to declare the $smcFunc global anywhere. It's all encapsulated inside nice little thematic classes.
Title: Re: Plugin hooks
Post by: Nao on March 30th, 2011, 05:32 PM
So... Dragooon, what do you think we could do, either by adopting ToxG or by using a purely PHP solution?
Title: Re: Plugin hooks
Post by: Dragooon on March 30th, 2011, 07:10 PM
Quote from Nao/Gilles on March 30th, 2011, 05:32 PM
So... Dragooon, what do you think we could do, either by adopting ToxG or by using a purely PHP solution?
As in what advantage it would bear or how should it be adopted? If you're looking for advantages then they are(From top of my head) :

- A mod can modify the output without actually altering the templates, by proper implementation of template one gets a powerful template hook system free. Something which is virtually impossible in a pure PHP scenario regardless of how you look at it.
- The templates can be systematically broken down into less confusing pieces, for example(This is taken from vBulletin), a user's online list item would be an individual template. A single child board listing would be its own individual template, this gives a lot of power to not only themers but also moders while maintain sanity.
- No PHP-fu in between templates(If you enforce TOX-G that is). Keeps logic and template separate
- One can code up a strong admin panel for modifying templates which can be easy for the end-user.
- It is not slower than pure PHP by more than 4-5%.

Advantages of PHP over TOX-G :
- Unlimited possibility of syntax.
- Very marginally faster
- Already in place, no need to bang heads converting code
Title: Re: Plugin hooks
Post by: texasman1979 on March 31st, 2011, 12:01 AM
...
Title: Re: Plugin hooks
Post by: Nao on March 31st, 2011, 12:16 AM
Are you in trouble with the punctuation police? :P
Quote from texasman1979 on March 31st, 2011, 12:01 AM
2 things id like to comment on: integration hook system and template system. Integration hook system. Think of a switch statement. You have a list of conditions and a default. The very nature of a switch is faster than a nested if.
Well, if there are not a lot of different possibilities, the if is faster. Plus, I think it's more readable.
Quote
Make a small c prog and look at the machine code/object code.
Does a Pascal program count?
Quote
Instead of waiting till you get there to ask and see if there is a hook, already know when you get there. The theory is in my head but it is difficult to express in words. Each action has a path. Find out if that action has a hook then contenue through the action then knowing the path needed to go. Make hooks one of the first things done when an action is requested by way of a switch.
Implementing hooks is not easy in terms of performance. However, it's not realistic to optimize this, especially at this point. Alpha status should be there for implementation new functions. We can start optimizing for speed when in beta. And even then, I'm not sure that many 'wasted' hooks would account for more than a few milliseconds. You have an array with all possible hooks in memory -- any calls to call_hook() (well, that's the name of the function in Wedge) will be negligible really.
Quote
Use switches in every possible time, instead of ifs.
I don't know where you got that from... (And there are so many ways to optimize common PHP code. This particular example is not that good really.)
Anyway, if you're interested in micro-optimizations, you should follow SMF 2.1's development instead. Apparently they're very keen on changing "==" to "===" everywhere.
Quote
Dont use memory/hd unless there is no other way to do it. Mysql and apache are already using resourses, reuse those in every conceivable fashion instead of drawing more resources. If you dont need a particular setting, dont load it. Even comments generate more lines of code cause it has to determine if it is a comment or not.
That's what opcode caching is for.
And *any* webmaster that has a critical need for performance, will definitely install an opcode cache. At that point, who cares whether we use ifs or switches? It's all going to be the same, as it'll be precompiled...

On the contrary, comments are faster. Not because the code executes faster -- but because it's faster to understand what the code does, and thus, to optimize it.
Title: Re: Plugin hooks
Post by: Arantor on March 31st, 2011, 12:19 AM
Quote
Think of a switch statement. You have a list of conditions and a default. The very nature of a switch is faster than a nested if. Make a small c prog and look at the machine code/object code.
Ever done that? That's rather enlightening, but different languages handle switch vs if/nested if in different ways, some run to linear time with the increase of options, some to logarithmic time. PHP is basically a shell around C, so it will do virtually what C does for something like that, which means that on modern systems... if you have 4+ options, or 2+ if you have cases that fall through to each other, switch is usually faster. Depends on the circumstances.
Quote
Find out if that action has a hook then contenue through the action then knowing the path needed to go.
SMF, Subs.php, see call_integration_hook().
Quote
Make hooks one of the first things done when an action is requested by way of a switch.
SMF actions (and ours) are not controlled by a switch but a local scope hash table. (Might be global scoped in Wedge, but it's certainly a memory hash table initialised directly from PHP code)
Quote
Template system. 100% static.
Way to go on screwing up customisation, not to mention dynamic content.
Quote
Only echo predefined values. Gives modders a way of changing the template, without changing the template.
Not possible with 100% static.
Quote
Mysql storable, cacheable.
Depends on the circumstances. Also note that not all hosts are properly configured for caching, not all hosts even provide services like memcached, and often have MySQL's query buffer set way too low to be useful to the point where you might as well explicitly push queries without going to the buffer in the first place, would actually be faster on the majority of installations.
Quote
Different templates for different days, so to speak
There are already hundreds of templates in SMF, and we have already added more subtemplates and will be breaking the existing ones down.
Quote
Use switches in every possible time, instead of ifs.
No.
Quote
Dont use memory/hd unless there is no other way to do it.
Eh? What do you think memcached does, exactly?
Quote
Mysql and apache are already using resourses, reuse those in every conceivable fashion instead of drawing more resources.
Step 1, don't use Apache if you're even remotely concerned about performance.
Quote
If you dont need a particular setting, dont load it.
Dear god no. The time taken to figure out whether a setting should be loaded invariably outweighs the actual time to load that setting.
Quote
Even comments generate more lines of code cause it has to determine if it is a comment or not.
If performance is your goal, you should be using APC which makes that point redundant.
Quote
What im saying is, preprocess, process, display using as few steps as possible.
So let's throw out any sense of customisation then?
Title: Re: Plugin hooks
Post by: texasman1979 on March 31st, 2011, 03:04 AM
...
Title: Re: Plugin hooks
Post by: Nao on March 31st, 2011, 08:39 AM
Dragooon, I thought you said you had a PHP template hook in mind?

Pete, looks like we replied at the same time ;)

texasman, line-breaks are good but you really should consider using the spell-check function in your browser, eh... And capitals, too! Right now I need a break! tl:dr :^^;:
Title: Re: Plugin hooks
Post by: Arantor on March 31st, 2011, 09:29 AM
I was going to write up a rebuttal to each of the points being made here, but I'll sum it up in two sentences.

Firstly, did it occur to anyone reading this debate that the above points *hadn't* gone through either or both of our minds?

Secondly, I see a lot of talk about being the best it can be and doing it a certain way which certainly sounds grand - but wake me up when you actually have some idea of how you think it should be implemented, because I'm telling you from a practical POV, it really isn't as grand as that in reality, reality just doesn't work that way.
Title: Re: Plugin hooks
Post by: Dragooon on March 31st, 2011, 09:40 AM
Quote from Nao/Gilles on March 31st, 2011, 08:39 AM
Dragooon, I thought you said you had a PHP template hook in mind?
The first thing I would not do is that. PHP template hook are very difficult to achieve and are a sad sad practice.
Title: Re: Plugin hooks
Post by: Nao on March 31st, 2011, 03:41 PM
texasman, you can have a signature in this forum, AFAIK.

Regarding your multi-threaded switch modifiability sensors... Wow, what are you on? You've got to share now!
Same as Pete for the rest. You are, after all, free to create your own fork of SMF2 at this point.

Dragooon, hooks aren't a sad practice. They're actually one of the most practical solutions to the problem of customizability... The only point is that we have to be careful how fast execution of empty points is.
Basically, in Wedge, it's as fast as en empty() test. At this rate, we could very well set hooks every other line in the code without it becoming significantly slower. (We will, instead, stick to adding hooks where it seems reasonable enough. We will probably add more hooks during the alpha and beta sessions at the request of modders.)
Now, when it comes to templates, we can do it in two different ways: either regular hooks inside the functions (either at the beginning, or at the end, or both), that's for replacing entire functions, or detecting frequently modified elements and replacing them with generic blocks. (The things like <we:cat> that I implemented a couple of months ago.)
Title: Re: Plugin hooks
Post by: Dragooon on March 31st, 2011, 05:31 PM
Quote from Nao/Gilles on March 31st, 2011, 03:41 PM
Dragooon, hooks aren't a sad practice. They're actually one of the most practical solutions to the problem of customizability... The only point is that we have to be careful how fast execution of empty points is.
Basically, in Wedge, it's as fast as en empty() test. At this rate, we could very well set hooks every other line in the code without it becoming significantly slower. (We will, instead, stick to adding hooks where it seems reasonable enough. We will probably add more hooks during the alpha and beta sessions at the request of modders.)
TBH manually positioning every hook in every bit of template is a very impractical practice, it may seem workable in theory but I don't see it actually working out. Hooks in actual workflow is a lot more sensible and practical thing.
Quote from Bloc on March 31st, 2011, 05:22 PM
I do hope PHP in Wedge's templates isn't taken out, since thats whats currently keeps my interest lmao. :)(not that I expect Wedge to stop because of me though ;) )

I have spoken in favor of TOXG before, but I just don't see the kind of freedom with it that PHP templates providest, sorry to say. If anything it seems more cumbersome to MIMIC using PHP than just use PHP right away.. The mod/theme problem is VERY well solved by it though..but if there won't be a problem why use it then?


As for templates not being allowed to use PHP, because its "dangerous" or "not to be trusted"..wake up I'd say. One of most widespread scripts around use PHP in their templates(and not only WP either) and they haven't wreaked havoc yet! I would imagine that for those that seldom make templates or just change a color here and there, the idea of using nice formatted HTML that fit just right into Dreamweaver, is a must-have.

For everyone else though, the benefits are very clear. And last I checked it was the actual CONTENT that was considered risky allowing too much freedom for - not the design.
The thing is, Tox-G adds a lot of possibilities otherwise which I consider to be quite hard doing with pure PHP without actually limiting a designer. I haven't encountered a thing that I can't do with pure TOX-G. But to each it's own, PHP got its own advantages. One of my main motives of  advocating TOX-G is because of it's hookable nature, I am not against PHP, it's just that a template engine is a better option and TOX-G seems to be the best one at them for a forum software.
Title: Re: Plugin hooks
Post by: Dragooon on March 31st, 2011, 07:23 PM
Quote from Bloc on March 31st, 2011, 06:43 PM
I like my car to go from spot 1 to 2 without breaking down and being reasonably fast. I don't care if it can actually fly because theres no allowed areospace for it to fly in anyway...

TOXG was made by Unknown to solve a specific problem. If said problem doesn't exist anymore(or will not exist)...why have that car with wings that you can't use? It would actually require more resources(=fuel) because of the added "feature".

Just saying. :)
Posted: March 31st, 2011, 06:40 PM

oh, and talking of doing stuff in tempaltes which isn't possible otherwise..there just isn't many(=none) around that actually utilize the power of said PHP we have now - in SMF - so I won't hold my breath that TOXG will be any different in that respect.
I don't think that problem was ever solved. Mods still need to modify the template to alter that output, unless I am mistaken.
Title: Re: Plugin hooks
Post by: Arantor on March 31st, 2011, 07:28 PM
Mods can alter the content that's going *into* the template with out editing the hook itself. But that's only any good provided that you're providing it more of the same, or internally reformatting it for whatever reason.

If you need to extend the template in any way, i.e. do something other than for which it was designed in any way that can't be done through the exact markup provided, you either have to design the template to feed more from the source or allow it to be modified.

The former example, to 'feed more from the source', I'm thinking you'd make more use of stuff like GenericList for it; in order to make a given table more dynamic in terms of columns (new rows is easy), you'd need to move everything out of hardcoding the table structure.

The latter example is where you want to do inline some new content into the template.
Title: Re: Plugin hooks
Post by: texasman1979 on April 1st, 2011, 03:39 AM
...
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 08:59 AM
Considering that the only initialisation of hooks is simply an entry that goes into $modSettings, which is automatically cached, and even if it wasn't, it's subject to the fastest possible query it could be - and that on a performance system it's going to be loaded from memory via memcache, I see no reason to convolute the entire process for tests that in practice will not make it any faster in the majority of cases, and I'm not compromising general performance for outliers.
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 12:31 PM
Warning: this is a *very* technical post. It also spoils a lot of things about Wedge's internals, eheh.
Quote from Dragooon on March 31st, 2011, 05:31 PM
TBH manually positioning every hook in every bit of template is a very impractical practice, it may seem workable in theory but I don't see it actually working out. Hooks in actual workflow is a lot more sensible and practical thing.
I don't see your point...

Let's take this example. Edit Load.php, loadSubTemplate().

Code: [Select]
$theme_function = 'template_' . $sub_template_name;
if (function_exists($theme_function))
$theme_function();

Into this...

Code: [Select]
$theme_function = 'template_' . $sub_template_name;
$theme_function_override = $theme_function . '_override';
if (function_exists($theme_function_override))
$theme_function_override();
elseif (function_exists($theme_function))
$theme_function();

That basically allows us to load any kind of overriding template indicated by the styling (in settings.xml, let's say), and then we can completely override the existing function.
We could also have two other functions: $theme_function_before and $theme_function_after, which would be executed respectively before and after the target template function -- without preventing the original function from being run, allowing themers to insert data easily.
Of course, these functions could be added to each other (e.g. a mod adds a _before function to a template function, and the current function also overrides it -- let's just say themes always have priority over mods so their code is run first, then all mods in whatever order.)
Of course, it's not practical for very specific areas like adding buttons to a strip, but in these cases we always have proper hooks with the list of variables, so mods will use hooks for these, and for areas without a hook, they can use _before, _after and/or _override. Then our job is to simply split template functions into many smaller functions.

...Or we could just add template hooks here and there in important areas of the template, of course.
The solution I gave is just a quick one to allow themers to override any single function without us needing to add hooks everywhere.
Quote
The thing is, Tox-G adds a lot of possibilities otherwise which I consider to be quite hard doing with pure PHP without actually limiting a designer.
WeCSS also has the same features and limitations, somehow. Because it's preparsed, it gave me great freedom to develop it into an object-oriented version of CSS, and it made it so much simpler for me to manipulate objects with common parents, it's really impressive... However, it also puts an extra burden when it comes to inherited stylings -- if I want to restyle an object that is already parent to others, but I only want to restyle that particular object, I have to careful consider whether or not I'll specifically prevent inheritance for my rules. All in all, more power also means more complexity. Because most of the important objects in Wedge's CSS are linked to others through inheritance, themers will be required to learn how inheritance works, which is basically the whole point of having extra sample stylings that show how it works.

(And in that respect, I'm really glad I made Wine the main styling and pushed Warm to an inherited styling, because it shows how to... pretty much get rid of all the bells and whistles in Wine, so people don't have to worry about making designs that are too close to Wine. At this point, I could even rework Warm to make it even more removed from the Wine style. Something like WordPress's awful default themes.)
Quote
I haven't encountered a thing that I can't do with pure TOX-G. But to each it's own, PHP got its own advantages. One of my main motives of  advocating TOX-G is because of it's hookable nature,
Correct me if I'm wrong, but it's only hookable by splitting functions into many, right...? Or does it allow one to take the sub-template's HTML and manipulate it as a string before reinjecting it to Tox-G's parser? Which is the only way I can see for Tox-G to be superior to SMF/Wedge's current implementation...
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 12:39 PM
Quote from texasman1979 on April 1st, 2011, 03:39 AM
and i have a sig defined, but it doesnt appear to show up? does this custom version of smf yall are using require something that i dont know to set?
Actually, sigs only show up for members with at least 10 posts. This is to discourage spammers from posting here...
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 12:59 PM
Will you add a template hook at every place possible? Posts user info, post options, below one's sig, above post's title, above topic's title, below post's listing, below and above quick reply, quick reply itself, how about editing an existing template itself? Hooks are a lot more sensible on workflow itself, hence they work fine at controller and model stages but not at the view part.
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 01:06 PM
Quote from Dragooon on April 1st, 2011, 12:59 PM
Will you add a template hook at every place possible?
As I said: automatic template hooks in every single sub-template (before and after), as well as manually added hooks in places that matter. We could also resume our work (well, Pete's work!) of splitting templates into many sub-templates. The work I did on rewriting the sub-template flow should help a lot. (Three different template layer systems instead of one, helper functions, and let's not forget that Pete originally thought of making it possible to have multiple sub-templates [1] which, what a shame, still isn't possible in SMF!!!)
Quote
Posts user info, post options, below one's sig, above post's title, above topic's title, below post's listing, below and above quick reply, quick reply itself, how about editing an existing template itself? Hooks are a lot more sensible on workflow itself, hence they work fine at controller and model stages but not at the view part.
Anything you want, really. We could discuss it in private if you'd like, or just keep doing it here. (Funny, this is technically the first development thread we're having in a public place...)

You didn't reply about Tox-G's exact abilities?
 1. As opposed to nesting multiple template layers.
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 02:32 PM
Wait, I did reply about TOX-G's exact abilities, what are you trying to ask? How it works or what advantages it has over PHP?

As far as TOX-G's functioning go :
1) Every template is defined in a XML like manner, you know the syntax. It is easier to follow then pure PHP and has some very nice little features and is actually quite easy to extend and adapt, one just needs to give a sitting with its code for a few hours and one can develop it further
2) Every template can be altered to add an overlay before or after it, I believe every template can also be replaced but I haven't experimented with this.
3) The template's files themselves are in a XML-esque manner which make sense for someone who don't know PHP but wants to do designing.
4) TOX-G parses the templates and caches them as PHP, so speed isn't really that much of a problem

All in all, yes it is possible to do the hook system by dividing the whole thing into very small templates and essentially this is what TOX-G does(But it is easier to do so).
Quote from Nao/Gilles on April 1st, 2011, 01:06 PM
Anything you want, really. We could discuss it in private if you'd like, or just keep doing it here. (Funny, this is technically the first development thread we're having in a public place...)
Its your choice, if you want you can move this to private boards.
Title: Re: Plugin hooks
Post by: texasman1979 on April 1st, 2011, 03:05 PM
...
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 04:20 PM
Please, texasman. If you want to be read -- make us want to read you. Right now you're talking about this "yall" man I've never heard about, and you apparently have a problem with your punctuation keys. That's okay for short blurbs, but long posts need quite some effort to read.

Are you asking for something anyway? I'm not sure... I can't bother to read your long posts. See what I mean?
Title: Re: Plugin hooks
Post by: texasman1979 on April 1st, 2011, 04:26 PM
...
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 04:27 PM
Quote from Dragooon on April 1st, 2011, 02:32 PM
Wait, I did reply about TOX-G's exact abilities, what are you trying to ask? How it works or what advantages it has over PHP?
How it works.
Quote
As far as TOX-G's functioning go :
1) Every template is defined in a XML like manner, you know the syntax.
Yeah, although I'm trying not to think too much about it... I'm already having a hard time getting used to HTML5's lack of self-closers ;) (Well, I could have left them in, but I don't see the point in wasting bandwidth when it's valid either way.[1])
Quote
It is easier to follow then pure PHP
...Except for programmers...
Quote
2) Every template can be altered to add an overlay before or after it, I believe every template can also be replaced but I haven't experimented with this.
Okay, then that's in no way better than Wedge for this..? Given that I can easily add a before/after/override hook to any template function as demonstrated earlier?
Quote
3) The template's files themselves are in a XML-esque manner which make sense for someone who don't know PHP but wants to do designing.
If they don't know PHP at all, is there a reason for them to know about XML..?
And as far as I can remember, broken XML (even slightly broken!) means broken *everything*? Unless Unknown wrote a custom parser that accepts any errors in the XML output... And/or the actual XML is treated as HTML, in which case everywhere you put some actual XML for ToxG's use, it will still fail horribly... (Let's say you type < tmp:something >, will it be parsed correctly? I know I'm quite torn myself whether or not I should add support for loose whitespace in my styling blocks...)
 1. I'm serious when I say I did my best to compensate for jQuery's download size... And these guys are adding more kilobytes to it on every single release, what the fork >_<
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 04:33 PM
Quote from texasman1979 on April 1st, 2011, 04:26 PM
i am merely expressing an alternative way of looking at the hooks concept.
Why, have you looked into ours in the first place? (It's pretty close to SMF's so I should think so.)
Quote
and i use commas and periods dammit. lol
But what about single quotes and uppercase among others?
Quote
and yall = wedge, nao, and arantor
Yall is Wedge, Nao and Arantor? When did we start calling ourselves Yall?
Do you mind if I call you and your car "Zlipt"?
Quote
i guess you never been to texas.
I've never been to the Americas, period.
Quote
well you ought to. lol
I'm living in France. The number one touristic destination in the world. And it's a damn fine country.
Still, it's an international forum and I'm doing my best to speak an understandable English for everyone's benefit.
If you're in Texas, Zlipt, which last I heard was part of the United States of America, with English as primary language, why exactly aren't you speaking proper international/commercial/business English in here?
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 04:37 PM
The thing with the potential wedge template model you're talking about is that some work will also be needed on source sides of file as well, it won't be pure PHP. Not big of an advantage, I know.

XML(Or TOX for that matter) isn't more difficult to understand for programmers, it makes sense if you read it, seriously, give it a shot(10 minutes max), I'll give you some sample templates from my project if you want.
Quote
If they don't know PHP at all, is there a reason for them to know about XML..?
XML is a far more wide adaptation than PHP, more than that, it is easier to understand than PHP's syntax.
Quote
And as far as I can remember, broken XML (even slightly broken!) means broken *everything*? Unless Unknown wrote a custom parser that accepts any errors in the XML output... And/or the actual XML is treated as HTML, in which case everywhere you put some actual XML for ToxG's use, it will still fail horribly... (Let's say you type < tmp:something >, will it be parsed correctly? I know I'm quite torn myself whether or not I should add support for loose whitespace in my styling blocks...)
Unknown's syntax is based on XML, but it is not strict XML per se. TOX-G uses a custom parser and not any standard parser(It doesn't even need the most basic XML plugins for PHP). Hence the reason I could implement <we:if "expression">, < tpl:something > will not break things since it'll be treated like a string, <tpl:something> will since tpl is a reserved namespace and it is unclosed, but it'll give a nice error message! And yeah, TOX-G can self-close tags :P.
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 04:55 PM
Quote from Dragooon on April 1st, 2011, 04:37 PM
XML(Or TOX for that matter) isn't more difficult to understand for programmers, it makes sense if you read it, seriously, give it a shot(10 minutes max), I'll give you some sample templates from my project if you want.
I already know ToxG's file structure, remember we discussed it several months ago already? At the time, everyone on the forum was excited at the idea of using ToxG for Wedge and I was quite alone saying I didn't see the point, then you guys spent a lot of time convincing me, I said okay as long as I'm not doing the conversion alone, Fustrate promised he'd convert one of the 'big templates' as an example, and then... Err... Well, said template never came, and the topic was buried ;)

Basically, what killed implementation is that it didn't have the ability to run ToxG templates alongside SMF templates (which would have been helpful because I keep modifying the templates so I couldn't stand stopping everything for several weeks), and/or no one stepped up to do the conversion work for me. I'm all for moving forward but I also have to draw the line sometimes -- there are only so many things I can do in a day. And my to-do-list is far from emptying itself faster than I can fill it up...
Quote
XML is a far more wide adaptation than PHP, more than that, it is easier to understand than PHP's syntax.
XML: <tpl:print="hello world" />
PHP: <?="hello world" ?>
Or something like that ;)
(Okay, I'm cheating with shortcuts but...)
Quote
Unknown's syntax is based on XML, but it is not strict XML per se. TOX-G uses a custom parser and not any standard parser(It doesn't even need the most basic XML plugins for PHP).
Yeah... They all suck anyway. Well, in my opinion. Do you remember when I built my CSS preparser from a XML parser? Just by rewriting it into a 100% PHP solution, it suddenly was twice faster to parse. (I know I only had two different xml tags to parse, but still... Complex nesting and all.)
Quote
Hence the reason I could implement <we:if "expression">, < tpl:something > will not break things since it'll be treated like a string, <tpl:something> will since tpl is a reserved namespace and it is unclosed, but it'll give a nice error message! And yeah, TOX-G can self-close tags :P.
As we said last time -- I like Tox-G, and I like the way Unknown solves problems, but I can't deal with it all by myself. If you guys went ahead and converted the templates for us, it would sure be nice. Right now, the best I can do is look through all of the non-admin templates, split them into as many sub-functions as required, and use PHP/HTML mode switching instead of echo's. Really... Best I can do, theoretically.
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 05:08 PM
I can't do a damn regardless until I get to see the code, so I guess we'll wait till you release something. Till then, I'm waiting patiently :).
Title: Re: Plugin hooks
Post by: texasman1979 on April 1st, 2011, 05:09 PM
...
Title: Re: Plugin hooks
Post by: MultiformeIngegno on April 1st, 2011, 06:26 PM
I think that for "yall" he means "you all"... :unsure:
Title: Re: Plugin hooks
Post by: texasman1979 on April 1st, 2011, 06:41 PM
yalled be just as lost in texas as i would in france or england. lol
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 07:35 PM
@Dragooon> But you never actually asked for Consultant status...?
Quote from texasman1979 on April 1st, 2011, 05:09 PM
man i love you and arantor, yall are the coolest Europeans i know. :)
Out of 350 million? I think it's just luck :p
Quote
I'm unlike most anyone you have ever met, American or not.
Well I've met my share of unusual people... The most unusual probably being me :P
Quote
I started programming with a TI-81 calculator. When i went to college in 2002, I had never seen the internet but a few times. Since then, however, i have embraced it, almost completely, in one form or another. I have 6 computers, 3 vps's, and 4 domain names.
I have, err.... one computer. And zero VPS. Do my 30+ domain names count? ;)
Quote
What I am expressing in past posts is not theory or an example of practice. It is merely raw logic from more than half a year of customizing my own version of SMF, at the same time you were.
I customized noisen.com for several years too -- little did I know that it would be MUCH harder to actually turn it into a usable generic forum package. Oh my... And I'm not even done.
Quote
It may not appear so at times, but i come with only good tidings and my best advice/input that i can come up with.
I'd like to make it mandatory for everyone to post a blurb about themselves before posting in these boards, but I don't like enforcing rules... I believe in freedom, but sometimes it's hard to get along with everyone when they just come, post what they have to post, and leave. See what I mean?
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 07:51 PM
There's two separate discussions here.

The nature of TOX-G does solve a great many of the issues that we will have. It opens other doors that have to be confronted too, but all in all I think it could be a benefit if leveraged correctly.


I am going to say this once, and only once, so listen up.

The hooks are being considered an afterthought. Yes, in their original implementation they were. Scattering a crapton through the source deals with that. Even then, it's still going to be an afterthought.

Hooks by design are an afterthought. There's no way on earth you can build a hook based system that isn't essentially an afterthought. Can't be done, it's an inherent aspect of the design itself.

The thing is, I see some stuff about extending the use of hooks but even that's still basically an afterthought.
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 07:56 PM
Pete, what about the template hooks I discussed earlier?
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 08:10 PM
Quote from Nao/Gilles on April 1st, 2011, 07:35 PM
@Dragooon> But you never actually asked for Consultant status...?
I thought that would be ridiculous and would potentially piss you off.
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 08:11 PM
Quote from Nao/Gilles on April 1st, 2011, 07:56 PM
Pete, what about the template hooks I discussed earlier?
I saw it in passing, brain has been elsewhere dealing with family politics (I went to see my mother, dealt with the reasons I haven't spoken to her since last summer), need to have a think about it.
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 08:25 PM
@Dragooon> Why would it piss me off?
You're an excellent coder, I had a thrilling experience with you on SMF Media Gallery, I like you, and although you're occasionally upsetting -- who am *I* to speak? :lol:

@Pete> I noticed you weren't there much today... Is it gonna be okay?
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 08:27 PM
Quote from Nao/Gilles on April 1st, 2011, 08:25 PM
@Dragooon> Why would it piss me off?
You're an excellent coder, I had a thrilling experience with you on SMF Media Gallery, I like you, and although you're occasionally upsetting -- who am *I* to speak? :lo:
What did I upset you about? :P.
But if you think it is fine then go ahead, I wouldn't mind access. I won't guarantee any participation though :).
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 08:28 PM
Quote
Pete> I noticed you weren't there much today... Is it gonna be okay?
We spent 3 hours shooting the shit, it's all good. I mean, I figured that anything other than getting the door slammed in my face had to be good ;)
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 08:41 PM
Good for you Pete ;)

Can you give Shitiz SVN read access? (Well, if you agree of course :P)

And Dragooon -- you know the drill I suspect? No sharing what you get with anyone (not even your dad). If you have any doubts, ask us in private!
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 08:45 PM
Quote from Nao/Gilles on April 1st, 2011, 08:41 PM
And Dragooon -- you know the drill I suspect? No sharing what you get with anyone (not even your dad). If you have any doubts, ask us in private!
You're basically asking me to not share anything with anyone right? If so, that's fine. I won't even tell you guys!
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 08:47 PM
Sure thing :)

Dragooon, I'll PM you the details of the repo shortly. And that wasn't *quite* what Nao meant :P
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 08:54 PM
Badge updated as well ;)
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 09:06 PM
Wait, I can actually commit?
Title: Re: Plugin hooks
Post by: Arantor on April 1st, 2011, 09:10 PM
RH's permissions page says read only...
Title: Re: Plugin hooks
Post by: live627 on April 1st, 2011, 09:11 PM
AFAIK, all consultants have read-only access
Title: Re: Plugin hooks
Post by: Dragooon on April 1st, 2011, 09:12 PM
Ah okay, I can't make things explode now. Good :D
Title: Re: Plugin hooks
Post by: Nao on April 1st, 2011, 10:37 PM
Quote from Dragooon on April 1st, 2011, 09:06 PM
Wait, I can actually commit?
No, but feel free to point out any code you think could be improved or added :)
Title: Re: Plugin hooks
Post by: MultiformeIngegno on April 1st, 2011, 11:28 PM
Great! :)
Title: Re: Plugin hooks
Post by: dazed on April 2nd, 2011, 02:39 AM
Quote from Nao
I'd like to make it mandatory for everyone to post a blurb about themselves before posting in these boards, but I don't like enforcing rules... I believe in freedom, but sometimes it's hard to get along with everyone when they just come, post what they have to post, and leave. See what I mean?
Sure glad you didn't do that, as I would be on the outside l00king in.  :o

I'm a long story that no one want's to hear anyway. Let's say that I have followed Nao and Pete around for the last 18 months.

I'm retired now from coding, but I do love to read what you guys are up to. Yes I will convert the few smf sites I Admin to Wedge when released. In the meantime I sure hope "y'all" :lol: do not mind me just hanging and reading.  :ph34r:

Title: Re: Plugin hooks
Post by: Nao on April 9th, 2011, 01:07 PM
Of course we don't mind. :)

If anything, we opened the website to the public for a reason!
Title: Re: Plugin hooks
Post by: Artur on April 18th, 2011, 10:39 PM
Quote from texasman1979 on April 1st, 2011, 05:09 PM
...
I see ellipses everywhere  :unsure:
Title: Re: Plugin hooks
Post by: Arantor on April 18th, 2011, 10:41 PM
Looks like he removed all his posts, which he is free to do. He feels we weren't very nice to him, but in deference, I didn't think he was very nice to us in the first place.
Title: Re: Plugin hooks
Post by: Nao on April 19th, 2011, 07:34 AM
Yeah. Free To do whatever he wants. Including wasting our precious time with immature behavior. Not a big loss IMO.
Title: Re: Plugin hooks
Post by: Dismal Shadow on April 19th, 2011, 01:47 PM
He learned his lesson then.
Title: Re: Plugin hooks
Post by: Nao on April 19th, 2011, 03:12 PM
Hopefully we too :p
Title: Re: Plugin hooks
Post by: Arantor on April 19th, 2011, 04:00 PM
Yeah, like where the ban hammer is :P
Title: Re: Plugin hooks
Post by: Nao on April 19th, 2011, 05:19 PM
Sorry, I'm a non-violent! And thus, because of my beliefs, I will only resort to libel, slander and vilification to get someone out of my way. That's who I am. 8-)
Title: Re: Plugin hooks
Post by: CJ Jackson on April 20th, 2011, 12:49 AM
Quote from Nao/Gilles on April 19th, 2011, 05:19 PM
I will only resort to libel, slander and vilification to get someone out of my way. That's who I am. 8-)
Isn't defamation the SMF team ways as well? Didn't they use defamation to get you out of their way?  :D

I am aware that truth is an excuse for defamation, but lies are not.  I know you don't lie.  ;)
Title: Re: Plugin hooks
Post by: Nao on April 20th, 2011, 08:11 AM
Quote from CJ Jackson on April 20th, 2011, 12:49 AM
Quote from Nao/Gilles on April 19th, 2011, 05:19 PM
I will only resort to libel, slander and vilification to get someone out of my way. That's who I am. 8-)
Isn't defamation the SMF team ways as well? Didn't they use defamation to get you out of their way?  :D
Yeah you're right, my tools of destruction are just my art of talking. My words aren't defamation, they're just the cold truth. :niark: Problem is, usually people trust not those who tell the truth, but those who have the biggest reputation. Which is probably SMF, right now, as opposed to Aeva Media and SimpleDesk together. But it is changing, slowly -- look at the number of new users here, even after our signatures were censored over there... ::) Get your weapons ready!
Quote
I am aware that truth is an excuse for defamation, but lies are not.  I know you don't lie. ;)
"I peed my bed last night! I played with my cousin's wiener!"

(Sorry, just watched that particularly funny episode of South Park yesterday :P)