Ticking away the moments that make up a dull day

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Ticking away the moments that make up a dull day
« on November 10th, 2011, 03:32 PM »
OK, so what's been happening in the last month? It's been... pretty busy, actually. 71 commits since the last blog post, including:

* OpenID got removed
* some purging of $scripturl from the system in favour of a cleaner method of handling it
* links to profiles now get coloured by membergroup colour through the code (if the current user is not able to visit other profiles, the link is removed, saving bandwidth and preventing search engines from repeatedly trying links that won't go anywhere)
* improved replacement of fetch_web_data, that allows for using cURL on hosts that support it (which is cleaner), and for images on remote servers, attempt to only get as little information as possible for the image rather than the entire image itself, which is great for massive photos, for example
* quite a few new hooks
* Noisen-like thoughts system added

Not to mention various clean-up and overhauling of structures internally.


Today, though, I'm going to talk a little about what I've been working on... the calendar.

If you were to go back through the threads, you'd probably find the earliest discussions on it a year ago trying to find reasons to keep it or lose it, arguing both in favour of keeping it core and turning it into a plugin. At the time the conclusion was that we could keep it and see if we could find reasons to make it worth keeping.

But interestingly, a year later, I'm still having trouble finding reasons to keep it core, when I can make it a plugin and give it better treatment that way.

So, that's what I'm doing, and I'm actually more surprised than I thought I'd be when I realised how intertwined the calendar really was in SMF's core (and, thus by extension, Wedge's core)

If you're curious, just do a search for 'calendar' on the SMF 2.0 codebase, even before you get into all the places where it's just a cal_ prefix, it's hundreds. Far more than I certainly expected, but it's interesting to note that it's prompting new hooks and new ways to extend things that I'd never have thought of.

For example, SimpleDesk came with its own maintenance/find-repair routines. Had I been thinking about it, I'd probably have integrated that into the general find/repair routines, if there were a convenient way of doing so. Which there wasn't, but now there is, so that's good.

It does also suggest one thought to me; the SMF team have long since indicated that it is a desire of theirs to do much the same thing. The one lesson I would take from this, and it is quite important to understand this, is that doing it in the SMF methodology of file edits... this would be beyond a nightmare.

I haven't even gotten to the display or posting pages yet and I've still modified:
* index.php (to remove the calendar action)
* Admin.php (for the admin menu)
* Class-DBPackages.php (to remove the calendar tables from the list of reserved tables)
* ManageMaintenance.php (to remove the calendar tables from the list of tables considered by the old converter[1])
* MoveTopic.php (to remove functions that update calendar entries when moving topics plus adding a hook for the same)
* RemoveTopic.php (to remove the code called when deleting a topic, so that the calendar is updated at the same time)
* RepairBoards.php (to remove the code from find/repair for the calendar, and adding a hook for the same)
* Subs-Boards.php (to remove the code deleting calendar items when deleting a board, and adding a hook for the same)
* Who.php (to remove the entry regarding permission to view the calendar)
* various language files, notably Admin, Help, ManageMaintenance, Who

Naturally all the removed code is converted to hooked functions, and Calendar.php, Calendar.template.php, ManageCalendar.php, ManageCalendar.template.php and Subs-Calendar.php aren't in the trunk any more

That's also not all of it, either, there's plenty more. I still have 323 mentions of 'calendar' to clean up in the source, and some of those - just for fun - are calendar_month and calendar_day language strings that aren't calendar uses (paid subs, if you're wondering)

But that should indicate how big and complicated the calendar was, and if it's just converted to a mod, it's going to be pretty vile to maintain because of all the edits it necessarily has to make to make everything else work. Doing it without a proper plugin setup is just madness if support is to be a realistic goal, IMO.

I'm actively adding support for things as I go to make it possible to make the conversion, and I hope that if the SMF team are seriously considering it, that they either read this and do something about it, or more likely that they come up with their own game plan as to making extensions fundamentally cleaner to write, because allowing it to go on to be a classic mod is simply a very bad idea.
 1. That whole function is probably obsolete now, though.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial


Re: Ticking away the moments that make up a dull day
« Reply #2, on November 10th, 2011, 03:50 PM »
Scary is not the word I would use for it. The word I *would* use is not for polite company, as it contains f***.

It doesn't help that I don't really know the calendar, this is the first time I've ever really looked at it but I'm amazed at how many tendrils it has everywhere, especially since anything that so much as breathes on topics pushes the calendar items to get uncached.
Posted: November 10th, 2011, 03:45 PM

Also, it's prompted me to do something else: fix cache_quick_get.

It's one of those things that I always meant to do, because it still does a require with $sourcedir, rather than use loadSource but I never got round to actually making it use loadSource. Well, now I have to fix it, otherwise the calendar is going to break.

(Same deal as elsewhere, if $file is a string, loadSource() it, if it's an array, it's a plugin id + filename to load through loadPluginSource)
Re: Ticking away the moments that make up a dull day
« Reply #3, on November 10th, 2011, 06:10 PM »
Also, the more I look at it, the more I realise the calendar has had little love in its life. The help text for 'cal_enabled' is a single item that lists everything on the page, is also a bit out of date :(


Re: Ticking away the moments that make up a dull day
« Reply #6, on November 10th, 2011, 11:14 PM »
I already pretty much said that I was going to implement recurring events anyway, in the calendar plugin, but I'm seeing a more compelling reason to do so: to improve holidays support.

Right now it's implemented as a fun happy list inserted into a table, but really, that's not the way to do it, I feel. It sort of is a recurring event of sorts (at least, the exactly-annual ones are) but there's no reason why things can't be implemented a bit more nicely.
Posted: November 10th, 2011, 11:08 PM

Or at least, some way of making it more sane to add/remove chunks of them. Perhaps give the mod many many dates and have it just only show the ones the admin is interested in. I can think of several ways that can be done performantly, too.
Re: Ticking away the moments that make up a dull day
« Reply #7, on November 11th, 2011, 12:51 AM »
OK, so here I am an hour later, still hacking away at this. I've been on this most of today trying to unwrap it from the core... it's insane how much effort went into integrating it when you really get up close and personal with it.

I'm not regretting it, only frustrated with it. I'm just working on the post form and discovering more and more things I never realised about its complexity beforehand, and more things that will have to be amended and made available to hooks. This sort of thing is scary-deceptive, and for anyone who follows in these footsteps, you have my blessing and my deepest sympathies.
Posted: November 11th, 2011, 12:24 AM

OK, now I discover that this is ridiculous.

If you post an event with a topic, but there's something wrong with the calendar post part, the topic will *still be inserted* anyway. It doesn't reflow back to the posting page for you to fix it! (And, you can't fix and resubmit because there's a submit-once check that isn't always cleared either. Yay.)



Re: Ticking away the moments that make up a dull day
« Reply #11, on February 2nd, 2012, 05:23 PM »
Hi, keyrocks...

I am new here... spent some time browsing after registering to get a good idea of what Wedge was all about. It all looks quite promising and it appears Wedge promises to be a great improvment over SMF. Anyway... I figured I'd break the "dull day" silence on this thread...  :cool:

I've been exploring SMF 2.0.2 offline (localhost) on my dev server for a couple of weeks now (off and on)... installed the Tiny Portal kit... and was looking for a way to add threaded discussions... which led me to Nao's threaded view mod (reply #12, August 2008) - http://www.simplemachines.org/community/index.php?topic=255510.msg1665654#msg1665654 ......... (which isn't worth adding now considering the amount of time that has passed since it was posted) and that led me to... Wedge!

One thing tho... I can't seem to find any reference as to when Wedge might be released.
Question: When will we see a finished package available for download?  :thanks:


Re: Ticking away the moments that make up a dull day
« Reply #12, on February 2nd, 2012, 05:51 PM »
Quote from keyrocks on February 2nd, 2012, 05:23 PM
One thing tho... I can't seem to find any reference as to when Wedge might be released.
Question: When will we see a finished package available for download?  :thanks:
Hi, and welcome!

It's all right there in the FAQ. (you did read the FAQ right?)  :whistle:
Quote from Nao on October 1st, 2010, 06:30 PM
- Our current target release dates: early 2012 for the demo, an alpha version one to three months later, a beta version one to three months after that, and summer/autumn 2012 for the stable release.


Re: Ticking away the moments that make up a dull day
« Reply #14, on February 2nd, 2012, 06:41 PM »Last edited on February 2nd, 2012, 07:07 PM by keyrocks
Quote from Drunken Clam on February 2nd, 2012, 05:51 PM
Hi, and welcome! ........ It's all right there in the FAQ. (you did read the FAQ right?)  :whistle:
Thanks, yes, I did read the FAQ but it appears I missed it. My apologies.  :blush:
For anyone else who may come across this thread...
Quote from FAQ
Our current target release dates: early 2012 for the demo, an alpha version one to three months later, a beta version one to three months after that, and summer/autumn 2012 for the stable release.
Thanks for point that out Arantor... much appreciated. Next question... do you have a mail list for those who would like to receive notification of when the alpha, beta and stable packages are released? If so, please add my email to the list.  :thanks:

As one suggestion... perhaps people like me would not just wander in... glance around... and ask the same question over and over again if there was a fairly visible notice on the Home page... in the side-bar right over the PROFILE block would do it. Like something titled... Estimated Release Dates: etcetera. Updating the F-B page would be a good idea too... http://www.facebook.com/wedgebook

In summary... you've taken on an admirable project, and I do understand the amount of time one puts into such projects in between the other pursuits of life. I've been working on a CMS fork for 2.5 years now... no announcments tho until it is actually ready for the road. :cool:

Re: Ticking away the moments that make up a dull day
« Reply #15, on February 2nd, 2012, 07:14 PM »
When it's ready we'll send out a forum announcement, seems the easiest way to do it.

But publicising the date as suggested won't solve the problem, it'll make it worse because should anything happen that causes the date to miss, you can guarantee people will complain.