[Aikiframework-devel] [Bug 901864] Re: You can't use aiki markup in parentheses
corrected in revision 1120 ** Changed in: aikiframework Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Aiki Framework Developers, which is subscribed to aikiframework. https://bugs.launchpad.net/bugs/901864 Title: You can't use aiki markup in parentheses Status in Aiki Framework: Fix Released Bug description: If you put script inside parentheses it will parse it as value from db ((script( $aiki->Class->foo(); )script)) and you wanted to display (value_returned_from_foo) - value from function foo in parentheses, but instead aiki display nothing because it can find db value "script( $aiki->Class->foo(); )script". I think that this will be the same with other aiki markup like permission. To manage notifications about this bug go to: https://bugs.launchpad.net/aikiframework/+bug/901864/+subscriptions ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
Re: [Aikiframework-devel] [Bug 901864] Re: You can't use aiki markup in parentheses
rock On Sun, Mar 4, 2012 at 7:41 PM, rg1024 <901...@bugs.launchpad.net> wrote: > corrected in revision 1120 > > ** Changed in: aikiframework > Status: Confirmed => Fix Released > > -- > You received this bug notification because you are subscribed to > aikiframework. > https://bugs.launchpad.net/bugs/901864 > > Title: > You can't use aiki markup in parentheses > > To manage notifications about this bug go to: > https://bugs.launchpad.net/aikiframework/+bug/901864/+subscriptions -- Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing) -- You received this bug notification because you are a member of Aiki Framework Developers, which is subscribed to aikiframework. https://bugs.launchpad.net/bugs/901864 Title: You can't use aiki markup in parentheses Status in Aiki Framework: Fix Released Bug description: If you put script inside parentheses it will parse it as value from db ((script( $aiki->Class->foo(); )script)) and you wanted to display (value_returned_from_foo) - value from function foo in parentheses, but instead aiki display nothing because it can find db value "script( $aiki->Class->foo(); )script". I think that this will be the same with other aiki markup like permission. To manage notifications about this bug go to: https://bugs.launchpad.net/aikiframework/+bug/901864/+subscriptions ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
Re: [Aikiframework-devel] engine2 have a sql markup
On Sat, Mar 3, 2012 at 8:08 PM, Jakub Jankiewicz wrote: > > > On Sat, 3 Mar 2012 17:32:36 +0100 > Roger Martín wrote: > > > Hi folks! > > > > instead have a endless discussion about markup we can check candidate > > markup with this list: > > > > 1) support a 'rich' parameters block, a true-block, and a else-block > > > > 2) is consistent? Test in 3 forms: only with a parameter block, > > parameters+true-block, parameters+true+else. > > > > 3) Lets Mr codemirror decide. Can codemirror highlights code > > correctly ? > > I think that we can add our own syntax for highlighter in codemirror, > Bassel mention that Aiki have some custom code in codemirror so maybe > he was talking about highlighter. > > yes part of it because aiki has custom highlighter, it's easy to add to codemirror. also there was a system level bug in codemirror that I'm not sure if it's fixed in the latest release. > > > > 4) Now Mr. PHP Can php parse the markup with a low level parser? > > > > One no respond and the markup will be discarded. > > > > > > Example: > > Canditate: (tag( parameters ) true-block )else( else-block )tag) > > > > 1) parameters: (tag( 1, false, "some",{"foo":"bar")) OK > > > > 2) consistent? > > (tag( foo)tag) ok > > (tag(foo)true-block)tag) ..wait a moment two ")" and three ")". > > DISCARDED. > > Exactly my proposal. Personally the syntax may change I only want to be > able to have real "if" and "for", and be able to use extensions in both. > I also want to be able to call sql without knowing the fields so I > would like to call something like > > (sql( SELECT * FROM (!(1)!) USING table )sql) > > or Roger's > > (sql( "SELECT * FROM (!(1)!)", ???, "table" )sql) > > The reason why I wanted it was that I wanted to implement Admin Panel in > Aiki without access to the server (like extensions or other php script). > But even if I don't need it now is a good idea to have it. > > > > > > > > > ops..Now i looking for new markup ;-) > > I try to be consistent with my proposal, I use best element what was > in old aiki ((field)) and create a markup based on it, I try to every > element be the same, and to be very low number of element, the only > that was essential. > > > > Roger > > -- > Jakub Jankiewicz > twitter: @jcubic > www: http://jcubic.pl > > ___ > Mailing list: https://launchpad.net/~aikiframework-devel > Post to : aikiframework-devel@lists.launchpad.net > Unsubscribe : https://launchpad.net/~aikiframework-devel > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
[Aikiframework-devel] about 1122: widgets show by sites, tree and all route
Hi folks!! In last revision i made some changes in the way how aiki admin shows widgets list: - sites appears as main branch of tree. - if config variable display_used_widgets is true, widgets appear it all routes (display_url). For example a global javascript wil appears in all routes. - if config vairable display_widgets_as_tree is true, widgets appears as tree: each children under his father. Problems: a) benchmark. Now a site with 100 widgets generate a tree with 100 branch because aiki filters repeated widgets. With this changes if you have two global widgets, the tree will have 300 branch (bassel wrote about this in bug (https://bugs.launchpad.net/aikiframework/+bug/678323) . For example: firefox needs 15sec to show 500 branchs. b) manual configuration. Roger ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
Re: [Aikiframework-devel] about 1122: widgets show by sites, tree and all route
Roger, I'm sitting here in anticipation of the rest of your email and that code drop. Awesome! On Mon, Mar 5, 2012 at 7:04 AM, Roger Martín wrote: > Hi folks!! > > In last revision i made some changes in the way how aiki admin shows widgets > list: > - sites appears as main branch of tree. > - if config variable display_used_widgets is true, widgets appear it all > routes (display_url). For example a global javascript wil appears in all > routes. > - if config vairable display_widgets_as_tree is true, widgets appears as > tree: each children under his father. > > Problems: > a) benchmark. Now a site with 100 widgets generate a tree with 100 branch > because aiki filters repeated widgets. With this changes if you have two > global widgets, the tree will have 300 branch (bassel wrote about this in > bug (https://bugs.launchpad.net/aikiframework/+bug/678323) . For example: > firefox needs 15sec to show 500 branchs. > > b) manual configuration. > > > Roger > > > > > ___ > Mailing list: https://launchpad.net/~aikiframework-devel > Post to : aikiframework-devel@lists.launchpad.net > Unsubscribe : https://launchpad.net/~aikiframework-devel > More help : https://help.launchpad.net/ListHelp > -- Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing) ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
Re: [Aikiframework-devel] engine2 have a sql markup
Bassel, could you look into this? We should try to keep the code separate from ours if possible, and send them a fix upstream if that will help, but I have not looked at this at all. march 21 aiki 0.9.1 coming up soon! Jon On Mon, Mar 5, 2012 at 3:54 AM, Bassel Safadi wrote: > > > On Sat, Mar 3, 2012 at 8:08 PM, Jakub Jankiewicz wrote: >> >> >> >> On Sat, 3 Mar 2012 17:32:36 +0100 >> Roger Martín wrote: >> >> > Hi folks! >> > >> > instead have a endless discussion about markup we can check candidate >> > markup with this list: >> > >> > 1) support a 'rich' parameters block, a true-block, and a else-block >> > >> > 2) is consistent? Test in 3 forms: only with a parameter block, >> > parameters+true-block, parameters+true+else. >> > >> > 3) Lets Mr codemirror decide. Can codemirror highlights code >> > correctly ? >> >> I think that we can add our own syntax for highlighter in codemirror, >> Bassel mention that Aiki have some custom code in codemirror so maybe >> he was talking about highlighter. >> > > yes part of it because aiki has custom highlighter, it's easy to add to > codemirror. also there was a system level bug in codemirror that I'm not > sure if it's fixed in the latest release. > >> >> > >> > 4) Now Mr. PHP Can php parse the markup with a low level parser? >> > >> > One no respond and the markup will be discarded. >> > >> > >> > Example: >> > Canditate: (tag( parameters ) true-block )else( else-block )tag) >> > >> > 1) parameters: (tag( 1, false, "some",{"foo":"bar")) OK >> > >> > 2) consistent? >> > (tag( foo)tag) ok >> > (tag(foo)true-block)tag) ..wait a moment two ")" and three ")". >> > DISCARDED. >> >> Exactly my proposal. Personally the syntax may change I only want to be >> able to have real "if" and "for", and be able to use extensions in both. >> I also want to be able to call sql without knowing the fields so I >> would like to call something like >> >> (sql( SELECT * FROM (!(1)!) USING table )sql) >> >> or Roger's >> >> (sql( "SELECT * FROM (!(1)!)", ???, "table" )sql) >> >> The reason why I wanted it was that I wanted to implement Admin Panel in >> Aiki without access to the server (like extensions or other php script). >> But even if I don't need it now is a good idea to have it. >> >> >> >> > >> > >> > ops..Now i looking for new markup ;-) >> >> I try to be consistent with my proposal, I use best element what was >> in old aiki ((field)) and create a markup based on it, I try to every >> element be the same, and to be very low number of element, the only >> that was essential. >> > >> > Roger >> >> -- >> Jakub Jankiewicz >> twitter: @jcubic >> www: http://jcubic.pl >> >> ___ >> Mailing list: https://launchpad.net/~aikiframework-devel >> Post to : aikiframework-devel@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~aikiframework-devel >> More help : https://help.launchpad.net/ListHelp > > -- Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing) ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel@lists.launchpad.net Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp
[Aikiframework-devel] [Branch ~aikiframework-devel/aikiframework/trunk] Rev 1122: widgets show by sites, tree and all route
revno: 1122 committer: Roger Martin branch nick: aikiframework timestamp: Sun 2012-03-04 23:48:06 +0100 message: widgets show by sites,tree and all route modified: assets/apps/admin/urls_widgets.php -- lp:aikiframework https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk Your team Aiki Framework Developers is subscribed to branch lp:aikiframework. To unsubscribe from this branch go to https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription === modified file 'assets/apps/admin/urls_widgets.php' --- assets/apps/admin/urls_widgets.php 2012-01-09 13:48:54 + +++ assets/apps/admin/urls_widgets.php 2012-03-04 22:48:06 + @@ -28,61 +28,116 @@ require_once("../../../bootstrap.php"); +// When is on (true) widgets will be not repeated, in tree, +// When is off widgets wigelts will be repeated, appearing in allroute +$hideUsedWidgets = config('display_used_widgets',false); +$showAdminWidgets = config('admin_widgets_display',false); +$showWidgetsAsTree = config('display_widgets_as_tree',false); + /** * @see membership.php */ -if ($membership->permissions != "SystemGOD"){ +if ( $membership->permissions != "SystemGOD"){ die("You do not have permissions to access this file"); } +function item ( $parent,$id,$content,$type='link'){ + global $items ; + $items[$id]=array($parent,$content,$type); +} + + + + + echo ' '; // admin widgets not shown by default -if ( $config['admin_widgets_display'] ) -$get_urls = $db->get_results("select distinct display_urls from aiki_widgets where display_urls != '' order by BINARY display_urls"); -else -$get_urls = $db->get_results("select distinct display_urls from aiki_widgets where app_id !=1 and display_urls != '' order by BINARY display_urls"); - -$used = array(); -$used_url = array(); -foreach ($get_urls as $url){ - - if ($url->display_urls == "*"){ - $url->display_urls = "Global"; - } - $multi_url = explode("|", $url->display_urls); - - if (isset($multi_url['1'])){ - $url->display_urls = $multi_url[0]; - } - - if (!in_array($url->display_urls, $used_url)){ - echo ''; - } - - $used_url[$url->display_urls] = $url->display_urls; - - $get_widgets = $db->get_results("select id, widget_name, father_widget, is_father, display_urls from aiki_widgets where display_urls = '$url->display_urls' or display_urls LIKE '$url->display_urls|%' or display_urls LIKE '$url->display_urls/%' or display_urls = '*' order by display_order,id"); - if($get_widgets){ - foreach ($get_widgets as $widget){ - - if (!in_array($widget->id, $used)){ - -if ($widget->father_widget == 0 or $widget->display_urls == $url->display_urls){ - $used[$widget->id] = $widget->id; - echo ''; -}else{ - $used[$widget->id] = $widget->id; - echo ''; + +$sites = $db->get_results ( + "SELECT site_id,site_name,site_shortcut". + " FROM aiki_sites ". + " ORDER BY site_shortcut"); + +$items = array(); + +foreach ( $sites as $site) { + +item( 0,"site{$site->site_id}",$site->site_name); + + $where= "display_urls != '' and widget_site='{$site->site_shortcut}' and father_widget=0 "; + if ( !$showAdminWidgets ) { + $where .= "and app_id<>1"; + } + $get_urls = $db->get_results ( + "SELECT DISTINCT display_urls". + " FROM aiki_widgets". + " WHERE $where". + " ORDER BY BINARY display_order"); + + $used = array(); + $used_url = array(); + $temp =false; + + foreach ($get_urls as $url){ + + $routes = explode("|", $url->display_urls); + + foreach ( $routes as $route) { + if ($route == "*"){ +$route = "Global"; + } + + if (!isset($used_url[$route])){ +$used_url[$route] = true; +item("site{$site->site_id}", "{$site->site_id}-{$route}", $route); + } + + $get_widgets = $db->get_results( +"SELECT id, widget_name, father_widget, is_father, display_urls". +" FROM aiki_widgets". +" WHERE widget_site='{$site->site_shortcut}' AND ( +display_urls = '*' or +display_urls = '$route' or +display_urls like'$route|%' or +display_urls like '%|$route|%' or +display_urls like '%|$route' )". +" ORDER BY father_widget,display_order,id"); + + if($get_widgets){ +foreach ($get_widgets as $widget){ + $current = ($hideUsedWidgets ? "": $route) . $widget->id; + if ( !isset($used[$current])){ + $used[$current] = true; + item( + ( !showWidgetsAsTree || $widget->father_widget==0 ? "{$site->site_id}-{$route}" : "{$route}-{$widget->father_widget}"), + "{$route}-{$widget->id}", + "{$widget->id} - {$widget->widget_name}", + "layout_content"); + } } } - - } + } // foreach. } - -} + +} + +// echo ITEMS +foreach ( $items as $id=>$item ){ + // item[0] parent item[1] content item[2] type + // check that all parent exists. + if ( $item[0]==0 || isset($items[$item[0]])) { + echo + "". + "". + "". + "\n"; + } +} +