From: Honza M. <hon...@ec...> - 2007-02-08 17:03:48
|
Hello, Norbert Brazda pointed out, that there are some problems with current SVN version of AA under PHP4. The Error looks like: > Parse error*: parse error, unexpected T_OBJECT_OPERATOR in > */www/htdocs/apc-aa/include/item.php3* on line *379 and is caused by code: return AA_Slices::getSlice($this->getSliceID())->getWidgetAjaxHtml($field= _id, $this->getItemID(), $this->getAaValue($field_id)); The problem is, that PHP4 do not allow to use function call as object, so getSlice(..)->getWidgetAjaxHtml() causes problem. The solution is to rewrite the code to: $slice =3D AA_Slices::getSlice($this->getSliceID()); return $slice->getWidgetAjaxHtml($field_id, $this->getItemID(), $this->ge= tAaValue($field_id)); There is more than this one occurrence of this problem in SVN. I didn't noticed the problem, since we are no longer use PHP4 (BTW, current PHP5 works very well with eAccelerator - al least the versions we are using). I hope there will not be more such problems, since I still trying to make AA compatible with PHP4. Norbert is currently fixing the problems and he will commit the changes to the SVN. Thanks Norbert! Honza Honza Malik p=ED=B9e v =DAt 06. 02. 2007 v 20:18 +0100: > Hello, >=20 > today I submitted a lot of changes to Subversion and days before als= o > to CVS. >=20 > The changes in CVS are mainly bugfixes, so the code from CVS should > be "super" stable, right now. We ran this code for months on our > production server.=20 > (It was probably last changes commited to CVS. Bye bye, CVS). >=20 > Changes in Subversion are huge. Many code inside AA was rewritten to > use new object approach in order to be more easy extensible (No, packed > ids are still not removed, but it will be next step). Also there are > some new features. However, the code is already quite stable. We are > running this SVN version of AA on our main production server for three > weeks already, we fixed all the bugs we found, so I can say it works. I= f > there will not be any problems with this version I will regenerate > language files and release it as AA 2.12 >=20 > There is need to update database structure using sql_update.php3 > script to run SVN version, since the definition of object_* tables is > different a bit. >=20 >=20 > Current SVN state:=20 > Stable - used on Econnect's production server for 22 days > (PHP 5.2.1-dev, eAccelerator-0.9.6-svn282-dev, MySQL 5.0.27= ) >=20 > Last SVN Changes: >=20 > 02/06/07 (honzam) > - new possibility to grant AA permissions to only subset of users from > Reader Slice. The "Reader Set" is defined by normal conditions, so > it is extremely powerful - you can use any field of Reader slice > for it. The conditions are controlled be new AA_Set feature, which > holds set of conditions and sorts (we will use such "Sets" as named > conditions to view.php3/slice.php3 in near future). The set is > defined on "Slice Admin -> Design - Sets of Items". > The "reader set" works just with LDAP permission system, right now, > but it is very easy to adapt it also for SQL permissions. > - image manipulation library phpThumb integrated into AA. You can use > it by calling /img.php script: > <img src=3D"/aaa/img.php?src=3Dhttp://example.com/img/flower.gif&w=3D= 150"> > (w=3D150 means that image will be converted to width=3D150). > All the parameters you can see on > http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php > (just use img.php instead of phpThumb.php in the examples) > The modified images are cached in <IMG_UPLOAD_PATH>/phpThumbcache/ > - new possibility to define external script as Control File for Site > Module, so you can give this script to your users without the need t= o > give them also rights to edit AA files. > There are two possibilities, how to control the apc_state > variable. It could be se in ./modules/site/sites/site_...php > control file. The control file could be managed only by people, > who have the access to the AA sources on the server. If we want t= o > permit control of the site to extenal people, which do not have > access to AA scripts directory, then it is possible to them to no= t > fill "site control file" in site configuration dialog and then > call this script from their own file, where the new $apc_state, > $slices4cache and $site_id will be defined and passed by GET > method. Just like this: > $url =3D 'http://example.org/apc-aa/modules/site/site.php3?'; > $url .=3D http_build_query( array( > 'apc_state' =3D> $apc_state, > 'slices4cache' =3D> $slices4cache, > 'site_id' =3D> 'ae54378beac7c7e8a998e7de8a998e7= a' > )); > readfile($url); > See apc-aa/modules/site/sites/external_controlfile_example.php3 for > more info > - Basic spam filter solution for discussions. It is based > on the presumption, that the robots fill all the fields in the form, > even the hidden ones. filler.php3 then never stores comment, which > would have "answer" field filled. So if you add say: > <style type=3D"text/css"> > .skryt { display:none }; > </style> > <div class=3D"skryt"> > Do not fill, please: <input type=3D"text" name=3D"answer" value= =3D""> > </div> > to the form, then the comments form is "protected". It works quite > well, but of course it should be improved in future. > - stringexpand functions was converted to classes AA_Stringexpand_..., > which is more flexible and will allow to add new custom syntaxes > {custom_function:..} in the future. > - the result of most time consuming stringexpand functions is cached > now, so if you will use {ids:...} and then again {ids:...} with the > same parameters during displaying one page, then the database is > contacted just once. The unaliasing is faster then (thanks to new > AA_Stringexpand class). > - new {htmltoggle:<toggle1>:<text1>:<toggle2>:<text2>} which creates > the link text1 (or text2) and two divs, where only one is visible at > the time > see http://www.actionapps.org/en/Syntax > - new parameter <restict_ids> for > {ids:<slices>:<conds>[:<sort>[:<delimiter>[:<restrict_ids>]]]} > see http://www.actionapps.org/en/Syntax for more details > - better {icq}, {skype}, {jabber} handling > - speedup of AA unaliasing by better regular expression handling > (x-times speedup for complicated AA expressions - like forms) > - new {aggregate:function:ids_string:expression:parameter} which > operates across set of items. The possible functions are: > sum, average, concat, count > parameter is used just for concat (concatenation) as delimiter > expression could be field_id as well as alias > (see http://www.actionapps.com/en/Syntax for more details) > - new {strlen:<string>} alias function (returning length of the string= ) > - new parameter "add" for {substr:<string>:<begin>:<length>:<add>} > alias function. The <add> parameter is added to the returning string= , > but only if the resulting string is shorter than current <string>. > It is useful if you want to short the headline to max 60 characters, > and add three dot, in the case the headline is shorted: > {substr:{headline........}:0:60:...} > - new {trim:<string>} alias function - removes beginning and ending > spaces from the <string> - see php trim() function > - new possibility for {conds:<string>} alias function. Now you can > create condition based on value of the field (including multivalue): > {view.php3?vid=3D9&cmd[9]=3Dc-1-{conds:category.......1}}, where > {conds:category.......1} is expanded to something like > '%22Squash%22%20OR%20%22Table%20Tenis%22', which is urlencoded > "Squash" OR "Table Tenis". This way you can find all people, who hav= e > at least one common hobby with you. > - new {constant:<group_id>:<value>:<what>} which allows to get > the 'Name' of constant in <group_id> for the specified <value> > say {constant:apc_main_categs_:ENV:name} returns "Environment". > Default value for <what> parameter is "name", so if you want to know > the name, then you can omit it. > - session ids are passed by GET (again) - not by cookies, since there > was problems with it (the tabs in firefox shares the cookies, > so multiple tabs uses the same session id, which is still not ok > for some pages in AA administration. > - It is possible to specify more than one searchbar default condition > in profiles, now; code moved to more object oriented - using > AA_Conditions, ... > - textareas in AA forms automatically get bigger, if it already > contains long text > - admin interface for discussion now contains information about > IP address of comments writer > - new possibility to use conds[] and sort[] also for constants used fo= r > displaying some Input Type. Now you are able to sort the constants > transparently at the time it is displayed in the selectbox, for > example. You are also able to display only constants containing > "Nature", have value bigger than 1000, ... > - added some classes to discussion output, so it is more skinable, now. > - better handling of empty search row (change in inner code) in search > bar > - added modules/polls to SVN repository - This module allows voting > on page - it uses "phpPolls" code and it is not completed yet. > Anyway it is better to have it in the svn in order other can look > and finish it since Pavel Jisl (original author) is no longer > available for this work. > - GUI improvement in view setting - link to view is not in popup > - Cleanup > - class names now uses standard naming convention - prefix AA_ and > name with all first letters in upper case (manager =3D> AA_Manage= r) > - global functions now rewritten to static class methods, where > appropriate (sliceid2name() =3D> AA_Slices::getName()) > - class methods begins with lower caps letter > - cleanup of QueryZids() parameters - fields are no longer needed, > as well as other unused parameters > - new AA_Object, AA_Property, AA_Widget, AA_Fields, AA_File_Wrapper= , > AA_Set classes. Many uses standard AA properties and prepared for > easy extensibility of the code > - regular expressions ereg functions replaced by faster preg > functions, where possible > - new AA_File_Wrapper class, which is used for accessing local > as well as remote (http:, ftp:) files > - new implementation of storable_class - more object oriented, more > robust. It is based on AA_Object super-parent class and its > getPersistentProperties() method, which should be overriden in al= l > Child classes which want to be persistent. The objects are stored > to new object tables (object_text, object_integer, object_float). > - improved valiadion class AA_Validate > - new javascript AA_Config object storing AA_INSTALL_PATH, > ... for usage in AA javascripts > - added "prototype" javascript library to the AA. It have some very > nice features like function $(), which is shortcut for > document.getElementById, DOM manipulation functions AJAX, ... We wil= l > use it intensively in near future. > see http://www.prototypejs.org/ > - database structure updated - fields in object_* tables renamed to > match common structure > - pagecache uses REPLACE command where possible > (instead of SELECT+INSERT/UPDATE) > - new optimization functions in AA Optimize > - Convert no longer used slice.category_sort to slice.group_by > - Copy Content Table >=20 > - fixed banner parameter and some more fixes in slice.php3 > - fixed problem with some filenames in CSV import > - small changes and bugfixes in slice export, authentication and > pagecache > - fixed database structure to be compatible with MySQL > 4.1 > (binary changed to varbinary) > - fixed sql permission system, so it works also if crypt() function > of the system uses Blowfish encryption > - fixed problems with charsets in AA Admin interface on some systems > (php 5.2?) > - the xinha (wysiwyg HTML area) do not report javascript error, now > (dirty hack, for now) > - fixed bug in link checking code (used in Links module) - the server > response wasn't parsed well, when the response text contains > apostrophe (Italian server responses for 404 uses such character) > - fixed bug in {math} - now work again >=20 >=20 > Current CVS state: Stable > Used on Econnect's production servers for months >=20 > Last CVS Changes: >=20 > 02/01/07 (honzam) > - Basic spam filter solution for discussions. It is based > on the presumption, that the robots fill all the fields in the form, > even the hidden ones. filler.php3 then never stores comment, which > would have "answer" field filled. So if you add say: > <style type=3D"text/css"> > .skryt { display:none }; > </style> > <div class=3D"skryt"> > Do not fill, please: <input type=3D"text" name=3D"answer" value= =3D""> > </div> > to the form, then the comments form is "protected". It works quite > well, but of course it should be improved in future. > - textareas in AA forms automatically get bigger, if it already > contains long text > - new {htmltoggle:<toggle1>:<text1>:<toggle2>:<text2>} which creates > the link text1 (or text2) and two divs, where only one is visible at > the time > see http://www.actionapps.org/en/Syntax > - new parameter <restict_ids> for > {ids:<slices>:<conds>[:<sort>[:<delimiter>[:<restrict_ids>]]]} > see http://www.actionapps.org/en/Syntax for more details > - better {icq}, {skype}, {jabber} handling > - fixed problem with some filenames in CSV import > - small changes and bugfixes in slice export, authentication and > pagecache >=20 > 12/14/06 (honzam) > - speedup of AA unaliasing by better regular expression handling > (x-times speedup for complicated AA expressions - like forms) > - new {strlen:<string>} alias function (returning length of the string= ) > - new parameter "add" for {substr:<string>:<begin>:<length>:<add>} > alias function. The <add> parameter is added to the returning string= , > but only if the resulting string is shorter than current <string>. > It is useful if you want to short the headline to max 60 characers, > and add three dot, in the case the headline is shorted: > {substr:{headline........}:0:60:...} > - new {trim:<string>} alias function - removes beginning and ending > spaces from the <string> - see php trim() function > - new possibility for {conds:<string>} alias function. Now you can > create condition based on value of the field (including multivalue): > {view.php3?vid=3D9&cmd[9]=3Dc-1-{conds:category.......1}}, where > {conds:category.......1} is expanded to something like > '%22Squash%22%20OR%20%22Table%20Tenis%22', which is urlencoded > "Squash" OR "Table Tenis". This way you can find all people, who hav= e > at least one common hobby with you. > - new {constant:<group_id>:<value>:<what>} which allows to get > the 'Name' of constant in <group_id> for the specified <value> > say {constant:apc_main_categs_:ENV:name} returns "Environment". > Default value for <what> parameter is "name", so if you want to know > the name, then you can omit it. > - new possibility to define external script as Control File for Site > Module, so you can give this script to your users without the need t= o > give them also rights to edit AA files. > There are two possibilities, how to control the apc_state > variable. It could be se in ./modules/site/sites/site_...php > control file. The control file could be managed only by people, > who have the access to the AA sources on the server. If we want t= o > permit control of the site to external people, which do not have > access to AA scripts directory, then it is possible to them to no= t > fill "site control file" in site configuration dialog and then > call this script from their own file, where the new $apc_state, > $slices4cache and $site_id will be defined and passed by GET > method. Just like this: >=20 > $url =3D 'http://example.org/apc-aa/modules/site/site.php3?'; > $url .=3D http_build_query( array( > 'apc_state' =3D> $apc_state, > 'slices4cache' =3D> $slices4cache, > 'site_id' =3D> 'ae54378beac7c7e8a998e7de8a998e7= a' > )); > readfile($url); > - admin interface for discussion now contains information about > IP address of comments writer > - fixed database structure to be compatible with MySQL > 4.1 > (binary changed to varbinary) > - fixed sql permission system, so it works also if crypt() function > of the system uses Blowfish encryption > - fixed problems with charsets in AA Admin interface on some systems > (php 5.2?) > - the xinha (wysiwyg HTML area) do not report javascript error, now > (dirty hack, for now) > =20 > 11/15/06 (honzam) =20 > - new possibility to use conds[] and sort[] also for constants used for > displaying some Input Type. Now you are able to sort the constants > transparently at the time it is displayed in the selectbox, for > example. You are also able to display only constants containing > "Nature", have value bigger than 1000, ... > - stringexpand functions was converted to classes AA_Stringexpand_..., > which is more flexible and will allow to add new custom syntaxes > {custom_function:..} in the future. > - the result of most time consuming stringexpand functions is cached > now, so the unaliasing is faster. > - added some classes to discussion output, so it is more skinable, now. > - fixed bug in link checking code (used in Links module) - the server > response wasn't parsed well, when the response text contains > apostrophe (Italian server responses for 404 uses such character) > - better handling of empty search row (change in inner code) in search > bar > - site module now supports external control file, so the users, who > want to use site module do not need the access to AA scripts. > The control file looks exactly as the normal control file for site > module but at the end we call the site.php3 with site_id, > slices4cache and apc_state parameters, just like: > $url =3D 'http://example.org/apc-aa/modules/site/site.php3?'; > $url .=3D http_build_query( array( > 'apc_state' =3D> $apc_state, > 'slices4cache' =3D> $slices4cache, > 'site_id' =3D> 'ae54378beac7c7e8a998e7de8a998e7= a' > )); > readfile($url); > - fixed bug in {math} - now work again > =20 > 10/14/06 (brazda) > - added profile support and profile settings button also for groups >=20 --=20 |