Skip navigation.

exploreopera

| Help

Sign up | Help

SPIP commits

Posts tagged with "core"

[11415] 3 new filters for boolean operators

, , , ...

These filters are 'et', 'ou', and 'xou' (for 'and', 'not', and 'xor').
They work like |?{' ',} :
each filter returns a space char if the condition is verified, elsewhere it returns an empty string


For example this PHP code
if ($a=='testA' OR ($b=='testB' AND $c=='testC')) {echo "OK";}

Can be translated in a template like this :
[(#A|=={testA} 
    |ou{[(#B|=={testB}
            |et{[(#C|=={testC})]})]}) OK ]

Or better
[(#B|=={testB} 
    |et{[(#C|=={testC})] 
    |ou{[(#A|=={testA})]}) OK ]

[11400] A more secure import from old SPIP versions

, , ,

This commit introduces a lot of things that make the import really secure :

  1. Create a set of tables with the old structure and a prefix not used
  2. Import data inside
  3. Update
  4. copy data to the actual site

Of course it's a beginning, a lot of things should be done :

  • Make this functionnality possible for older stable versions ([11402] for 1.8)
  • Verify that the temporary prefix isn't used
  • Interpolate between different versions for partial imports
  • Use a reload over timeout during the copy ([11402])
  • Also import plugins tables (if possible)


Easter egg on the private area

, ,

"You can even create a specific template in the private area.
For exemple, this template

/squelette/prive/editer/article-23.html

is used to edit articles which are in the section number 23 (and it's subsections)
(works also to display them)"

from http://thread.gmane.org/gmane.comp.web.spip.devel/46774/focus=46786

! Custom fields are directly interpreted

, , ,

With the revision [11350], any custom field can directly be used in templates with the tags #FOO and #EDIT{foo} (with the plugin "crayons" [fr])
You don't have to change inc/modifier or specify the structure of the table : the core directly manages them.

However the private interface actually doesn't integrate these fields. You have to custom it with hooks.

(from http://thread.gmane.org/gmane.comp.web.spip.devel/46774)

[11350] any table field creates its specific tag

, , ,

The value of any field 'foo' can be displayed in your templates with #FOO -- Even if this is a field of the 'official' tables. Much more, this value can be edited in the public area with an inline content editor (actually it's still not possible in the private area) :
  • sql_showtable() is used to describe the fields (that's better than the corresponding php descriptor in tables_principales, etc..)
  • inc/modifier now uses a list of private fields (instead of a fixed list of public fields)

[11156] : new filter to exclude elements by keyword

, , ,

Nothing new in fact, just a simplification :

{!id_mot=2}
now returns all the elements that are not linked to id_mot=2 (including elements without any keyword)

[11094] cache overflow is still a reality

,

When the cron doesn't manage to empty correctly the cache, the site crashes rapidly. The only solution then is to empty completly the cache directory.

It's what does this commit, but it's a poor patch with a huge side effect : the cache delay specified in a template isn't really taken into account because the cached file is erased rapidly

There is no doubt that a better solution will come soon

note :
Cache explosion was also partially corrected in :


-- EDIT (01/28/2008) --
This problem is almost corrected in the version 1.9.2d, as it is explained in the changelog of this version