<@IF:[*template:is(0)*] >
Template is blank
<@ELSE>
Template is [*template:templatename*]
<@IF:[*description:isNotEmpty*]>
[*description*]
<@ENDIF>
<@ENDIF>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ini_set('display_errors', "On"); | |
echo parse_text( | |
form_text(), | |
[ | |
'user' => getv('user'), | |
'pwd' => getv('pwd') | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 最初に vagrant up を実行 | |
# id: apache: no such user と表示されてプロンプトに戻ってくるので、ここで vagrant vbguestを実行 | |
# GuestAdditionsの最新版がインストールされて、またプロンプトに戻ってくる。再びvagrant upを実行 | |
# 膨大なプロビジョン処理が再開されるので、しばらく待つ。 | |
# Job for httpd.service failed と表示されてプロンプトに戻ってくるが、これはプロビジョンが完了したということ | |
# vagrant reload で再起動。ローカルフォルダがマウントされRunning: inline script と表示される | |
# ブラウザを開いてディレクトリ名.localでApacheの初期ページを開くことができる | |
# 利用するIPアドレスを設定します | |
GUEST_IP = "192.168.33.7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 最初に vagrant up を実行 | |
# id: apache: no such user と表示されてプロンプトに戻ってくるので、ここで vagrant vbguestを実行 | |
# GuestAdditionsの最新版がインストールされて、またプロンプトに戻ってくる。再びvagrant upを実行 | |
# 膨大なプロビジョン処理が再開されるので、しばらく待つ。 | |
# Job for httpd.service failed と表示されてプロンプトに戻ってくるが、これはプロビジョンが完了したということ | |
# vagrant reload で再起動。ローカルフォルダがマウントされRunning: inline script と表示される | |
# ブラウザを開いてディレクトリ名.localでApacheの初期ページを開くことができる | |
# 利用するIPアドレスを設定します | |
GUEST_IP = "192.168.33.8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# htdocsというフォルダをあらかじめ作っておいてください。 | |
# 利用するIPアドレスを設定します | |
GUEST_IP = "192.168.33.10" | |
def install_plugin(plugin) | |
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin | |
end | |
install_plugin('vagrant-vbguest') | |
install_plugin('vagrant-hostmanager') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CGET { | |
function __construct($timestamp=0, $content='') { | |
if(!$timestamp) return; | |
$last_mod = gmdate('D, d M Y H:i:s T', $timestamp); | |
if(!$content) $content = $last_mod; | |
$etag = md5($content); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EvoはCMSというよりオーサリングツールに近いので | |
http://design-spice.com/2010/09/28/dreamweaver-template-if/ | |
Dreamweaverの仕様が参考になる。HTMLコメントを使う方法なので副作用が起こりにくい | |
http://d.hatena.ne.jp/monta31/20080828/p1 | |
Smarty | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
sc.id, | |
pagetitle, | |
addr.value AS 住所, | |
tel.value AS 電話番号 | |
FROM modx_site_content sc | |
LEFT JOIN modx_site_tmplvar_contentvalues addr ON sc.id=addr.contentid AND addr.tmplvarid=3 | |
LEFT JOIN modx_site_tmplvar_contentvalues tel ON sc.id=tel.contentid AND tel.tmplvarid=5 | |
WHERE sc.parent=3 | |
LIMIT 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
DISTINCT | |
sc.id, | |
pagetitle, | |
(SELECT value FROM modx_site_tmplvar_contentvalues WHERE tmplvarid=3 AND contentid=sc.id LIMIT 1) AS 住所, | |
(SELECT value FROM modx_site_tmplvar_contentvalues WHERE tmplvarid=5 AND contentid=sc.id LIMIT 1) AS 電話番号 | |
FROM modx_site_content sc | |
LEFT JOIN modx_site_tmplvar_contentvalues stc ON sc.id=stc.contentid | |
WHERE sc.parent=3 | |
LIMIT 50 |