Release Notes/0.9.0

From Aikiframework wiki

(Redirected from Release Notes/0.9)
Jump to: navigation, search

Contents

Release highlights

Significant changes are coming to Aiki Framework 0.9, in particular planned tweaks to Aiki Markup and some HTML output. This will impact all websites that have been deployed using Aiki Framework 0.8 or earlier. This guide will help you modify your site to accommodate these changes.

The latest version of Aiki is 0.8.2. This version is compatible with 0.8 except as noted below. See Transition Guide for migrating your site easily.

Announcements

New Core Features

Plugins

Aiki 0.9 have basic plugin system. See: http://www.aikiframework.org/wiki/Plugin_Intro

aiki->message

$aiki->message have new method to stack and retrieve all type of internal message.

Some new method are

$aiki->message->set("title","aiki")   // establish title and delete previuos content.
$aiki->message->add("title","admin")  //add title key new values
$aiki->message->add("title","users")

$aiki->message->add("title","users",10) //add title key new values, with it specified key.
$aiki->message->add("title","new-users",10) //add title key new values, and substitute all values

$aiki->message->show("title","ul") echo content of title as <ul><li> lists.
$aiki->message->show("title","ol") echo content of title as <ol><li> lists.
$aiki->message->show("title","li") echo content of title as <ol><li> lists.
$aiki->message->show("title","comented-list") echo content <!-- aiki, admin, users -->
$aiki->message->show("title","/") echo content of title separted by "/", works with other characters.
$aiki->message->show("title","<ul id='test'>") echo <ul id=test><li>aiki</li><li>admin....</li>
$aiki->message->show("title","<div id='test' .more attributes..>") echo <div id='test'....>aiki</div><div id='test'....>admin</div>...

The get method are similar to show but returns, no echo values, and add a new glue:
$aiki->message->get("title","as array") return the array of title

$aiki->order("title","asc") ..
Sort option are: asc, desc, asc-values,desc-values, natural
$aiki->order("jquery","natural");
$aiki->last("jquery")  return 2
$aiki->first("jquery")  return 0.9

  • Now one can have a 1 level deep extension, and other files in that folder. So, you can do something like:
/assets/extensions/myextension/myextension.php
  • Added $config['timezone'] option to be able to overide the timezone
  • Added Aiki Log

Multisites

Aiki is designed to allow one aiki installation to control multiples sites. All sites share the same database. Examples: - multiple e-shop over the same catalog of products. German shop show products with german tax and german shipments. - filter content for adults, students - a intranet, extranet, web,

Multiviews

Roger added a new developer level feature, not exposed in the admin interface simply yet:

New Aiki Parser

This is a bit insider, but we have this now Aiki_parser_2

New Config Class

We needed a more flexible way to handle configurations for more than just one aiki site, with views, and more, so there is now:

Parametrized CSS

There are two way to customize / parametrized css for every site, view and language.

1) include aiki var like [site], [language], [view] as body or div class and use CSS selector.

in wigdet content
<body class='[language]'>

in css 
body.fr #title { background-image: url(title_french.png);


2) Parametrized css. In widget css you can include some block to define variables.

Syntax:


 (declarations( selectors
 variable_name = value or expression delimited by () [/* optional comment using css delimiter */]
 ..
 [ more variable one per line]
 )declarations)

Example:

 (declarations( tablet
 $width= 800; /* comment will be allowed */
 $red= #ff0000;
 $link_decoration= underline;
 $col = ($width-10)/3 /* expression will be allowed);
 )declarations)

Later you can use this variables, in css with a php similar syntax.

 body { width: $width;}
 h1 { color: $red;}
 a { text-decoration: $link_decoration}
 ...


3) Filter CSS by site, view or language using (css( markup

SYNTAX: (css( list of selectors :  ... css block )css)

Example

 // example of direction in arabic:
 (css( /!ar /de /en /gr:
 /* css block
 * { direction: ltr; )
 )css)

 (css( /ar:
 /* css block
 * { direction: rtl; )
 )css)

In all case a selector is a list of of views/language separated by space : Examples:

* tablet : for view tablet in all languages.
* /es : only spanish any view
* text-only/es: only text-ony in spanish
* /!es: all excepts in spanish..
* bluermarine/!fr: bluemarine not in french

Transition Guide

Database

Some database fields have changed. You need to run these migrations against your database before updating.

alter table aiki_widgets CHANGE custome_header custom_header text NOT NULL;
alter table aiki_widgets CHANGE custome_output custom_output text NOT NULL;

There was a problem in past versions of Aiki of not enforcing unique usernames. You can run this query to see if your site has this problem:

select userid, au.username, email, first_login from aiki_users as au inner join (select username from aiki_users group by username having count(username) > 1) as aug on au.username = aug.username order by username, userid

You should clean up any duplicates you find and then make the username unique:

alter table aiki_users add unique (username);

Forms

Fieldset

Form fields and buttons are now enclosed in fieldset tags:

<form>
  <fieldset class="fields"> ... </fieldset>
  <fieldset class="buttons"> ... </fieldset>
</form>

What has changed

Form buttons used to be enclosed in a paragraph tag: p class="form-buttons"

You can now style a block of fields using the fields class. In your CSS:

.fields {
  /*Add your style code here*/
}

What you MUST do

To style your buttons, update your stylesheet to use:

.buttons { 
  /*Add your style code here*/
}

You are also advised to remove the border from the fieldset by adding this to your global css widget:

fieldset {
 border: 0;
}


field class

A field class has now been added to the div enclosing each form input element.

<div class='username field'>
  [...]
  <input type="text" id="username" name="username" value="">
</div>

What has changed

Previously the div class was only set to the name of the database field.

What you can do

This allows you to use a single CSS rule to style all input elements.

.field {
  /*Add your style code here*/
 }


Labels

All labels for form inputs now use the label tag.

<div class='password field'>
  <label class="password">password</label>
  <input type="password" name="password">
</div>

What has changed

Previously all visible names of each input used the h2 tag. This made it necessary to use a CSS rule like form div h2 in order to style the label.

What you MUST do

Change your form div h2 rule to:

label {
  /*Add your style code here*/
 }

Reset Password

The reset password form has new output which can by styled similarly to all forms.

<div id="form_container">
  <form method="post" enctype="multipart/form-data" id="reset_password_form" name="reset_password_form">

  <fieldset class="fields">
    <div class="password field">
      <label for="password">New Password</label>
      <input class="input" type="password" dir="" name="password">
     </div>
     
     <div class="password_confirm field">
        <label for="password_confirm">Confirm New Password</label>
        <input class="input" type="password" dir="" name="password_confirm">
     </div>
   </fieldset>

   <fieldset class="buttons">
      <input type="hidden" value="e9fd1be0cab3fcaf0fe4a52a757aa44b" name="key">
      <input class="button" type="submit" name="submit" value="Set Password">
    </fieldset>
<form>
</div>

What has changed

Previously this form was formatted using an HTML table.

Login Form

Now, error message can be displayed in form, and doesn't appear in top of the page.

What you MUST do

Edit the widget that contains the form and add, where you want this code

(script( $aiki->message->get_login_error(); )script)

Markup

php and script

The php markup is deprecated. Instead use:

(script( ...)script)

Script markup have the same syntax that old php syntax.

To convert "<php" to "(script(" execute this query:

UPDATE aiki_widgets SET widget=REPLACE( REPLACE(widget,"<php ","(script("),"php>",")script)").

See also

Previous releases

Personal tools