@@ -72,6 +80,16 @@ snippet autoriser "SPIP [(#AUTORISER{" w
[(#AUTORISER{${1:action},${2:objet}}|oui)${3}]
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
[(#REM)
${1:${VISUAL}}
diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets
index 0ec951a..0d016d9 100755
--- a/UltiSnips/php.snippets
+++ b/UltiSnips/php.snippets
@@ -5,6 +5,29 @@ snippet dd
debug($${1});${0}
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"
"
+echo "
";
+${0}
+endsnippet
+
snippet pre " print_r"
echo "";
print_r($${1});
@@ -365,3 +393,9 @@ snippet spip_log "SPIP fctn spip_log()"
spip_log(${1},${2:"gamuza"});
${0}
endsnippet
+
+snippet if "if (condition) { ... }"
+if (${1}) {
+ ${0:${VISUAL}}
+}
+endsnippet