New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1575, on May 2nd, 2012, 05:32 PM »
rev 1575
(5 files +2, 28kb) (not as scary as it sounds, though...)

+ (Finally) committing my support for mobile mode. It's quite basic, in that it shouldn't be too complicated to understand or handle. Users visiting from a smartphone or whatever will get a separate default skin setting which can be set by the admin, and they themselves can change that skin to a non-mobile one in case they'd rather have a full experience. The skin is set per-session, meaning that you can navigate your forum with your desktop and mobile browsers at the same time with the same account, and two different skins. (install.sql, Class-MoDe.php, Load.php, Themes.php, Themes.language.php)

+ Added sha1.js v2.2 to the attic. This is the 'newer' 2009 version, but it compresses to 200+ bytes worse than the current one, and doesn't add anything to the original
implementation that needed to be fixed. (other/attic/sha1_2.2.js)

@ Need to implement: the 'pick' area of the skin selector will only set the default skin for your own current mode (mobile or desktop). Need to either make that clear, or add a variable to allow setting either of those... Any volunteers to share their preference or just implement the few lines needed to do that? :P
Re: New revs
« Reply #1576, on May 2nd, 2012, 06:50 PM »
rev 1576
(4 files, 5kb)

* As seen on wedge.org, Admin and PM top-level warnings will now be in red (.warn) and other warnings will be in orange (.note). (index.template.php, index.css)

* More CSS updates. Also removing Droid Sans from Warm. (index.css, Warm/skin.xml)

+ Forgot to commit the Themes template changes for mobile mode. (Themes.template.php)
Re: New revs
« Reply #1577, on May 2nd, 2012, 07:05 PM »
rev 1577
(9 files, 4kb) -- a quick rename.

* Renamed the topicseen variable/query string to just 'seen'. There is another variable, boardseen, which is not as often used, and I don't think it's worth specifying the 'topic' is seen in the variable name... (Display.php, MessageIndex.php, QuickMod.php, Subs-Boards.php, Subs-Post.php, Unread.php, UnreadReplies.php, SSI.php, Search.template.php)
Re: New revs
« Reply #1578, on May 3rd, 2012, 12:43 PM »
And yet another big commit...

rev 1578
(23 files +1-1, 10kb)

! First item in action/user menus would never show up. (topic.js)

* Got rid of $txt['on'] and $txt['search_on'], which were both confusing and used incorrectly. Replaced everything with $txt['on_date']. Renamed a few 'time' variables to 'on_time' to reflect the actual contents, need to finish them all. (Admin.php, Display.php, MessageIndex.php, ModerationCenter.php, PersonalMessage.php, Post.php, PostModeration.php, PrintPage.php, Profile-View.php, TEMPLATES: Display, MessageIndex, ModerationCenter, PersonalMessage, Post, PrintPage, Profile, Xml, LANGUAGES: index)

+ Clearly mark one's own PMs with a 'self' class in PM conversation mode. (PersonalMessage.template.php)

* Renamed Printpage template to PrintPage (see Sources). (PrintPage.php, PrintPage.template.php, other/xml/detailed-version.php)

* Spacinazi. (PostModeration.php)

* Some updates and fixes to the mini-menu code (that were already on wedge.org but not in the SVN.) (Display.template.php)

! Forgot to move a language string from index to Login. (Login.english.php)

! Profile drafts were showing the 'on' twice in 'on_date'. (Profile.template.php)

! showDrafts function was called viewDrafts, as opposed to what the file header said (and what convention implied.) (Profile.php, Profile-View.php)

* Moved the post page's dynamic new post template back into the post template, I don't know why, but I did that. Am I in trouble? (Post.template.php, post.js)
Re: New revs
« Reply #1579, on May 6th, 2012, 01:34 AM »
rev 1579
(11 files, 6kb)

! AeMe caching for external embedded images was failing. (Aeva-Gallery.php)

- Got rid of unneeded code in the search results, and cleaned up the area a bit. (Search2.php, Xml.template.php)

* More 'time' to 'on_time' renames. Hopefully the last ones... Will probably generate warnings if you install from SVN, because it's missing some other files I'm still working on. I'm mostly committing whatever doesn't conflict with other work with progress. (Post.php, Profile-View.php, Recent.php, Search2.php, Subs-BoardIndex.php, Boards.template.php, InfoCenter.template.php, Profile.template.php, Search.template.php)
Re: New revs
« Reply #1580, on May 13th, 2012, 01:18 PM »
rev 1580
(14 files, 6kb) -- some of the 'easy' commits I can do separately from the BIG ones... Phew...

! IE 6-8 doesn't like addEventListener, so I moved some data around (and, as always, saved a few bytes in the process.) (sbox.js)

- Rewrote help popup to no longer turn %1$s into $scripturl -- just use <URL> per our standards, or %2$s into the session var -- it works fine without that and wasn't used anywhere. (Help.php, Help.language.php)

! Fixed Aeva bug where embedding would spectacularly fail when at least two videos are embedded in a sentence and Embed in Sentences is disabled. (Aeva-Embed.php)

! Fixed Vimeo embeds to use their new iframe code. (Subs-Aeva-Sites.php)

! Fixed Merge Topics feature failing when selecting another target board (due to a recent rewrite.) (SplitTopics.php, SplitTopics.template.php)

* The error log shouldn't show table headers and error filters if there are no errors to show in the first place... (Errors.template.php)

* Fixed some typos were 'dependant' was use (it's the French spelling, not the English one, at least not for that meaning... I'm counting on everyone to make sure my changes are for the best :)) (ManageNews.php, MangePermissions.php, Modlog.php, SplitTopics.php, Help.english.php, ManagePaid.english.php, PersonalMessage.english.php)
Re: New revs
« Reply #1581, on May 13th, 2012, 05:14 PM »
rev 1581
(20 files, 30kb -- and THAT's my big commit... Phew! Some files I could have committed separately, but don't push me too far please...)

* Rewrote mini-menus nearly from scratch. The JS code is now nearly twice shorter, and this saves 230+ bytes off the gzipped topic.js file (1200+ bytes uncompressed). It also fixes z-index issues on low-resolution displays, although as of now, it adds a new bug to iOS 4.x (maybe later as well), which I'll work on ASAP. (Display.template.php, topic.js, index.css, sections.css, index.ie6.css, index.ie7.css, sections.iphone.css, Warm/index.css)

* Rewrote large areas of the Display template as well. Most notably, the Action buttons and Likes saw many changes in both template and CSS... And it's still a work in progress. (Display.template.php, PersonalMessage.template.php, index.language.php, index.ie6.css, index.member.css, index.rtl.css, sections.css, index.ie6.css, index.ie7.css)

* Rewrote ignored posts to use shorter, sweeter and simpler markup. The footer gets a generic div around it to hide everything in one go, saving us the need to generate some id's for multiple divs that aren't used otherwise. I could have wrapped everything into the msg_xxx div, but I'm not sure it'd be for the best. Well, it's my "last-minute change" from this commit, so it may very well be breaking something else, and I'll make sure to fix it if this happens... Obviously. (Display.template.php, Post.template.php, index.member.css, index.language.php)

! Fixed ignored posts JavaScript (probably) not working in IE6 on Post pages. (Post.template.php, post.js)

+ Just FYI -- added a $main_font_size CSS variable to help you customize your starting font size in case the font's x-height is really incompatible with Arial. (index.css)

* Some stuff related to this commit or earlier ones (on_time notably), that needs to be applied here too. (MessageIndex.template.php, Post.template.php, Recent.template.php, Xml.template.php)

* Rewrote script.js to save over 50 bytes of data. Makes expandPages a tad slower, but it's still immediate even in IE6 with its lousy JS engine, so why bother? Removed selectText() which is an AeMe-only function (moved it to the Media template which I'll commit as soon as I'm done with its rewrite), etc. Also, the help pop-up feels a bit better now, but it's a matter of taste I guess. (script.js)

* My first use of the universal selector... *sob* I just wanted to say arrivederci to all of these LongWordsThatBreakYourLayoutBecauseYourUsersLikeToPlayWithYourMind. Forever. This won't work in Opera < 10.5, but Opera users are geeks, and they update their lot. (index.css, sections.css)

+ Added some clear visual reminder for your own PMs in Conversation mode. (index.member.css)

+ Added a notenice (will change name later) class to note/warn stuff, because it's not always a neutral or negative notice. (index.template.php, Display.template.php, index.css)

@ Note: it would seem that the main menu is currently buggy in IE8 -- menus pop up at the left, rather than below their parents. It works fine in IE6, IE7 and IE9 and I don't know how to look into this for now... Also, since I removed some of the 'display: table' hacks for topic posts, I need to hack into the hacks I hacked for IE6 to ignore the table hack. Hopefully I won't do a hack job of it...
Re: New revs
« Reply #1582, on May 14th, 2012, 10:06 AM »
rev 1582
(17 files, 6kb)

* Renamed ul.quickbuttons to ul.actions -- shorter, and semantically it makes more sense as these were only used for action buttons anyway. Also harmonized all of the action buttons I could find, by adding an action bar where needed, and moving everything below the post bodies. Renamed quickbuttons.png to actions.png. The stuff in post.js is untested. (Display.template.php, PersonalMessage.template.php, Post.template.php, Search.template.php, post.js, index.ie6.css, index.ie7.css, index.member.css, index.rtl.css, Wireless/sections.css)

* #version_details didn't really need to be limited in height at this point... (admin.css)

- Removed a line-break from the admin login page, because there was already a hardcoded margin above the button... (Login.template.php)

! Fixed mini-menu CSS on Mobile Safari: forgot the z-index and ensured that user menus actually show up (although this one's a very odd bug and even weirder hack which I'm likely to reconsider later.) (sections.css, Warm/index.css, Wireless/sections.iphone.css)

@ Note: forgot to commit the actions.png rename... Please do it manually if you're updating to this rev, it'll be fixed in my next commit...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1583, on May 16th, 2012, 04:29 AM »
(3 files, 1KB)

Revision: 1583
Author: arantor
Date: 16 May 2012 03:28:51
Message:
! A variable doesn't suddenly change from being a string to a number... wrong variable perhaps? (Ajax.php)
! When liking or unliking something, send that information to a hook. (Like.php, ManagePlugins.php)
! When a thought is added, updated or deleted, send that to hooks. (Ajax.php, ManagePlugins.php)
----
Modified : /trunk/Sources/Ajax.php
Modified : /trunk/Sources/Like.php
Modified : /trunk/Sources/ManagePlugins.php
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 #1584, on May 17th, 2012, 10:56 PM »
rev 1584
(14 files +1-1, 12kb)

* Turned mini-menu code into a jQuery plugin, so that templates can create them more easily. Also fixed aligment in various browsers, and made JS code shorter (about 50 bytes saved, or so.) (Display.template.php, topic.js, sections.css)

! Fixed user menus in iOS... At least iOS 4... If someone can tell me why the hell I had to use 'position: absolute' on the parent span, instead of 'position: relative' which works on all other browsers and even in iOS on action menus, then... Well, I'd be glad to hear from you. (index.iphone.css)

! Fixed main menus in IE8. Another epic fight which I've only half-won... Many problems were due to specifically setting opacity to 1 (jQuery will add an alpha filter even though it's unneeded, and this will cause layout issues), as well as #navi using an overflow: hidden to ensure the left-floated #main_menu was shown... Heck, I don't remember why I did that in the first place, when I could have done a clearfix (which, whatever you say, is less likely to cause problems), or... hem... removed the float. Which I did. I still don't know why I had to add a strange hack for menu margins in IE8, but don't ask too much of me... It's only IE. (index.css, index.ie8.css)

! Fixed Wireless in IE6, in case users wanna test-drive it... (Even though, if they're using IE6, it's probably because they're utterly incapable of test-driving anything else...) (Wireless/sections.css)

- Don't bother showing minutes or, in the worst cases, hours, in 'total time spent on this forum' statistics, depending on the number of days spent online. If you have 100+ days and counting, do you really care about minutes online? (Stats.php)

- Don't show the action bar if it's going to be empty anyway... (Display.template.php)

- Removed an extra br from the admin login template. (I think it's another thing I forgot from my earlier commit.) (Login.template.php)

- Removed my latest animation for popups. Didn't look good enough. Will try and use an animation similar to what I now have in mini-menus. (script.js)

+ Added a $post_font_size variable to make post font size (what else?) easier to customize... Whatever. (index.css)

* quickbuttons.png renamed to actions.png, as forgotten in the previous commit. (actions.png, quickbuttons.png)

* Most of the h6 (mini-header) occurrences were at the beginning of a block, so I removed the need to add a 'top' class, and only showing a top-margin if the tag has another one before it in the block. (ManagePlugins.php, script.js, Stats.template.php, Who.template.php)

* Translation. (index.french.php)
Re: New revs
« Reply #1585, on May 18th, 2012, 04:08 PM »
rev 1585
(11 files +1, 13kb)

* Rewrote JS/CSS compilers to allow for plugins and themes to specify the list of filenames they'd like to ignore from the final filename. For instance, $context['javascript_files'][] = 'something' should now be $context['main_js_files']['something'] = true (or false to ignore). For consistency, renamed $context['javascript_files'] to 'main_js_files', 'remote_javascript_files' to 'remote_js_files' and 'css_main_files' to 'main_css_files'. (Load.php, Subs-Cache.php, Subs.php, index.template.php, Login.template.php)

+ Split we_avatarResize() into its own file, which is only loaded if the related feature is enabled. Which is unlikely, because it's not set by default, so why force everyone to load nearly 150 bytes for an unused function...? (avasize.js, script.js)

* Don't close the dropdown if a top-level menu item is clicked when it has no associated link, e.g. the profile menu. (script.js)

* A few size optimizations, and reorganized the thought object to allow for new thoughts to be associated with relevant action buttons. The rest will come later... (script.js)

* Renamed 'MiniMenu' plugin to 'mime', for consistency with .menu() and because everybody hates mimes and my number 2 goal in life is to annoy you. Also optimized both files for size. (Display.template.php, topic.js)

* Improved styling for the source code popup in the error log. (Errors.template.php)

* Moved the quick edit button by a few pixels to be on the same line as the rest as the action bar. (index.member.css)

- A leftover line of CSS... (sections.css)
Re: New revs
« Reply #1586, on May 19th, 2012, 05:22 PM »
rev 1586
(2 files +1, 5kb)

* As usual, spending hours working on things that will only save a few bytes... That's me. I'll be here all week. Removed weCookie() which was only used once in the entire codebase, and replaced the call with a tighter, optimized regex. Rewrote some .css() calls to save another few bytes (this one is odd, but I tried all permutations, and the more normal ones can take up to 10 more gzipped bytes...) (script.js, attic/Unused-cookie.js)

* Made the poster area background a bit less obvious. I just wanted to tone it down... Sue me. (sections.css)
Re: New revs
« Reply #1587, on May 21st, 2012, 06:46 PM »
rev 1587
(11 files, 19kb) -- hopefully didn't break anything, bit in a hurry... wedge.org is a bit broken though, will fix later.

* Rewrote and optimized the Display template (more precisely, per-post template) to remove duplicate message id's, and rewrote everything to instead request the post root's message ID and work with that. Seriously, with the machines we use today, jQuery can perfectly handle these. On a full sample page, I started with 65KB and ended up saving 1.5KB, or 300 gzipped bytes. It doesn't seem like much, but topic pages are the most visited (and most demanding) pages on any given forum, and with any byte saved, your server will thank you in the end. (Display.template.php, Post.template.php, post.js, topic.js)

* Quick editing a post will now sport a small sliding animation. (topic.js)

* Did some severe size optimizations for topic.js and (to a lesser extent) post.js while I was rewriting them -- saved about 100 gzipped bytes in topic.js, even after the extra features were added. About half of that in post.js. Also saved a few bytes off the Ajax data sent back to the client. Eh, a byte saved is a byte saved... (topic.js, post.js, Xml.template.php)

* Moved some inline styles to their proper CSS files. (Display.template.php, index.ie8.css, index.member.css)

* Renamed modifybutton to quick_edit, because that's what it is... A quick edit button. (Display.template.php, index.member.css, index.rtl.css)

+ Added a hardcoded copyright for Wireless. Oops. (Wireless/sections.css)

! Forgot to filter out editor-func and post from editor filenames, as well as 'index' for the main CSS filename. (Class-Editor.php, Load.php)
Re: New revs
« Reply #1588, on May 21st, 2012, 11:22 PM »
rev 1588
(2 files, 5kb)

* Show the action bar (but hide anything but the Like button) for any ignored posts that received at least one like. Give peace a chance... (Display.template.php)

* Shortened modifytopicdone Ajax. I don't think the id is used anywhere. (Xml.template.php)

! SMF bug: a foreach() ended with a semicolon, meaning it only ran the block that followed on the very last entry in the array... Oops? Worst of all, I think, is that I was unable to find any difference between the buggy and the fixed implementations... Probably not a very important Xml block, eh. (Xml.template.php)
Re: New revs
« Reply #1589, on May 21st, 2012, 11:23 PM »
rev 1589
(1 file, 2kb)

! Committed too much... The thought rewrite isn't ready for prime-time yet. (Xml.template.php)