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 - Arantor
2101
Features / Re: New revs
« on January 1st, 2013, 06:25 PM »
20 files, 4KB

Revision: 1821
Author: arantor
Date: 01 January 2013 17:23:05
Message:
! Clean-up of legacy code. (ManageBoards.php, ManageMembergroups.php, ManageNews.php, ManagePermissions.php, ManageSmileys.php)

! Add the membergroups settings to the admin search. (ManageMembergroups.php, Admin.php)

! Fix collision with jQuery UI and Wedge's menu by renaming Wedge's menu (so that other plugin authors can use jQuery UI without problems). (GenericMenu.template.php, index.template.php, script.js)

! Drop the old group key option from the theme settings, convert it to a normal setting and inherit the sorting from the other sources. (Settings.template.php, Boards.php, Home.php, ManageMembergroups.php, Welcome.php, SSI.php, Subs-Membergroups.php, InfoCenter.template.php, language files: Help, ManageMembers, Themes)
----
Modified : /trunk/SSI.php
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Boards.php
Modified : /trunk/Sources/Home.php
Modified : /trunk/Sources/ManageBoards.php
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/ManageSmileys.php
Modified : /trunk/Sources/Subs-Membergroups.php
Modified : /trunk/Sources/Welcome.php
Modified : /trunk/Themes/default/GenericMenu.template.php
Modified : /trunk/Themes/default/InfoCenter.template.php
Modified : /trunk/Themes/default/Settings.template.php
Modified : /trunk/Themes/default/index.template.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Modified : /trunk/Themes/default/languages/Themes.english.php
Modified : /trunk/Themes/default/languages/Themes.french.php
Modified : /trunk/Themes/default/scripts/script.js
2102
Features / Re: Badges and the displaying thereof
« on January 1st, 2013, 06:00 PM »
Nearly done with adding that.

In other news, I have absolutely no idea why the admin menu is broken on the above mentioned page. It just doesn't do any dropdowns (but the *main* menu does, so I'm really confused)
Posted: January 1st, 2013, 05:45 PM

Oh holy hell, why the hell is jQuery UI adding a shit ton of classes to ul.menu?
Posted: January 1st, 2013, 05:48 PM

OK, I figured this out. Turns out there's a really fun collision going on.

The generic menu has a .menu() function, which then gets overwritten by jQuery UI.

Given that I can see mod authors using jQuery UI for their own things, and that I don't see us rewriting it from scratch any time soon, I'm just going to rename the menu function caller in the generic menu code to wmenu for Wedge menu.
2103
Features / Re: Badges and the displaying thereof
« on January 1st, 2013, 05:19 PM »
Random question: should the membergroup legend use the same ordering? I'm thinking the answer should be yes.
2104
Off-topic / Re: Happy New Years
« on January 1st, 2013, 04:27 PM »
Quote from MultiformeIngegno on January 1st, 2013, 02:23 PM
I hope it's not as bad as 2012 has been
QFT.
2105
Features / Re: New revs
« on January 1st, 2013, 05:57 AM »
4 files, 1 added, 221KB[1]

Revision: 1820
Author: arantor
Date: 01 January 2013 04:56:49
Message:
! UI for customising badge order and visibility. It's not perfect, it could use some UI loving in places (e.g. replacing the little handle square with something nicer), but it works and doesn't throw errors. As stated elsewhere, yes, it adds a complete copy of jQuery UI to the repo, but 1) this is only used in the admin area, not every page load, and 2) it means that if others do want to use it in their own plugins, it's available. (ManageMembergroups.php, ManageMembergroups.template.php, mana.css, jquery-ui-1.8.24.js, ManageMembers language file)
----
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Themes/default/ManageMembergroups.template.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Added : /trunk/Themes/default/scripts/jquery-ui-1.8.24.js
Modified : /trunk/Themes/default/skins/mana.css
 1. This is almost entirely due to jQuery UI.
2106
Features / Re: Badges and the displaying thereof
« on January 1st, 2013, 05:53 AM »
There's no rule on that stuff for posts, only topic titles ;)

But I *could* add it to posts too :whistle:
2107
Features / Re: Badges and the displaying thereof
« on January 1st, 2013, 04:24 AM »
So I spent some time experimenting, knowing how it was set up, knowing how it was implemented I made some changes to allow for configuration of order - that was earlier today.

Now the UI. Yes, this uses jQuery UI. If someone wants to write a smaller version of ui.sortable, fine, but I'm happy with this working the way it does.

The idea is this way you can configure the order by dragging the badges around, and you can set whether badges are visible all the time, or whatever.
2108
The Pub / Re: Context object?
« on January 1st, 2013, 03:13 AM »
I could have sworn that it wouldn't work. I don't know what I did differently that made it not work, and when I stumbled on the reference to it in the study guide, I figured that it was all related, and it probably is. I don't know. I just don't want to compromise Wedge working on PHP 5.2.

The problem with stylesheets isn't the content of the stylesheet itself as such, but the content of the WeCSS loader/handler barfing over we::something. I don't know anywhere nearly enough to even begin debugging.

Re: zip class. Well, the choices are simple.
1) We don't have add plugin or auto update at all.
2) I add a 199KB class that is beyond ugly.
3) I finish writing my own class that does the job. It'll be usable when finished. The thing is it's a complete Zip class, not just the minimum required for extracting files. If I thought that was acceptable, I'd do that, but I can see the benefits of a full zip class that I can redistribute separately as well.


Also: with what I'm working on, I'm going to be adding a copy of jQuery UI. Primarily for the sortable unit but it seems that for the admin panel we could just include and be done with it. I don't have the patience or mindset to sit and write my own sortable/draggable component right now, I'd rather just run with a proven and stable one for the time being but if anyone wants to write a newer, less bulky one, go nuts. Just don't break anything :P
2109
The Pub / Re: Context object?
« on January 1st, 2013, 02:03 AM »
That's the thing, I'm not really the delayed gratification type. I like to see visible signs of progress as I go. The thought of spending two weeks staring at a piece of crap code[1] and without anything to show for it except a strong dislike of anyone else's code... yeah, it's as frustrating as it sounds.

After two weeks of attacking it, stripping it down to half size, I realised it could be done further but it would at that point be quicker just to start fresh, which I did.
 1. In his defence, he's written it as a C-style PHP script, not as a PHP destined one, so using p_ and v_ prefixes to indicate that things are pointers and local vars, not to mention dancing around returning 1 and 0 everywhere rather than actually returning values from functions. But it's still frustrating to have to clean up, especially the crazy ass indentation.
2110
Features / Re: New revs
« on January 1st, 2013, 01:54 AM »
First commit of 2013. Long may this activity continue.

(4 files, 5KB)

Revision: 1819
Author: arantor
Date: 01 January 2013 00:53:11
Message:
! Fix missing language strings in admin panel. They don't *do* anything yet, but they might shortly. (ManageMembers.english.php)

! Updated profile code to use correct function call rather than loadUserSettings... but I have the nasty feeling this isn't doing what it's supposed to be doing, since neither loadUserSettings calling we::anything or this is actually forcing a reload of the user's details. Maybe needs a new method to force reload? (Or deprotect init_user() maybe?) Either way there are times we need to be able to force reloading user data. (Profile-Modify.php)

! New DB column in the membergroups table, this time to allow for setting the display order of badges. The UI's not done, of course, but it is possible to force the order of groups for whatever reason. Even the primary group is not exempt. Also corrected one comment regarding show_when; primary group would not have a badge if show_when was set to 0 because the query simply excluded it from being loaded anyway. Now all we need is a spiffy UI for setting the order and whether they are to be displayed or not. (Load.php, install.sql)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Themes/default/languages/ManageMembers.english.php
Modified : /trunk/root/install.sql
2111
The Pub / Re: Context object?
« on January 1st, 2013, 01:03 AM »
Well, I found another bug that I've caused by my removal of loadUserSettings, which I've fixed locally, but ever since we was introduced, stylesheets are compiled but there's nothing browser specific in them, meaning menus don't have a background (which makes then practically unusable), the error log counter etc. is invisible, the background to the page is not a nice gradient but instead just blue, etc.

As far as my last point goes, yes, I could just ignore the whole package thing and just remove the add plugin setup, instead of faffing around understanding the zip format and making a nice class instead of the crap I found online (I think you'd rather I committed something around 80KB instead of a 199KB library, for example) and I'm just pissed off with how much work has gone into it with no visible benefits yet.
2112
The Pub / Re: Context object?
« on December 31st, 2012, 11:48 PM »
And I'm saying that as far as I'm aware, that won't work before PHP 5.3 for calling it outside the class.

I'm taking the Zend certification in two weeks, so I'm reading up, and in the study guide for PHP 5.3 it actually mentions this and says that it should only work in 5.3+, suggesting that it is reliant on the implementation of Late Static Binding (which would also explain the performance hit)

Mind you, I've found multiple other issues in the study guide so it wouldn't surprise me if it were actually wrong anyway. All I know for certain is, I tried to do something much the same a couple of years ago and it baulked at it because it was PHP 5.2. Whether something is slightly different or not, I don't know. Whether I did something different or not, I don't know. But I was following much the same basic approach then and it didn't work.

And I'm concerned that this effectively makes PHP 5.3 a minimum for Wedge. I'm not entirely convinced that's a bad thing, though.

I have to admit my temper is *a lot* shorter in recent times. I don't like Christmas. I don't particularly like New Year. I've spent a lot of time trying to make sense of all the changes to we::* to figure out why stylesheets aren't rendering properly any more (at all) and given up hoping that it'll just be fixed some time so that I can actually navigate the admin menus again... combined with the fact that I basically wrote all those little things last night to feel like I'm actually doing something useful rather than spending weeks farting around with something that just feels like a total waste of time.
2113
The Pub / Re: Context object?
« on December 31st, 2012, 11:23 PM »
Given that it appears to be run through the LSB code which is 5.3+ only and it's even specifically referred to in the Zend PHP 5.3 certification as such...
2114
The Pub / Re: Context object?
« on December 31st, 2012, 07:42 PM »
Ahhhh.

Now I remember why we::$user or similar wouldn't work for me when I first tried it... it's PHP 5.3 only. We just effectively made Wedge PHP 5.3+ only.

When I previously tried it I was still using PHP 5.2 which is why it wouldn't work.
2115
Features / Re: Purging users pending approval, and some other stuff
« on December 31st, 2012, 07:39 PM »
Quote
I think the default should be 30 days... Isn't that the maximum value in this field anyway?
The maximum is 30 days, yes. That just seemed like a meaningful value.
Quote
Oh, while I'm at it... I have plenty of comments/questions on your latest batch of commits, but can't bother to find the comments topic, so if you have two minutes, please bump it for me
Start new topics on the bits you're not clear on. As I said, the ban stuff is... unfinished.
Quote
I had two questions set in anti-spam, and it was set to only ask 1, so I entered 2 and saved. It then showed me '0'... I modified it again, again 0. I tried '3' and it set it to '2'... Works that way.
Considering that I totally rewrote how the questions work between how SMF did it and how Wedge does it, the odds of it keeping an SMF bug are somewhat limited...