New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1125, on October 20th, 2011, 03:52 AM »
Revision: 1125
Author: arantor
Date: 02:51:20, 20 October 2011
Message:
! Another stupid typo. (ManageServer.php)
! cURL is smart enough to decode chunked data, but when we use HTTP/1.1 requests manually, we need to unchunk it too, yay? (Class-WebGet.php)
----
Modified : /trunk/Sources/Class-WebGet.php
Modified : /trunk/Sources/ManageServer.php


@ I didn't spot this one because the data I was using never got chunked, but it broke the admin request files stuff. I only wish I'd known this like this morning, rather than discovering it at almost 2am. Still, it's fixed now.
Re: New revs
« Reply #1126, on October 20th, 2011, 11:31 PM »Last edited on October 20th, 2011, 11:44 PM by Arantor
(1 file, missed the size but it's about 6 lines in total affected!)

Revision: 1126
Author: arantor
Date: 22:25:40, 20 October 2011
Message:
! Replaced browser specific styling hacks for splitting words with soft-hyphen entity. It really needed to be done! (Subs-BBC.php)

! Slight performance tweak in the BBC parser, avoiding extra string slicing once per tag. (Subs-BBC.php)
----
Modified : /trunk/Sources/Subs-BBC.php


Also note there is currently a fairly large bug in the preparser/parser where autolinked URLs are thoroughly mashed up.

Typing this in a post in a post, expecting it to be autolinked:
Code: [Select]
http://wedge.org/

Results in:
Code: [Select]
[url]http://[url]http://wedge.org/[/url][/url]
being generated in the physical post which is rendered as:

Code: [Select]
http://[url]http://wedge.org/[/url]

It is definitely a preparsing problem because it's stored like that. That said, something's distinctly odd about how it works because if I have the link written out twice on two separate lines (link / blank line / link), and it's done through the quick modify, neither are linked, but if I manually put URL bbcode around the second link, both are linked.

I think we've thoroughly broken the preparser and parser somewhere (but the above happens even with the r1125 version of Subs-BBC.php)


:edit: So, I'm waiting for r1127 to be posted here, committed what I thought was a fix in r1128 but it seems that the parser is still broken, more details when I post r1128.
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,046
Re: New revs
« Reply #1127, on October 21st, 2011, 12:05 AM »
(lol, I was posting this one just to make sure we had at least one commit up for today... Seems you didn't need me :P)

rev 1127
(2 files, 7kb)

+ Added hidden variable ($modSettings['minify_html']) and my inline JS dynamic minification code. Well, it needs to be cached really, then maybe I'll consider adding a UI setting for it. Also threw in free indentation removal in the HTML source. (Subs-Template.php)

! Fixed some minor glitches in Warm. (Warm/index.css)

@ Note re: rev 1126, how do we find this one out..? Should we revert to a random rev until we find which rev broke it...? It's likely to take some time...

:edit: Sorry, I forgot to hit 'Submit' and was looking into your rev's code, and went into fixing other things etc... My bad!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1128, on October 21st, 2011, 12:10 AM »
(1 modified, again missed the size, sorry, but it's half a dozen lines again)

Revision: 1128
Author: arantor
Date: 22:42:02, 20 October 2011
Message:
! Under some circumstances two calls could be put into the embedder code which had the interesting side effect of mulching certain operations. Not calling it twice seems to rectify all issues observed while testing previous revision, without introducing any other issues into link parsing. (Post2.php)
----
Modified : /trunk/Sources/Post2.php


@ After more playing about I can still get it to break, though it is less broken than before. Specifically now, if a link is posted it will be handled correctly normally in both full and quick edit, but if the post is subsequently modified, it will be wrapped in url tags which are not handled correctly. It's really *really* irritating, seeing how there is a url tag with = parameter (i.e. [url=http://wedge.org]wedge[/url]) which has worked the entire time, and not been mulched with the above one bit. Also Aeva embedding works just fine even with this patch, both quick and full edit.

IOW: quick edit is always correct, full edit is not, yet they seem to use the same code path! The bbc parser itself seems to be handling what's given to it correctly, but that full edit is breaking the link handling.

Sure, we can go through every change in either Subs-BBC or Class-Editor back to r1 (including when they weren't originally in those files!) but I'd rather concentrate on finding where it does it and not making it do it again.

More specifically I want to know what the difference in code paths is between quick and full edit because quick edit seems to be consistently correct, and I don't know why. I thought the difference was the chunk I removed in r1128 (given its comment, it seemed likely) but it's more than that.
Re: New revs
« Reply #1129, on October 21st, 2011, 02:19 PM »
(8 modified, again forgot to notice the size :()

Revision: 1129
Author: arantor
Date: 13:18:44, 21 October 2011
Message:
! Some missing hooks from the plugin manager's known list. (ManagePlugins.php)

! The dialogue for uploading plugins (though not functional yet) and for managing (adding/editing/removing) plugin repositories, though not browsable yet. (install.sql, Admin.php, admin.css, ManagePlugins.php, ManagePlugins.template.php, Admin and Help and ManagePlugins language files)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Help.english.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
Modified : /trunk/Themes/default/skins/admin.css
Modified : /trunk/other/install.sql

Nao

  • Dadman with a boy
  • Posts: 16,046
Re: New revs
« Reply #1130, on October 21st, 2011, 08:47 PM »
rev 1130
(7 files, 21kb)

* Spacinazi and a typo. (ManagePlugins.php, Subs-Plugins.php, ManagePlugins.english.php)
* Translation. (Admin.french.php, Help.french.php, ManagePlugins.french.php)
* fixLongWords doesn't need to define a $breaker variable. (Subs-BBC.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1131, on October 23rd, 2011, 11:50 PM »
(1 modified, 1KB)

Revision: 1131
Author: arantor
Date: 22:46:12, 23 October 2011
Message:
! If using url_image_size, make sure that we send a valid Accept header. This won't make a huge difference in most cases but if the user is requesting an attachment that's going to be served through Wedge, the request will be killed otherwise. (Subs.php)
----
Modified : /trunk/Sources/Subs.php
Re: New revs
« Reply #1132, on October 25th, 2011, 04:54 PM »
(2 modified, 3KB)

Revision: 1132
Author: arantor
Date: 15:54:11, 25 October 2011
Message:
+ Admin panel settings pages, where they use inline permissions, the inline permission can now set - if it wants - per permission exclusions by group, so for instance you could put a general access and an admin level access permission in the same page if you wanted. (ManagePermissions.php, ManageServer.php)
----
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/ManageServer.php

Nao

  • Dadman with a boy
  • Posts: 16,046
Re: New revs
« Reply #1133, on October 25th, 2011, 09:54 PM »
Can't believe I didn't commit anything for 4 days...

rev 1133
(4 files, 7kb)

* Wedge will now only show the meta charset on topic pages. The idea behind this is that the UTF8 format is already specified through the headers, and the only reason we'd want to have the charset specified in the HTML is if the page is going to be saved for offline browsing. It's unlikely to happen for anything that's not a topic page... (index.template.php)

* Search icon was off by a pixel. (Warm/index.css, Wuthering/index.css)

! Fixed on_timeformat() and on_date() to work on English strings (the new time format broke it). on_date() is currently not used in Wedge, so I might remove it in the future. (Subs.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1134, on October 26th, 2011, 03:51 PM »
(5 modified, 13KB)

Revision: 1134
Author: arantor
Date: 14:51:19, 26 October 2011
Message:
! A bit more of the plugin stuff for the repository handling. It's still not finished either but hey, might as well commit it anyway. Also, be sure to lock out the plugin upload/download if gzinflate is not available. (ManagePlugins.php, ManagePlugins.english.php)
! New hook for CAPTCHA handling, if a plugin wants to extend the existing CAPTCHA framework. (Subs-Captcha.php, ManagePlugins.php)
! New hook for deleting members in bulk. It doesn't replace delete_member, because depending on what you're doing, it may not make a lot of difference whether you get them one at a time or in bulk. But there is a benefit to having the bulk query - for if you do actually do big deletes that hit lots of people at once - and unlike delete_member, delete_member_multiple can also rewrite the delete list if needed (e.g. to protect against certain users being removed for whatever reason. Use with caution!) Also note the delete_member hook itself has changed, to provide both the user id and name, not just user id. (Subs-Members.php, ManagePlugins.php)
! New hooks for Who's Online. One extends the list of actions that have to have permission in order to be visible, the other provides the entire dataset to hooks. While it might be practical under some circumstances to offer per-entry items to a hook, if there's going to be a query to get data (e.g. much like there is with topics, you want to be sifting that out before querying) (Who.php, ManagePlugins.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Subs-Captcha.php
Modified : /trunk/Sources/Subs-Members.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php

Nao

  • Dadman with a boy
  • Posts: 16,046
Re: New revs
« Reply #1135, on October 26th, 2011, 07:34 PM »
rev 1135
(6 files, 15kb)

! Most browsers didn't like my latest changes to menu paddings. Removed an old min-height: 0 hack that seemed to bother them... Yeah, don't ask me, it's kinda obscure to me too. Tested in Chrome, Opera 11.5/12, IE 7/8/9 and FF7. (index.css)

- Removed IE6 iframe shim support from menu code. The reasoning: IE6 users are noobs. They don't install forums. They wouldn't even notice if a menu item is behind a form element. While I'm okay providing shims for IE6 when it doesn't add code to *other* users, in this case IE6 represented a 25% overhead for the menu code, and 5% of the script file. For everyone. Now it's gone. Good riddance. (script.js, index.ie6.css)

* Made delimiters more generic for the false/true JS minification trick. Saves 7 bytes off the gzipped script file. What? A byte is a byte. (Subs-Cache.php)

* Positioned menus 3 pixels further down the top-level entries, to give more breathing space to the menu arrows. Feedback welcome for Wine. Works fine in other skins. (script.js, index.css)

* Droid Sans has no italics, so adding a small hack for that until I'm through with that font and switch back to something else. (Warm/index.css)

! Forgot to fix the additional JS file list for IE6 in Wine -- only Warm and Wuthering were done. (skin.xml)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1136, on October 29th, 2011, 02:15 AM »
(5 modified, 18KB)

Revision: 1136
Author: arantor
Date: 01:13:39, 29 October 2011
Message:
+ Converted Post structure to modular block/layer setup, and don't appear to have broken anything in the interim, though time will tell. (Post.php, Post.template.php)
! Added a few hooks to posting to be able to manipulate the process. This is a bit more malleable than others because the process is intensely complex. It may be that we change these hooks or do more with them. They're also untested. (ManagePlugins.php, Post.php, Post2.php, Subs-Post.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Post.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Themes/default/Post.template.php


@ This wasn't pretty, especially after I spent several minutes swearing at the dynamic inclusion, suspecting a bug in the template skeleton because I was only getting the 'poll' dialogue up until it dawned on me that I was already in a topic, and had hit Add Poll (as in add poll to topic) rather than creating an entirely new post+poll.

As indicated, the hooks may be enough, they may not. Post's handling is very complex and it does occur to me that maybe I should split it out into several functions like I did in SimpleDesk, but for now at least this gives us a starting point for plugins, and IIRC is the last remaining dependency for me to make the calendar a plugin.

Nao

  • Dadman with a boy
  • Posts: 16,046
Re: New revs
« Reply #1137, on October 29th, 2011, 02:30 PM »
rev 1137
(19 files, 21kb)

* Separated windowbg/windowbg2/windowbg3 logic from posts, which will use postbg/postbg2 from now on. Started to convert templates. The idea is: user-generated content should use postbg, while Wedge/skin-generated content should use windowbg. (index.css, index.ie6.css, sections.css, Display.template.php, Media.template.php, ModerationCenter.template.php, PersonalMessage.template.php, Post.template.php, Profile.template.php)

! Sending PMs with just an embedded item would fail. (PersonalMessage.php)

! Shortened action URLs would fail if Wedge was installed in a sub-folder. (QueryString.php)

* Use on_timeformat in drafts and post lists for profiles. (Profile-View.php, Profile.template.php)

* More helpful error message when the MySQL server is outdated. I'll leave it to Pete to decide whether we should keep testing mysql_get_client_info(), or test it only against MySQL 5.0, or switch to MySQLi. Or whatever. (install.php, Install.language.php)

* Cosmetic rewrites and a typo, I believe. (Class-CSS.php, ManagePlugins.english.php)

* French translation. (ManagePlugins.french.php)

@ Note: okay, I seem to remember you discussed a problem with the skeleton system this week, but can't find where exactly... Was it an issue on your side?

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1138, on October 30th, 2011, 01:19 AM »
(3 modified, 3KB)

Revision: 1138 (a certain cell number comes to mind!)
Author: arantor
Date: 00:19:07, 30 October 2011
Message:
! Fix a typo in the plugin manager, as advised by live627. (ManagePlugins.php)
! Provide a hook for extending the types of plugin validation, as suggested by TE. (ManagePlugins.php, Login2.php)
! Provide a hook for altering the list of posts to be retrieved, as suggested by live627. (ManagePlugins.php, Display.php)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Login2.php
Modified : /trunk/Sources/ManagePlugins.php

Nao

  • Dadman with a boy
  • Posts: 16,046
Re: New revs
« Reply #1139, on October 31st, 2011, 12:13 AM »
rev 1139 (it's no THX, but it's close enough.)
(9 files, 13kb)

* Added $txt['template_block_error'] to use when a block isn't found, as opposed to the current error that mistakes the block for the entire template... (Subs-Template.php, index.language.php)

* Moved the array insertion code from within the wetem::load method to its own function, so it can be reused by other areas. Thanks John for the fair suggestion. (Subs-Template.php, Subs.php)

* Renamed $txt['modify_cancel'] to $txt['form_cancel'] and added $txt['form_submit']. Maybe I should remove all other language strings that say 'Submit', and convert $txt['save'] to $txt['form_save']? (Display.template.php, index.template.php, index.language.php)

+ Started adding support for the Noisen thought system. Only adding a few strings for now, the rest of the code is not exactly ready. (index.language.php)

! go_up() and go_down() were mixed up in r1070. Oops! (topic.js)

* Harmonizing translation. (Profile.french.php)

* Typonazi. (Class-Editor.php)