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 - Dragooon
286
Plugins / Re: Forcing maintenance mode first?
« on January 21st, 2013, 03:34 PM »
I guess it makes sense for large forums, option can't hurt.

PS: Is there an emergency disable all plugins option? Couldn't find one in Settings.php
287
Plugins / Re: Another little plugin: topic buttons
« on January 21st, 2013, 03:24 PM »
Quote from Arantor on January 21st, 2013, 11:37 AM
I think that's what I did, yeah.
Cool, was just confirming. Did the same.
288
Plugins / Re: Another little plugin: topic buttons
« on January 21st, 2013, 10:27 AM »
How are you manipulating the menus? Hook on display_main and manipulating nav_buttons?
289
Plugins / [Plugin] Re: Notifications system (1.0)
« on January 20th, 2013, 03:24 PM »
Quote from agent47 on January 20th, 2013, 10:02 AM
Tried to give this plugin a test but got this error:
Quote
This plugin cannot be used because:
One or more features required by this plugin are not available. (notification_callback, notification_subscription)
You also need to enable WeNotif and WeNotif-Subs before being able to enable this plugin. And I seriously don't recommend trying it out just now, it's still very early in development.
290
Plugins / [Plugin] Re: Notifications system (1.0)
« on January 20th, 2013, 08:57 AM »
Quote from Arantor on January 20th, 2013, 01:32 AM
Shiny :)
Yup :), it's working out okay. The core plugins still need a lot of work (I need to work on it during daytime more, the code needs tidying up), but the basic structure should remain same. The topics extension is more or less complete, I don't think it should need anything more except a couple of things that are todo, what do you think of the code (simplicity wise) itself? It's a complete implementation for topic subscription, any other plugin will have to do similar things to add their own notification subscriptions.
291
Plugins / [Plugin] Re: Notifications system (1.0)
« on January 20th, 2013, 12:39 AM »
Okay, this is the first working example of a subscription plugin: https://github.com/Dragooon/WeNotif-Subs-Topics

It allows one to subscribe to topics, coded in about 30 minutes at 4:30 AM so it's still very rough and a bunch of things are still left to do, but it seems to be working fairly fine. You can see how a subscriber is implemented, this should give a nice example of one.
292
Plugins / Re: Plugin dependency loading
« on January 20th, 2013, 12:12 AM »
Quote from Arantor on January 20th, 2013, 12:10 AM
Given how many files that could require per page? No.

The whole point of hooks having loading function is that they load what they need when they need it - forcing it to load everything up front adds a *massive* weight.
Posted: January 20th, 2013, 12:08 AM

I should also add that I personally don't write a lot of interfaces, so this would simply have never occurred to me as a potential issue.
Fair enough, autoloader can work. Or I can simply split my files into two, dunno why that didn't occur to me earlier.
293
Plugins / Re: Plugin dependency loading
« on January 20th, 2013, 12:06 AM »
Quote from Arantor on January 20th, 2013, 12:05 AM
OK, so I see the problem.

Multi inheritance is inherently (pun not intended) is voodoo, seems to me the solution is for plugins to be able to declare an autoloader?
I was thinking more alongs the line of including all the plugin files in some priority before actually calling the hooks?
294
Plugins / Re: Plugin dependency loading
« on January 19th, 2013, 11:58 PM »
Quote from Arantor on January 19th, 2013, 11:53 PM
So what's the problem then? Plugin C won't be *loaded* until the hooks are called from A and B.
See it goes like this, plugin A declares a PHP interface interfaceA and B declares another interface interfaceB. Both A and B have callbacks for load_theme in which they initiate another hook call each. Now before this their plugin files are not included since they're not called. Let's assume A has a higher priority than B which has a higher priority than C (A > B > C).

C comes in, and adds callback for the hooks called by A and B. Now C's PHP files uses both interfaceA and interfaceB, A will call C's hook callback but this will be before B gets a chance to load it's PHP file. And it'll end in a parse error.
295
Plugins / Re: Plugin dependency loading
« on January 19th, 2013, 11:52 PM »
Quote from Arantor on January 19th, 2013, 11:49 PM
explain 'both hooked by C'?

But still sounds like C needs a lower priority than both A and B.
"Both hooked by C" means that C calls both the hooks declared by A and B which they call during load_theme callback. C does have a lower priority than A and B, in this situation one will call before the other and cause the parse error.
296
Plugins / Re: Plugin dependency loading
« on January 19th, 2013, 11:39 PM »
Okay...how do I solve this then, I have three plugins. A, B, C.

C requires both B and A to be included before throwing a parse eror. Both B and A hook into load_theme and call two individual hooks, both of which are hooked by C. Now if either calls the hook, it throws a parse error since the other is not loaded.
297
Plugins / Re: Plugin dependency loading
« on January 19th, 2013, 11:18 PM »
Quote from Arantor on January 19th, 2013, 11:18 PM
That's why they can set priorities :D
Wait, what?
298
Plugins / Plugin dependency loading
« on January 19th, 2013, 11:15 PM »
This is a pretty tricky topic, if a plugin B relies on a plugin A and Wedge loads plugin B before A, there's a good chance it'll crash and burn (especially in my case since I use class interfaces and all). Perhaps they should be loaded in the order they're enabled?
299
Other software / Re: Discussing Elkarte on wedge.org
« on January 19th, 2013, 06:09 PM »
Quote from Nao on January 19th, 2013, 06:06 PM
Great minds again. Until last week I thought it was pronounced meme (meh meh). Then I heard someone in a video say the french word for mime. Meem as you say. I think it was in the latest big bang theory.
Posted: January 19th, 2013, 06:05 PM

I typed mémé but android insisted on changing it to meme eh eh...
Same! I also realised from the one of TBBT's episodes that it's pronounced meem and not me-me.
300
Other software / Re: Discussing Elkarte on wedge.org
« on January 19th, 2013, 05:54 PM »
This is probably appropriate[1]

 1.  Appropriate in context, not in the sense of actually posting it in this thread :P