2006年12月1日金曜日

やらいでか!スニペット備忘録 少々追加

サンプルのWEBサインアップ画面におけるスニペットの理解












[[WebSignup? &formtpl=`FormSignup`&groups=`Registered Users`]]
スニペットチャンクかテンプレとして扱うドキュメントIDウェブユーザグループ(権限の付加)


$modx->config['base_path'] ⇒ "C:/Program Files/xampp/htdocs/modx/"
$snipPath = $modx->config['base_path'] . "assets/snippets/"; → スニペットのパスの指定(マネージャ内のスニペット両方から判断?)


# check if inside manager チャンクがマネージャーの中にあるか見てるのかな?
if ($m = $modx->insideManager()) {
return ''; # don't go any further when inside manager あったらストッピ?
}

$modx->insideManager() ⇒ なにこれ?


# Snippet customize settings 既にスニペットが云々されてるか見てるのかな?
$tpl = isset($tpl)? $tpl:"";

# setup web groups 既にグループ?があるか見て、それに応じたセッティングしてる?
$groups = isset($groups) ? explode(',',$groups):array();
for($i=0;$i
# System settings ぽ・す・と  ...わからん
$isPostBack = count($_POST) && isset($_POST['cmdwebsignup']);

$output = '';

ファイルを読み込む
include_once $snipPath."weblogin/weblogin.common.inc.php"; → 共通関数
include_once $snipPath."weblogin/websignup.inc.php";

0 件のコメント: