ajout autorisation php dans le html

This commit is contained in:
Christophe 2020-01-22 11:27:23 +01:00
parent 331d00bdc2
commit c2200099c1
2 changed files with 13 additions and 2 deletions

View file

@ -4,6 +4,12 @@ extends fa
##########
## SPIP ##
##########
snippet php "Autorisation <?php"
<?php include_spip('inc/autoriser');
if (autoriser("${2:action}","${3:objet}")) { ?>
${1:${VISUAL}}
<?php } ?>
endsnippet
#BOUCLE :
#------------------------------------------------------

View file

@ -1,12 +1,17 @@
{
"php": {
"prefix": "php",
"body": "<?php include_spip('inc/autoriser');\n\tif (autoriser(\"${2:action}\",\"${3:objet}\")) {\t?>\n\t1\n<?php } ?>",
"description": "Autorisation <?php"
},
"b": {
"prefix": "b",
"body": "<BOUCLE_${1:nom}(${2:ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>",
"body": "`!p t[2] = t[2].upper()`<BOUCLE_${1:nom}(${2:ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>",
"description": "SPIP <BOUCLE_>"
},
"bb": {
"prefix": "bb",
"body": "<B_$1>\n\t${5}\n<BOUCLE_${1:nom}(${2:ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>\n\t${6}\n</B_$1>",
"body": "`!p t[2] = t[2].upper()`<B_$1>\n\t${5}\n<BOUCLE_${1:nom}(${2:ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>\n\t${6}\n</B_$1>",
"description": "SPIP <B_>"
},
"icon": {