This commit is contained in:
Christophe 2021-05-17 21:55:40 +02:00
parent 963177d34c
commit 93bf4b9fff
2 changed files with 53 additions and 1 deletions

View file

@ -1,7 +1,11 @@
extends javascript extends javascript
extends fa # extends fa
extends fas extends fas
snippet bullet
•${0}
endsnippet
########## ##########
## SPIP ## ## SPIP ##
########## ##########
@ -58,6 +62,10 @@ snippet id_doc "SPIP #ID_DOCUMENT" w
#ID_DOCUMENT${0} #ID_DOCUMENT${0}
endsnippet endsnippet
snippet statut "SPIP #STATUT" w
#STATUT${0}
endsnippet
# <INCLURE ...> # <INCLURE ...>
snippet inclure "SPIP inclure" w snippet inclure "SPIP inclure" w
<INCLURE{fond=${1:inclure/}${2}}${3}> <INCLURE{fond=${1:inclure/}${2}}${3}>
@ -72,6 +80,16 @@ snippet autoriser "SPIP [(#AUTORISER{" w
[(#AUTORISER{${1:action},${2:objet}}|oui)${3}] [(#AUTORISER{${1:action},${2:objet}}|oui)${3}]
endsnippet endsnippet
snippet autorisersinon "SPIP [(#AUTORISER{}|sinon_interdire_acces" w
[(#AUTORISER{${1:action},${2:objet}}|sinon_interdire_acces)]
${0}
endsnippet
snippet sinonint "SPIP sinon_interdire_acces" w
sinon_interdire_acces${0}
endsnippet
snippet rem snippet rem
[(#REM) [(#REM)
${1:${VISUAL}} ${1:${VISUAL}}

View file

@ -5,6 +5,29 @@ snippet dd
debug($${1});${0} debug($${1});${0}
endsnippet endsnippet
snippet creerobjet "SPIP creation objet"
$tables['spip_$1s'] = [
'type' => '${1:objet}',
'principale' => 'oui',
'table_objet_surnoms' => [],
'field'=> array(
'id_$1' => 'bigint(21) NOT NULL',
$0
'statut' => 'varchar(20) DEFAULT "" NOT NULL',
'maj' => 'TIMESTAMP'
),
'key' => array(
'PRIMARY KEY' => 'id_$1',
'KEY statut' => 'statut',
),
'champs_editables' => [],
'champs_versionnes' => [],
'rechercher_champs' => [],
'join' => [],
'tables_jointures' => [],
];
endsnippet
snippet action "SPIP action declenchee dans un lien" snippet action "SPIP action declenchee dans un lien"
<?php <?php
if (!defined('_ECRIRE_INC_VERSION')) { if (!defined('_ECRIRE_INC_VERSION')) {
@ -249,6 +272,11 @@ echo ${1};
${0} ${0}
endsnippet endsnippet
snippet ecbr "Echo <br>"
echo "<br>";
${0}
endsnippet
snippet pre "<pre> print_r" snippet pre "<pre> print_r"
echo "<pre>"; echo "<pre>";
print_r($${1}); print_r($${1});
@ -365,3 +393,9 @@ snippet spip_log "SPIP fctn spip_log()"
spip_log(${1},${2:"gamuza"}); spip_log(${1},${2:"gamuza"});
${0} ${0}
endsnippet endsnippet
snippet if "if (condition) { ... }"
if (${1}) {
${0:${VISUAL}}
}
endsnippet