New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #1170, on November 20th, 2011, 12:21 AM »
rev 1170
(3 files, 9kb)

+ Added a welay object that can be used to do method chaining on template layers/blocks. Use wetem::get() to get the default layer, or ::get('something') to retrieve the 'something' layer or block. Then you can chain ->append('new_block')->wrap('new_layer') methods on it. (Subs-Template.php)

+ welay supports the following methods, which are all shortcuts to other wetem methods: parent() (will return the parent object), append() (add items to current), prepend() (add items at the beginning of the current), before/after/erase (add items before/after/in place of current), replace() (add items in place of current layer, but leave its sub-layers inatct), remove/rename() (remove/rename layer/block), and wrap()/inner() which will respectively add a layer around the current, or at the top level inside the current. (Subs-Template.php)

* Renamed 'replace' to 'erase' in the ::layer() function, because that was the equivalent in ::load(). (Subs-Template.php)

* ::find_parent() is now a public method. I don't think it's going to hurt anyone anyway... (Subs-Template.php)

- Removed reference to #ic_recentposts, now unused. (index.rtl.css)

* Simplified unextends code in CSS parser. Basically, 'unextend' was an accepted keyword and it was a bit confusing. Now, only 'unextends' will be accepted. Also using word boundaries to make the regexp simpler. (Class-CSS.php)

@ To Pete: much of this is untested, I'm afraid, although it works for the regular uses in Wedge itself... Please analyze the object (and diff) carefully and make sure to tell me if anything looks wrong!
Re: New revs
« Reply #1171, on November 20th, 2011, 11:00 PM »
rev 1171
(4 files, 4kb)

* The Ajax code for sending thoughts will now return a parsed thought, so that it's correctly bbc-parsed when shown. (Ajax.php, Xml.template.php, script.js)

* Make sure the welay object defaults to the default layer. (Subs-Template.php)

* Wrapped the keep-alive code in its own anonymous function, to save a few bytes and avoid using a global var. (script.js)

- sendXMLDocument didn't need the extra {} in its code. (script.js)

- Changed ajaxRating to use an anonymous callback function, instead of polluting the namespace with ajaxRating2. (script.js)

@ Note: editing a thought will still incorrectly show a HTML version of it... It should be retrieved through Ajax, at least if some kind of HTML is found in it.
Re: New revs
« Reply #1172, on November 21st, 2011, 03:30 PM »
rev 1172
(2 files, 1kb)

! Turned the file cache getter function's require() into an include(), because in some silly situations, it may be rejected even if the file is there. Because Wedge would automatically rebuild the cache in this situation, there's no reason in stopping page generation at this point. (Subs-Cache.php)

! Forgot a closing div for guests with no login bar. This would totally break the Warm skin in older versions of Firefox. Scary when you're not expecting it. (index.template.php)
Re: New revs
« Reply #1173, on November 23rd, 2011, 07:37 AM »
rev 1173
(2 files, 1kb - thought there'd be more stuff to separate from the upcoming commit...)

! Recent posts were missing their title. Reintroduced $txt['recent_posts'] that was removed in rev 1168. (index.language.php)
Re: New revs
« Reply #1174, on November 23rd, 2011, 07:39 AM »
rev 1174
(5 files, 7kb)

+ Implemented basic support for adding block/layer options in the skeleton, and related bits. (Load.php, Subs-Cache.php, Subs-Template.php)

+ Added support for custom indentation in blocks and layers. For instance, just add the indent="-1" keyword in a layer or block to remove an indentation tab off the layer and all its nested blocks/layers. Used to good effect in Warm to get rid of the silly indent glitches introduced by layer movements. (Subs-Template.php, Warm/skin.xml)

* Some indentation fixes that can be introduced thanks to the above. (index.template.php)
Re: New revs
« Reply #1175, on November 24th, 2011, 03:15 PM »
rev 1175
(19 files, 19kb -- mostly in Subs-Template)

* An extensive rewrite of the wetem object adds support for static methods that were previously only in welay (now renamed to wetemItem), hopefully providing an easier to remember syntax. replace() is renamed to load(), erase() to replace(), find_parent() to parent(), wrap() to outer(), append/prepend() are back to add() and first(). Mostly because jQuery doesn't dictate our naming conventions, although I suppose we can add aliases. (Subs-Template.php)

* Updated Wedge codebase to use the new wetem methods. (index.php, Admin.php, Boards.php, Display.php, ManageAttachments.php, Aeva-Gallery.php, ManageMedia.php, ManageMedia3.php, MessageIndex.php, PersonalMessage.php, Post.php, Profile.php, Subs-Menu.php, Unread.php, UnreadReplies.php, Welcome.php, SSI.php, Warm/skin.xml)

! wetem::before (and its equivalent earlier incarnation) would actually act like ::after. (Subs-Template.php)
Re: New revs
« Reply #1176, on November 24th, 2011, 04:09 PM »
rev 1176
(12 files +1-1, 18kb)

! Overhauled the readme_*.html and ssi_examples.php files to actually look good instead of broken. Also updated Wedge logo to the latest... Until the next one, of course. (readme_*.html, wedgelogo.png)

- Removed the middletext class. The difference in size between normaltext and smalltext is already negligible enough, and it was barely used anyway... (install.php, readme_*.html, ssi_examples.php, upgrade.php, Display.template.php, index.css)

- Removed more unused CSS IDs (#postbuttons and a remaining #ic_recentposts). (sections.css)
Re: New revs
« Reply #1177, on November 24th, 2011, 08:37 PM »
rev 1177
(4 files, 4kb)

+ Added proper retrieval of current thought (through Ajax) when editing a thought that has BBCode in it. (Ajax.php, script.js)

* Optimized getXMLDocument and sendXMLDocument for size. But it won't compensate for the few bytes added by the above... (script.js)

- The stats don't make use of oXmlRequestHandle. (stats.js)

! The auto-suggest does, though. Althought I'm not sure it works at this point, or is even needed, considering we're using jQuery and all that. (suggest.js)
Re: New revs
« Reply #1178, on November 25th, 2011, 10:02 PM »
rev 1178
(3 files, 2kb)

! The wetem rewrite forgot to pass the result of wetem::op() onto the caller. (Subs-Template.php)

+ Also added a return value for most other wetem methods that users might wanna check. (Subs-Template.php)

! wetem::insert_layer() was testing for 'parent', instead of 'outer'. (Subs-Template.php)

! Fixed bad line heights for smalltext and normaltext CSS classes. (index.css)

* Commenazi. (Warm/skin.xml)

@ Should we bother testing for insert_layer and remove_layer return values in wetem::layer()..? I think that's the only place where we got missing return values, but OTOH it's very unlikely the functions will return false at this point...
Re: New revs
« Reply #1179, on November 27th, 2011, 05:50 PM »
rev 1179
(7 files, 10kb)

* Finished implementing the thought system... Hopefully. The main thing here was to get Wedge to show your newly sent thoughts in the thought box if you're on the homepage. Can't believe it was so complicated just to do that... (Ajax.php, Post.language.php, script.js, index.member.css, Xml.template.php)

! Fixed thought action form's layout. (index.member.css)
Re: New revs
« Reply #1180, on November 29th, 2011, 10:48 AM »
rev 1180
(3 files, 1kb) (I remember the good old days when TortoiseSVN would report 3KB for the same amount of changes... It doesn't look as impressive now, but at least it's more honest :P)

! Profile link deletions and color replacements were broken when user had no cookie set yet. Thanks Pete for the report. (Subs-Template.php)

* Replaced the div tag for smileys with a shorter i tag, which is semantically a bit better, and will still validate when shown in inline text. Plus, well, it's shorter. (Class-Editor.php, Subs-BBC.php,

! The <ins> tag is rendered by browsers as underline, so it should be turned to a 'u' BBCode at conversion time. (Class-Editor.php)
Re: New revs
« Reply #1181, on November 29th, 2011, 02:36 PM »
rev 1181
(3 files, 3kb)

* Hide new/edit/delete buttons when interacting with a thought. (script.js, index.member.css)

! Various fixes to the sidebar thought editor. And yeah, they're totally obscure... (Ajax.php, script.js, index.member.css)
Re: New revs
« Reply #1182, on November 29th, 2011, 03:00 PM »
rev 1182
(4 files, 11kb)

+ Finally added the thought list to the welcome page. Fully working, hopefully... (Welcome.php, Welcome.template.php, index.member.css)

* Cleaned up profile area's thoughts page, if only because it's a bit complicated to fit edit/new links into that area... Will deal with that later for all Facebook-wannabe sites, although it's not a priority. I've spent wait too long on this feature, time to focus on other things... (Profile.template.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1183, on November 30th, 2011, 03:25 PM »
(1 file, 1KB)

Revision: 1183
Author: arantor
Date: 30 November 2011 14:25:03
Message:
! Missing ; would cause the resultant minified code to choke. For once IE9 came to the rescue, telling me what character the error was on, rather than just the line number... (script.js)
----
Modified : /trunk/Themes/default/scripts/script.js
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 #1184, on December 2nd, 2011, 07:45 PM »
rev 1184
(3 files, 7kb)

! Thoughts should be pre-parsed before saving. (Ajax.php)

* The homepage thought code wasn't using the MVC model... Ouch. (Welcome.php, Welcome.template.php)