New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #660, on March 5th, 2011, 08:16 PM »
rev 639
(4 files, 13kb)

+ Implemented string cutter, direct from Aeva Media. Hopefully it works. (Class-String.php)
* Cut prev/next topic titles if they're too long for the header. (Display.php)
- No need for the top subject template anymore... (Display.template.php, topic.js)
Re: New revs
« Reply #661, on March 5th, 2011, 10:13 PM »
rev 640
(8 files, 11kb)

* Moved "Read x times" to the sidebar, and added sidebar stats for boards/blogs and topics. (Display.php, MessageIndex.php, Display.template.php, MessageIndex.template.php, index language files)
! Fixed wrong margin in the sidebar userbox. (index.css)
! Pixel-perfect. (Pastel/index.css)

NB: It'll be longer to implement actual per-board stats, though... Just getting the number of posts and topics is boring. We need something like Noisen with the number of different posters as well as specific stat pages for each board.
Re: New revs
« Reply #662, on March 6th, 2011, 12:14 AM »
rev 641
(1 file, 5kb)

+ A short but nice one... Drop a "custom.css" file to any of your style folders, and you can change that styling without the need to create a sub-styling (or, worse, editing the supplied styling files.) (Subs-Cache.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #663, on March 6th, 2011, 01:42 AM »
Revision: 642
Author: arantor
Date: 00:42:06, 06 March 2011
Message:
! Incorrect sprintf formatting in English string (index.english.php)
! Fixed board RSS feeds having Array instead of the board id (index.template.php)
----
Modified : /trunk/Themes/default/index.template.php
Modified : /trunk/Themes/default/languages/index.english.php
Re: New revs
« Reply #664, on March 6th, 2011, 03:48 AM »
Revision: 643
Author: arantor
Date: 02:43:21, 06 March 2011
Message:
! Attempt to fix ordering for prev/next topics (Display.php)
----
Modified : /trunk/Sources/Display.php


OK, this is a WIP fix. It deals with all the cases where we don't need the poster's name (first poster/last poster), I thought this was supplied by $topicinfo but it isn't.

The second problem is that invariably, the second query in the UNION sucks, and I mean *really* sucks. Right now I'm seeing 1.5s or more, but the reason is the way MySQL handles that selection on my 209k topic board; it's not using an index because it figures a table scan will be faster, but ultimately ends up filesorting the lot - here's the subselect on its own:

Code: [Select]
EXPLAIN SELECT t2.id_topic
FROM wedge_topics AS t2
INNER JOIN wedge_messages AS mf ON ( t2.id_first_msg = mf.id_msg )
WHERE t2.id_board =1
AND t2.id_topic <209240
ORDER BY t2.is_sticky DESC , t2.id_topic DESC
LIMIT 1


id   select_type   table   type   possible_keys   key   key_len   ref   rows   Extra
1   SIMPLE   t2   range   PRIMARY,first_message,id_board,last_message_sticky...   PRIMARY   3   NULL   209239   Using where; Using filesort
1   SIMPLE   mf   eq_ref   PRIMARY   PRIMARY   4   wedge.t2.id_first_msg   1   Using index

(t2 used in case MySQL was crapping itself between what t was, but it doesn't matter in this case, it makes no difference)

We gotta figure out a better way of handling this, it's not even using the primary key as a sorting criteria. :( But at least the ordering seems to be right now for the given criteria...
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

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #665, on March 7th, 2011, 10:03 AM »
rev 644
(16 files, 50kb -- all of my changes from this weekend. Didn't get to commit them until now.)

! Fixed a couple of bugs in westr::strlen and westr::strpos. (Class-String.php)[1]
* Rewrote theme thumbnail system to use thumbnail.jpg (instead of thumbnail.gif) and have them in their corresponding style folders, rather than in the images folder. (Themes.php, Themes.template.php, thumbnail.gif, Settings.english.php, Settings.french.php)
* Modified terminology of "child boards" to become "sub-boards" instead. Kept all variable names, we're only changing the English language for this. (LANGUAGES: Help, index, ManageBoards, ManageMaintenance, Profile)
! Fixed some minor font issues in the menu system. They were apparent in Windows XP + ClearType, maybe in other systems too. (index.css)
+ Added TEMPORARY thumbnails for Warm, Pastel and Wine. Need to do them again with a clean install... (thumbnail.jpg)
 1. Still warrants a recheck ;) Most notably, I'm not sure why there's the STRPOS* const at all, since basically it's only being used alongside "|." and could easily be replaced with "ENTLIST|." if you catch my drift.)
Re: New revs
« Reply #666, on March 7th, 2011, 06:57 PM »
rev 645
(22 files, 33kb)

+ Added a RSS icon for board categories. (BoardIndex.template.php)
+ Added ability to prevent a small image from being inlined in CSS files, through url-no-base64(). Useful for graphics that only show up in the admin area, things like that. Although really you want to put these declarations to admin.css instead... (Class-CSS.php, sections.css)
* Rewrote the toggler object to avoid wasting hits on graphics. bToggleEnabled was removed (if you don't want to run the toggler, just don't initialize it in the first place), srcExpanded and srcCollapsed are replaced with background positioning. Converted most togglers, more left to do. (BoardIndex.php, script.js, stats.js, topic.js, index.css, sections.css, foldable.gif, shrinkable.png, sortselect.gif, TEMPLATES: Admin, BoardIndex, BoardIndexInfoCenter, Display, index, ManagePermissions, Packages, PersonalMessage, Post, Search, Stats)
! Fixed default styling's thumbnail in theme picker, in case the default isn't in the root. (Themes.template.php)
! Fixed styling in daily stats called through Ajax. (stats.js, sections.css)

NB: I've tested 95% of all togglers. Hopefully, there aren't any bugs left... I know, the new system is less flexible (requires spriting your stuff, and having it in doubled square dimensions, e.g. 20px*40px or 12px*24px), but OTOH it saves a hit, and it has less 'glitches' than the SMF method. That's why, ultimately, I figured the pros outweighted the cons.
Re: New revs
« Reply #667, on March 7th, 2011, 09:18 PM »
rev 646
(17 files, 17kb)

* Reworked the toggler spriting system to use a class toggler instead of changing background-position. This way, spriting is no longer mandatory, and two different images can be used in the CSS. (script.js, stats.js, topic.js, sections.css, TEMPLATES: index, ManagePermissions, PersonalMessage, Search)
* Don't bother specifying altCollapsed and msgCollapsed if they're identical to altExpanded and msgExpanded. (BoardIndex.php, script.js, stats.js, TEMPLATES: Admin, BoardIndex, index, ManagePermissions, Packages, Post)
! Fixed stats header layout and colors. (Stats.template.php, index.css, Wine/index.css)
* Converted category collapse code to the new system. (Subs-BoardIndex.php)
* Improved header in Wine. (Wine/index.css)
Re: New revs
« Reply #668, on March 8th, 2011, 01:05 AM »
rev 647
(21 files, -4 files, 19kb)

* Converted maintenance area to use sprited collapse, and fixed code in the topic management page. (ManageMaintenance.template.php)
- Removed earlier files that are no longer used anywhere in Wedge. (collapse.gif, expand.gif, upshrink.png, upshrink2.png)
* More Wine style details. (Wine/index.css)
* Rewrote silly array[array.length] = x calls into array.push(x)... (smfinfo.php, Class-Editor.php, ManageSmileys.php, editor.js, fader.js, post.js, script.js, spellcheck.js, stats.js, topic.js, TEMPLATES: Calendar, Display, ManageCalendar, ManagePaid, MessageIndex, PersonalMessage, Post, Search)

Note: generateDays() uses dayElement.options[dayElement.length]. It should probably be dayElement.options[dayElement.options.length] and I treated the conversion this way. Hopefully nothing was broken in the process... I only tested the JumpTo stuff (it works fine.)
Re: New revs
« Reply #669, on March 8th, 2011, 03:16 PM »
rev 648
(8 files, 15kb)

* Plenty of fixes, simplifications and optimizations for string-related functions. (Class-String.php)[1]
* Rewrote string cutter to: fix strlen/substr when mb_* functions aren't available, fix mb_* when available (forgot to force them to UTF), and avoid cutting the ellipsis in half with a soft hyphen. Yes, it was possible to do that... Uh. (Class-String.php)
* Renamed {query_see_only_board} to {query_list_board} and {query_wanna_see_only_board} to {query_wanna_list_board}, and related variables. It means 'make sure the board can be listed', as opposed to not only listed, but also browsed. (Load.php)
! Added query_wanna_see_board to ssi_topTopics() for very large boards. If performance is an issue... Just don't use SSI, all right? (SSI.php)
* Replaced operator/notoperator with proper >/< signs. Saves a bit of processing time... (Display.php)
* Made the category collapse image stylable. (Subs-BoardIndex.php, sections.css)
* French translation tweak. (index.french.php)
* Single-byte-nazi. (Class-Editor.php)
 1. Pete, if you're unsure about any of these, feel free to ask and I'll explain my changes ;)
Re: New revs
« Reply #670, on March 8th, 2011, 07:53 PM »
rev 649
(30 files, 33kb... All done manually and double-checked at commit time >_<)

- Replaced all <label for="..."> occurrences with just <label> whenever it was possible. (install.php, Display.php, Profile.php, Subscriptions-PayPal.php, SSI.php, TEMPLATES: Admin, Display, ManageBans/Boards/Maintenance/Membergroups, ManageMembers/News/Paid/Search/Smileys, Memberlist, ModerationCenter, MoveTopic, Packages, PersonalMessage, Poll, Post, Profile, Register, Reminder, Reports, Search, SplitTopics, Themes)

NB: I removed the associated id in a minority of cases -- stopped when it proved too dull to do as I had to check whether JavaScript used these ids at all. Sounds like a job half done, but... 'screw you, I'm going home.' All I can say is that it's best to remove the id in loops (I tried to do it as much as possible), and in pages that get visited often. (Didn't look hard for these, though. But I know the setting pages in the profile area don't seem to use the id's too much. Or at all. Still -- I'm done. Too boring!)

:edit: I also didn't touch some of the 'other' folder's files. Too boring, once again, for files we may not even keep...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #671, on March 11th, 2011, 10:58 AM »
Revision: 650
Author: arantor
Date: 09:50:11, 11 March 2011
Message:
! Fix ordering to support topic starter/last poster name sorting. It's not pretty, but it's not a common case, and there isn't really a way to optimise it any better without nailing up queries that will have even more impact. (Display.php)
----
Modified : /trunk/Sources/Display.php

Posted: March 11th, 2011, 10:50 AM

Revision: 651
Author: arantor
Date: 09:57:52, 11 March 2011
Message:
! Remove the ambiguous (and often unnecessary) join that should have been committed last time, oops. (Display.php)
----
Modified : /trunk/Sources/Display.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #672, on March 11th, 2011, 03:09 PM »
rev 652
(2 files, 7kb) -- just so that I can focus on other things...

* Removed $ent_list and $ent_check variables from westr (not used), and replaced them with $can_mb, which determines whether mb_* functions are supported. Maybe it's slower than an is_callable, I don't know, I don't care. (Class-String.php)
* Force UTF-8 encoding on mb_* functions. Just wanted to point out that UTF-8 is not always the default charset in mb functions. (Class-String.php)
! Fixed an undefined index in westr::strpos(). (Class-String.php)
* Made westr::strlen() about 3 times faster by saving an extra round of preg_replace and using mb_strlen if available. (Class-String.php)
* Tweak on poll option margins. (sections.css)
Re: New revs
« Reply #673, on March 13th, 2011, 09:26 PM »
My work for the weekend... (Not including a few WIPs.)

rev 653
(5 files, 10kb)

+ Added support for automatic quote splitting. (editor.js, post.js)
* Allow single-character selectors (a, p...) to extend something else. (Class-CSS.php)
! Fixed self::strlen() not working in itself. (Class-String.php)
! Fixed regression in preg_split's. (Class-String.php)
! Fixed in-topic moderation checkboxes. (topic.js)
Posted: March 13th, 2011, 08:47 PM

rev 654
(2 files, 8kb)

+ Added a 'wip' folder (Works in progress), because we need some place to commit stuff that is either not finished but could use retooling, or finished but not actually used anywhere. (other/wip, other/wip/text-overflow.js)
* Minor restyling of topic titles. (sections.css)
Re: New revs
« Reply #674, on March 13th, 2011, 11:23 PM »
rev 655
(2 files, 6kb)

* Wedge now correctly uses the current list of protected and self-closed tags (disabled or not), to build the list of exceptions for the auto-quote splitter. (Class-Editor.php, post.js)
! Fixed selectionStart processing in IE. (post.js)
! Fixed an error in JS logic... Well, actually, fixed the error popup, not the actual error. Will need some extra work... (post.js)
Posted: March 13th, 2011, 11:18 PM

rev 656
(+1 file, 6kb... Err, the file itself is 107 bytes though :P)

! Fixed sidebar position in Firefox when in hidden mode. (gecko.css)

:edit: the bug showed up in Wine. I fixed it in Warm so hopefully it was theme-wide, not Wine-wide. Otherwise the file needs to be moved to the Wine folder ;)