From: Honza M. <hon...@ec...> - 2010-08-16 18:41:17
|
Hi, today I submitted some changes in the Subversion. I didn't posted the changes for some time, so I added the list of changes form the last time I sent the changes to this list. The listed changes are in Subversion trunk. If you are using last stable branch of AA and want to switch to trunk version, then do: svn switch https://apc-aa.svn.sourceforge.net/svnroot/apc-aa/trunk and back to last stable branch: svn switch https://apc-aa.svn.sourceforge.net/svnroot/apc-aa/branches/2.50.x Current state of SVN trunk: Stable - we run current code three weeks on one of our production server. Last SVN Changes: 08/16/10 (honzam) - IP Banning for discussion is able to block not only individual IP address, but also subnets - like 157.14.189 (subnets of x.x.x are supported only => not x.x) - see IP Banning slice - new {removeids:<ids1>:<ids2>} - returns ids1 where will be removed all the ids from ids2 (all dash separated) - new {rand:min:max} - returns random integer number from min to max - new {str_repeat:string:times} - repeats string n-times - {fileinfo:<url>:<info>} now allows "size", "type" and "name" as the second - <info> - parameter - validation for unique now is able to not count current item - params are scope:field_id:ignored_item_id - UI - for help messages in field settings used textarea - New possibility to delete trashed unassigned links in Links module - hits are counted for items displayed by sitemodule, which uses SEO_Router ({xid}) - fix of slice.php3 for input type="image" submit - it sends x and y coordinates, so slice.php3 thinks "x" is the item id. It is no longer true - "x" is ignored, when provided also with numerical "y" parameter - old ereg replaced by preg regular expression parser in site module conditions - fixed bug in alerts sending - alerts are sended again - views called by f_v are no longer cached - fixed object storing - used in Forms - fixed sending notifications in slices with reading password set - clenup of phplib, removed unused code - fixed toexecute class to do not try to execute unexecutable tasks (priority 0) - pagecache records are deleted in chunks in order we do not get max_packet_size error from MySQL - javascript triggers for fields rewritten ussing class approach 06/29/10 (honzam) - fixed problem with grabber - which displayed error - fixed multiple checkbox - works with AJAX even if no category is selected 06/28/10 (honzam) - new possibility to write custom AA extensions on regular basis the scripts will be located in include/custom/<AA_CUSTOM_DIR>/ directory, where <AA_CUSTOM_DIR> should be defined in config.php3 file: define("AA_CUSTOM_DIR", "econnect"); // for script in include/custom/econnect/ The files in that directory are: stringexpand.php for AA_Stringexpand_* classes responder.php for AA_Responder_* classes - new possibility to use any AA expression as "spot variable" for conditions in site module branches (choices) - like: {xuser:_#USR_TYPE} = standard The expression in spot variable must begin with "{" and it checks for EQUALity (=) - not regular expressions like with APC variables - {ifeq} extended to use multiple choices: {ifeq:<etalon>:<option1>:<text1>[: ...][:default]} - just like: {ifeq:{xlang}:en:English:cz:Czech:Unknown language} - new <settings> parameter for {view:<vid>[:<ids>[:<settings>]]} - like {view:254::listlen-5} - new <reverse> and <sort> parameters for {treestring:<item_id>[:<relation_field>[:<reverse>[:<sort>]]]}. <reverse> creates the tree for child->parent relations <sort> the order of leaves (currently wors only for reverse trees) {treestring:2a4352366262227383484784635362ab:relation.......1:1:sort[0] [headline........]=a&sort[1][publish_date....]=d} - new possibility to switch the htmltogglecss ON, by deafault: {htmltogglecss:<toggle1>:<toggle2>:<css_rule>:<is_on>} {htmltogglecss:+:-:#id_#SITEM_ID:1} - new {timestamp:<date>} returning unix timestamp for textual date: {timestamp:2008-07-01} {timestamp:20080701t223807} - new {shuffle:<ids>[:<limit>]} - randomises the order of ids and returns up to <limit> ids - new {unique:<ids>[:<delimiter>]} - removes duplicate ids from the string - new <limit> parameter which reduces amount of returned ids for: {ids:<slice>:<conds>[:<sort>[:<delimiter>[:<restrict_ids>[:<limit>]]]]} - {ajax:<item_id>:<field_id>[:<alias>]} could use any AA exprexssions instead of single <alias> - new {xid:list} - returns ids list from start to current item in the tree - like:2587-2877-3004 - new (experimental) {redirect:<url>} - redirects user to specified page directly and right in the time it ocures in the code - could be used inside site module, when you need to redirect user to another branch (say from / to /cz/home) Ussage: {redirect:http#://example.org/en/new-page} - mention the escaped colon in http {redirect:{ifset:{xid}::http#://example.org/en/new-page}} - for conditional redirect - the e-mail images used in "src=" or "background=" attributes of HTML tags in e-mails sended by AA are included in the mail, so the probability of correctly displayed images in a e-mail client is much bigger - fixed text version of e-mail - the <head> and <style> tags are striped out - fixed file uploads for forms with new aa[][] variable syntax - fixed checkbox widget when called as AJAX - filler.php3 returns text in right encoding for ajax widgets - new AA_Refresh(id) javascript function which refreshes the div by ajax calling the url (view) stored in data-aa-url attribute - easier and better ajax widgets - old code stored/recovered on cancel - safer item moving in Item Manager - critical functions optimalized for speed 06/08/10 (honzam) - fixed form editing 04/28/10 (honzam) - fixed Ajax and Live widget for date - now displays selectboxes instead of timestamp number - new possibility of body onLoad trigger in Javascript "Field Triggers" - fixed problem with Alerts - confirmation didn't work when the Reader record do not contain the Confirmed field - widgets now uses HTML with correct ids (no invalid characteds like "[",...) - fix - E-mail notify now uses correct e-mail charset - fixed searches with id.............. field and operators (AND, OR...) - fixed error on Cancel in Form editor - remove unused directories - misc/oldDb2Db, misc/file2slice/tab2slice_php - {ajax} and {live} now uses standard AA_Saver functions - changed some queries from QuerySet() to better $aa_set->query() - zids have ArrayAccess interface, so you can use it just like $zids[1], ... - new Iterator interface for AA_Fields object 04/06/10 (honzam) - bigger speedup and cleanup. AA profiled with xdebug and optimized for speed on many places. Most pages are displayed 2-2.5 times faster, than before. Optimized serialization for cache, removed some internal - unnecessary caching, math rewritten to use PHP evaluation, unaliasing much optimized, used quicker php functions, ... - better support for login form in AA_Router_Seo site module login username and password also could be sumbmitted by GET method - new {ifeqfield:<item_id>:<field>:<var>:<text>:<else-text>} If any value of the (multivalue) $field is equal to $var, then print $text, else print $else_text. $(else_)text could contain _#1 alias for $var, but you can use any {} AA expression. You can ommit $item_id if you want to use current item Example: {ifeqfield:{xid}:category.......1:Nature: class="green"} Example: {ifeqfield::category.......1:Nature: class="green"} - new {ifin:<haystack>:<needle>:<text>:<else_text>} If $haystack contain $needle, then print $text, else print $else_text (else_)text could contain _#1 and _#2 aliases for $haystack and $needle Example: {ifin:ActionApps CMS:CMS:yes:no} - new {site:<site_id>:<property>} - get site module property (currently only "modules" is suprted - dash separated list of slices in the site Use it for example for computing of seo name: {ifset:{seo.............}:_#1:{seoname:{_#HEADLINE}:{site:{modulefield: {_#SLICE_ID}:site_id}:modules}}} - new {randomstring:<length>} - returns random string of given length - new {encrypt:<text>:<key>} and {decrypt:<text>:<key>} Encrypts/decrypts the $text using $key as password (mcrypt PHP extension must be installed) - {treestring:...} now returns only active items (ignore expired, trashed, ...) - fix - {ajax:...} change now works also with jQuery AA library /javascript/aajslib-jquery.php - no more adding unnecessary rXn=1 url parameter for old Netscape 4.7 browser Older changes you will find in CHANGES file: http://apc-aa.svn.sourceforge.net/viewvc/apc-aa/trunk/CHANGES?view=markup Volunteers, who will rewrite the changes from CHANGES file to http://actionapps.org documentation are strongly welcomen. Best, Honza |