New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1920, on February 12th, 2013, 11:04 PM »
(2 files, 2KB)

Revision: 1920
Author: arantor
Date: 12 February 2013 22:04:02
Message:
! Fixed the less than pleasant message and replaced it with a less fun and more appropriate message. (Subs-Plugins.php, ManagePlugins.english.php)

! Removed some of the debug stuff. Less vomity goodness. (Subs-Plugins.php)
----
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
Re: New revs
« Reply #1921, on February 13th, 2013, 02:49 AM »
(4 files, 4KB)

Revision: 1921
Author: arantor
Date: 13 February 2013 01:48:54
Message:
! Some minor fixes to plugins, getting them to reuse some code as well as genericising one of the forms that other stuff will want to use. (ManagePlugins.php, Subs-Plugins.php, ManagePlugins.template.php, ManagePlugins language)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.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,079
Re: New revs
« Reply #1922, on February 13th, 2013, 12:56 PM »
rev 1922 -- the index language files are my sacred sanctuaries.
(21 files, 13kb)

! If ever calling ask() or say() from within a callback function for another ask() or say() call, Wedge would simply ignore the new one. Costs a couple of extra bytes. Gotta do what you gotta do... (script.js)

* More heavy stuff lifted out of the index language file. This is 1.5KB of data (and 44 array entries) you won't have to load uselessly on every page. Many of these strings are removed because they were either leftovers from pre-SMF2 days (e-mail stuff for instance, it was all moved to EmailTemplates long ago and there were remainders in the Post files), or leftovers from early Wedge days. The rest was mostly moved to the Post language files, because they were mostly used in Post situations. There may be many more entries that can be moved to something else, but... I'm tired all right? And I did all of the 'big' ones I think. (Display.php, Memberlist.php, MessageIndex.php, PersonalMessage.php, Profile-Modify.php, Mailer.template.php, LANGUAGES: Admin, index, Login, ManageMembers, Post, Stats)

- Naoism: removed smiley descriptions out of the smiley cache. My smiley system doesn't allow for descriptions because, frankly, they take bandwidth for nothing (who reads them?), and apparently I forgot to remove them out of the cache. (Subs-BBC.php)

- Naoism: duplicate 'search_for' string. (Admin.language.php)

* Naoism: duplicated 'view_all_members' to both Admin and ManageMembers. Seriously, I'm not going to load a 10KB file just for a single use on all admin pages, or a 40KB file for a single use on Memberlist pages. I'm also not going to keep it in the index language because, well... nah. (Admin.language.php, ManageMembers.language.php, index.language.php)

@ Naoism: the Class-Editor file has no description for most of the popup smileys. Should we add them..? In the meantime, at least I cleaned them up. (Class-Editor.php)
Re: New revs
« Reply #1923, on February 13th, 2013, 01:41 PM »
rev 1923
(48 files, 13kb) (what is it with me and 13kb commits these days..? 2 in a row, 3 in 2 pages?)

* A huge load of crap. Or, in other words, inner works of the Naoist monk. Removing some unneeded spaces that hurt my eyes, or turned all //!! into // !! (our 'regular' way of doing a to-do or I'm-not-sure-about-that-piece-of-code), and //old-code into // !! old-code ?? (because I can, and because at least that's findable through regex.) (48 files, not even going to bother listing them all.)
Re: New revs
« Reply #1924, on February 13th, 2013, 10:59 PM »
rev 1924
(40 files, 10kb)

* Rewrote ajax rating of media items. In case there's an error, it will now show in the rating box instead of silently crashing. Also, it now returns plain text instead of XML. I'm trying to stay away from XML if not needed, not because I hate XML or anything, but because there really isn't any reason to use XML in Ajax transitions, except to look smug and use more bandwidth for nothing. Plus, this slight rewrite saves me 10 bytes or so in the script file. Oh, and I removed show_ajax calls from thought removal as well... Never bother to call that when you're not actually waiting for any Ajax feedback... That doesn't make sense. (Aeva-Gallery.php, Media.template.php, script.js)

+ Added a returnAjax helper function that simply outputs a raw string, passes it through ob_sessrewrite (in case it's some HTML) and returns. Thanks to Pete for unknowingly inspiring this to me. Hopefully this will become somehow my standard way of doing this. Otherwise I'll just add more params or something... (Subs.php, Aeva-Gallery.php, Media.template.php)

- Removed @ from ini_get/ini_set, an old SMF practice that never seemed to do anything special (these functions don't generate errors in the first place, just return false in case something went awry), and God knows I hate useless bytes. (40 files or so.)
Re: New revs
« Reply #1925, on February 13th, 2013, 11:18 PM »
rev 1925 -- just pushing a smaller one before bed time. All in all, a day filled with crappy cleanup commits :P
(12 files, 42kb) (because of reindenting. I suppose.)

* Translation. (ManagePlugins.french.php)

* Some cleanup of remaining ?> closers or missing file newlines. (Class-UnitTest*.php, latest-themes.php, mirrors.xml, Announce.php, module.audio-video.matroska.php, Profile-Modify.php, ManagePlugins.english.php)
Re: New revs
« Reply #1926, on February 14th, 2013, 02:10 PM »
rev 1926 -- we::$is_ajax harmonization, and fixing a Wysiwyg bug. (My fault for this one.)
(37 files, 14kb)

* Renamed $context['is_ajax'] to we::$is_ajax, as it's more of a system variable than context one. It doesn't seem to be tested against before the system class is loaded, but I may be wrong. Also harmonized all $_REQUEST['xml'] requests to replace them with we::$is_ajax and remove 'xml' from Ajax URLs. Just plain and simple... Mass-upload was a special case, because it uses YUI, so I'll be forcing we::$is_ajax on this one. (unittest.js, Class-Editor.php, Class-Skeleton.php, Class-System.php, JSModify.php, Like.php, Load.php, Aeva-Embed.php, Aeva-Gallery.php, Aeva-Gallery2.php, Aeva-ModCP.php, Aeva-Subs-Vital.php, Subs-Media.php, Packages.php (when do we remove that one?), PersonalMessage.php, Post.php, Post2.php, Profile-View.php, QueryString.php, Search.php, Search2.php, Security.php, Split.php, Stats.php, Subs-Menu.php, Subs-Post.php, Subs-Template.php, GenericPopup.template.php, ManageMedia.template.php, Packages.template.php, editor.js, script.js)

* Rewrote some Ajax calls in the editor code to save about, hmm... 30 bytes? Even years after I started my quest to reduce the size of all our JS files to a couple of bytes, I'm still amazed at how much I can save just by being a bit smart about something. (editor.js)

! Which hopefully compensates the silly bug I introduced a month ago, that actually broke switching from Wysiwyg to non-Wysiwyg. Interestingly, a jQuery bug is also associated with it, but because my 'fix' actually compresses better than what I'd written, I'm not even going to bother submitting a report for that one. (editor.js)

* Simplified draft ajax response. Just enough to be able to optimize the matching editor-func JS file... Surprised uh? No? Okay, no. It saves 10 bytes, so sue me. (Subs-Post.php, editor-func.js)

* Moved .xml->feed action compatibility code to the QueryString file, which seems more appropriate for that to me. Also ensured that the corresponding $_GET/$_REQUEST action is updated as well. (index.php, QueryString.php)

! Fixed Pretty URLs in media feeds. (Aeva-Foxy.php)

* Now using XML template codepath for Atom feeds... This seems to work. Needs some double checking. Also fixed some Aeva Media files that still requested the older feed format (.xml in the URL) -- boo. (Load.php, Aeva-Embed.php, Aeva-Subs-Vital.php, Subs-Media.php)

- Replaced a few remaining ISO header declarations to UTF. (upgrade.php, Aeva-ModCP.php)

* Forgot a newline at the end of a file. (ManagePlugins.french.php)

@ I'm (very) worried about start_output() now always returning a XML header for all Ajax responses. Because not all of them are XML-formatted... Do you think this will be okay? (Subs-Template.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1927, on February 15th, 2013, 04:07 AM »
(2 added, 10 modified, 24KB !)

Revision: 1927
Author: arantor
Date: 15 February 2013 03:05:55
Message:
! News would get very very upset if you didn't have any news. (ManageNews.php, ManageNews.template.php, Admin language file)

! Custom fields are now sortable with a slightly improved interface. I might put more stuff on it yet (like 'field is shown on registration' and 'field is shown on memberlist') but don't know. (install.sql, ManageMemberOptions.php, Memberlist.php, Profile.php, Register.php, Admin.template.php, mana.css, active.png, field_types.png, Admin and ManageSettings language files)
----
Modified : /trunk/Sources/ManageMemberOptions.php
Modified : /trunk/Sources/ManageNews.php
Modified : /trunk/Sources/Memberlist.php
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/ManageNews.template.php
Added : /trunk/Themes/default/images/admin/active.png
Added : /trunk/Themes/default/images/admin/field_types.png
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.french.php
Modified : /trunk/Themes/default/skins/mana.css
Modified : /trunk/root/install.sql
Re: New revs
« Reply #1928, on February 18th, 2013, 04:40 AM »
(5 modified, 1 added, 10KB)

Revision: 1928
Author: arantor
Date: 18 February 2013 03:39:30
Message:
! New table for language changes tracking. This is only the new DB structure. (install.sql)

! Installer should not bother checking for agreement.txt but it should ensure that certain other folders really are. More changes will likely emerge yet. (install.php)

! Settings files should not be checking for agreement.txt. (Settings.php, Settings_bak.php)

! In certain circumstances old code for updating DB last error could be used. (Class-DB.php)

! New agreement file. Note that I haven't yet removed the old agreement.txt file because there's still code that calls it. (Agreement language file)
----
Modified : /trunk/Sources/Class-DB.php
Added : /trunk/Themes/default/languages/Agreement.english.php
Modified : /trunk/root/Settings.php
Modified : /trunk/root/Settings_bak.php
Modified : /trunk/root/install.php
Modified : /trunk/root/install.sql
Re: New revs
« Reply #1929, on February 18th, 2013, 07:17 PM »
(11 modified, 1 removed, 18KB)

Revision: 1929
Author: arantor
Date: 18 February 2013 18:15:56
Message:
! Updated installer SQL with correct primary key. (install.sql)

! Don't show the warning status about bans to a given user if they themselves are softbanned. (Load.php)

! Bug fix - after the debug strings were moved to Stats lang file, the query viewer got upset. (ViewQuery.php)

+ First commit of magic new language entry cache thingy. NOTE: Language files are cached now. If you change a language file remember to dump the relevant cache of it. This is only for developers; regular users will be able to use the admin panel in future to do this. (Load.php)

! Registration code now uses the proper language string entry. (Register.php)

+ Manage registration now has spiffy new interface that interacts with the DB to update things. Juggled a few things about, gave it proper editing facilities. (ManageRegistration.php, Register.template.php, Admin language file)

! Some subsidiary stuff: don't let the current language file editor touch the agreement file and strip remaining entries of agreement.txt. (ManageServer.php, Packages.php, upgrade.php)

- Don't need scratty old agreement file any more. (agreement.txt)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/Packages.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Sources/ViewQuery.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Deleted : /trunk/agreement.txt
Modified : /trunk/other/upgrade.php
Modified : /trunk/root/install.sql


@ I can attach files. Why shouldn't I? It might get people to look in this topic more often? ;)

 reg_agree1.png - 18.13 kB, 930x338, viewed 131 times.

 reg_agree2.png - 49.17 kB, 938x522, viewed 139 times.


Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1930, on February 18th, 2013, 10:08 PM »
rev 1930 -- minor bug fixes. I'm doing what I can to avoid a HUGE commit coming up where I've rewritten so many things... Also, +1 for screenshots ;)
(7 files, forgot to look for the size... probably a couple of KBs.)

! In profile pages, password length error message always said '4 chars' even when set to 8 chars minimum, because of a missing global. (Profile-Modify.php)

! Typo broke gallery pages. Dunno why no one noticed... (Aeva-Gallery2.php)

* Pretty please, use my refactored comment structure for commented out code please, or remove code altogether ;) (Admin.template.php)

* Also use ternary operators where it's painfully obvious... Again please ;) (ManageNews.php)

* Translation. Also, some of the outdated French strings weren't removed in a recent rewrite... (Admin.french.php, ManageSettings.french.php)

* Made post textarea frame a bit less in-your-face... (editor.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1931, on February 19th, 2013, 12:12 AM »
(5 files, 42KB!)[1]

Revision: 1931
Author: arantor
Date: 18 February 2013 23:11:23
Message:
! Tell the user their changes have been saved when they have edited something. (ManageRegistration.php, Register.template.php)

! Reformat the email templates stuff into something saner. This seems to work as intended and as a side benefit will definitely allow for proper change setup (which means changing email templates from the admin panel cleanly). I have a lot of plans for this and they all rely upon the language caching system that now exists, heh. (Subs-Post.php, EmailTemplates language files, I did both of them)
----
Modified : /trunk/Sources/ManageRegistration.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
 1. I have no idea why it's so big. But the changes are quite 'bitty' I guess.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1932, on February 19th, 2013, 06:46 PM »
rev 1932 -- at last, mini-menus for thoughts! Anxious to get feedback on this...
(23 files, 30kb)

* A major rewrite of the mini-menu system. It is now more 'generic', i.e. it's included in the main script and it does its best to accomodate more styles.
  - The code is much tighter than before (as if it wasn't already before..!) Also, made a last-minute rewrite to create all mini-menus together at load time rather than invidually hover time. This only takes about 70ms on full topic pages in modern browsers, which is better than I thought. The reason is that I'm planning for something more... That might end up being interesting. Or not.
  - The arrow position on right-aligned elements should now be consistent with the left-aligned ones.
  - Related classes are now simplified in the CSS files.
  - New virtual class .vbtn allows you to use these buttons anywhere, not just in action bars. (sections.css)
 (Display.php, Home.php, Display.template.php, Home.template.php, images/theme/menurow.gif, index.template.php, Msg.template.php, Xml.template.php, index.language.php, script.js, topic.js, extra.ie6.css, extra.ie7.css, extra.ie8.css, extra.ios.css, extra.rtl.css, index.css, sections.css)

* Replaced thought action buttons with mini-menu. See above for file list...

+ Added Android compatibility to user mini-menus. Damn their hover system...! I hate iOS these days, but at least it got that one right, unlike Android and Windows 8... (script.js)

* Post textarea frame is now a bit less in-your-face. (index.css)

* In order to save more bytes (moving mini-menus to the script file originally cost over 400 bytes, now reduced to about 160), did a few things that I'm sometimes proud of, sometimes not at all... Renamed .dragslide() to .ds(), removed closer tags when jQuery can very quickly fix them by itself (e.g. $('<div></div>')), simplified jQuery plugin structure (not sure why jQuery insists on enclosing them in closures or whatever -- it works perfectly fine outside of these), dropped the chainable aspect of .ds (this is actually more consistent with what my other pseudo-plugins do... If we ever need to have these inserted inside a chain rather than at the end, I'll update all of the plugins to do it as well), the main menu is now a plugin again, renamed weToggle's hooks to onBefore and onCollapse and onExpand (this is all that was needed, really...), left in a pair of {}'s when they weren't needed (it added an extra gzipped byte if I removed them, the joys of gzip magic...). I think that's all... (script.js, stats.js, zoomedia.js)

- Removed .top_likes button code, as it saves over 40 gzipped bytes in the CSS, while adding a bit less to the stats page. Considering it's likely to be requested less often than a CSS file, it's a bargain! (Stats.template.php, sections.css)

@ New thought system on homepage causes posted replies to have improper HTML, and they don't get their own mini-menu. This is fixed with a simple page refresh, but will still need proper fixing... Probably won't be able to add the mini-menu, though. Would be too expensive. This is a big issue for me. Also, the Welcome template is probably broken, too...
Re: New revs
« Reply #1933, on February 19th, 2013, 10:58 PM »
rev 1933 -- icon maintenance code. Gotta do whatcha gotta do...
(18 files + moves & deletions, 19kb)

* Renamed modify_button class to edit_button, because... Err... It's one byte shorter. Also removed modify_inline.gif from index CSS, because... Guess what? It was a duplicate... This saves about 200 bytes from the main CSS file. I almost choked on my food, but unfortunately I had no food under the hand. (Display.php, Home.php, Msg.template.php, extra.rtl.css, index.member.css, sections.css)

* Replaced login_sm.gif icon with online.gif -- it just looks better and means the same ("registered member"). (Login.template.php)

* Replaced assist.gif icon with field_invalid.gif... Why, oh why? Because. The assist icon is perfectly unreadable (and has been since the SMF 2.0 beta days), and it's only used once (legend block), and a relatively subtle warning icon is just as good -- and four times smaller in bytesize. Until we replace it with something else -- or nothing -- this is at least better. (MessageIndex.template.php)

- Removing a few remaining calendar-related lines/icons. Should be in the calendar plugin, I guess..? (upgrade.sql, QuickMod.php)

- Removed a language string that really didn't bring anything to the table... Even this commit line is more meaningful than it. And that's saying a lot. (Themes.template.php, Theme.language.php)

- Removed reply_all_button class... Seriously. It's only used once (in PMs), and was already a copy of reply_button, so I just renamed it to that... (PersonalMessage.template.php, extra.rtl.css, sections.css)

- Moved create_button function from Subs to moderation page, and removed the last (mostly wrongful) uses in the other pages. Basically, I tend to favor adding _button classes instead of using img tags. Only the merge.gif button remains as a 'real' linked button, dunno what to do with it. Also, most of these replacements are block-type classes set on an inline-type anchor, meaning the icon could get partially hidden from view, so this really warrants further inspection. See Profile template for an example... (Subs.php, Merge.template.php, ModerationCenter.template.php, PersonalMessage.template.php, Profile.template.php)

! Fixed edit_draft button, it should have been an edit button, not a reply button... (PersonalMessage.template.php)

* Moved plenty of unused icons to /other/images/buttons. Feels good... (12 files, removed another 4 entirely. I think.)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1934, on February 20th, 2013, 01:00 AM »
(17 files, 49KB!)

Revision: 1934
Author: arantor
Date: 19 February 2013 23:59:12
Message:
! Scary commit. Emails can now be edited from the admin panel easily. (ManageMail.php, ManageMail.template.php, Admin.php, language files: Admin, ManageMail, EmailTemplates)

! Admin notifications should be sent for users who require admin approval after email validation. (Activate.php)

! Bug fix relating to $helptxt and indeterminate initialisation state. (Load.php)

! Harmonisation of email variables. In theory everything should be working and not broken in any fashion since I should have maintained all the email templates properly in sync. (Groups.php, Mailer.php, ManageMembers.php, Reminder.php, ScheduledTasks.php, Subs-Admin.php, Subs-Auth.php, subscriptions.php)
----
Modified : /trunk/Sources/Activate.php
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Groups.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/Mailer.php
Modified : /trunk/Sources/ManageMail.php
Modified : /trunk/Sources/ManageMembers.php
Modified : /trunk/Sources/Reminder.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Admin.php
Modified : /trunk/Sources/Subs-Auth.php
Modified : /trunk/Themes/default/ManageMail.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/languages/EmailTemplates.french.php
Modified : /trunk/Themes/default/languages/ManageMail.english.php
Modified : /trunk/subscriptions.php