Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #1

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4c4437c
投稿画面 - descriptionフィールドのフォーム形式をtextareaに変更
yama Sep 28, 2012
7b2488f
投稿画面 - introtextの縦幅を少し狭くする
yama Sep 28, 2012
7d48b75
投稿画面 - デザイン調整
yama Sep 28, 2012
cd82363
投稿画面 - リンク属性(link_attributes)をページ設定タブに移動
yama Sep 28, 2012
f7da273
投稿画面 - デザイン調整
yama Sep 28, 2012
7825254
QuickManager - 無効なオプション設定が混入しているため削除
yama Sep 28, 2012
20e6310
コード整形
yama Sep 28, 2012
d734c4b
ToolTipデザイン調整
yama Sep 28, 2012
e01166c
管理画面リソースツリーのチップヘルプの表示を改善(見やすく改行を入れる)
yama Sep 28, 2012
777cbbc
デザイン調整
yama Sep 28, 2012
cdbbc83
バージョン更新(b4)
yama Sep 28, 2012
17de37d
コード整理
yama Sep 28, 2012
0b98d29
コード整形
yama Sep 28, 2012
2fcdeaa
DataGrid - $grid->fieldsが指定されている時の処理を追加
yama Sep 28, 2012
65ba9a1
コード整形
yama Sep 28, 2012
39b1e71
コード整理
yama Sep 28, 2012
32af2a2
メソッド名を処理内容に合ったものに変更
yama Sep 28, 2012
7db9e64
ManagerManager - mm_default()の値でシングルクォートなどを使えるようにする
yama Sep 28, 2012
d7461f8
コード整理
yama Sep 28, 2012
afe7aad
Ditto - RSSフィードのdescriptionに改行が入らないようにする
yama Sep 28, 2012
29f5d73
サンプルコンテンツ調整(RSSフィードにdescriptionを設定する)
yama Sep 28, 2012
87bb64a
$modx->['enable_bindings']をコア機能として組み込む
yama Sep 29, 2012
499fb29
言語ファイル・エントリー追加(enable_bindings)
yama Sep 29, 2012
b4bd809
インストーラ - ディレクトリ生成処理を調整
yama Sep 29, 2012
f116efa
enable-bindings.tpl削除(コアに機能を統合したため)
yama Sep 29, 2012
6341f1e
TinyMCE - テンプレート機能を追加
yama Sep 29, 2012
c0629d2
tinymce.linklist.flat.php 削除
yama Sep 29, 2012
be7cf46
TinyMCE - template機能を追加(2)
yama Sep 29, 2012
b60ee19
Update - TinyMCE 3.5.7 language files (Japanese and English)
yama Sep 29, 2012
07976a3
$modx->getDocuments() コード整理
yama Sep 30, 2012
350fd8e
404ページ表示時にURLの数だけキャッシュを生成しないようにする
yama Sep 30, 2012
46bc50f
不要な関数呼び出しを抑制
yama Sep 30, 2012
f321308
キャッシュファイルの数が1000以上に増えた場合、リクエスト数100回に5回の確率でキャッシュを初期化するよう改善
yama Sep 30, 2012
55ba2d0
エクスポート処理を高速化(6~7倍)
yama Sep 30, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function mm_default($field, $value='', $roles='', $templates='', $eval=false) {

// What's the new value, and does it include PHP?
$new_value = ($eval) ? eval($value) : $value;
$new_value = $modx->db->escape($new_value);

$output = " // ----------- Change defaults -------------- \n";

Expand Down
2 changes: 1 addition & 1 deletion assets/plugins/managermanager/mm.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function run()
// What are the fields we can change, and what types are they?
$field['pagetitle'] = array('input', 'pagetitle', 'pagetitle');
$field['longtitle'] = array('input', 'longtitle', 'longtitle');
$field['description'] = array('input', 'description', 'description');
$field['description'] = array('textarea', 'description', 'description');
$field['alias'] = array('input', 'alias', 'alias');
$field['link_attributes'] = array('input', 'link_attributes', 'link_attributes');
$field['menutitle'] = array('input', 'menutitle','menutitle');
Expand Down
6 changes: 4 additions & 2 deletions assets/plugins/tinymce/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ function get_mce_script($params)
$buttons4 = $params['custom_buttons4'];
break;
default:
$plugins = 'visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen,advimage,paste,advlink,media,contextmenu,table';
$plugins = 'template,visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen,advimage,paste,advlink,media,contextmenu,table';
$buttons1 = 'undo,redo,|,bold,forecolor,backcolor,strikethrough,formatselect,fontsizeselect,pastetext,pasteword,code,|,fullscreen,help';
$buttons2 = 'image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,blockquote,outdent,indent,|,table,hr,|,visualblocks,styleprops,removeformat';
$buttons2 = 'image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,blockquote,outdent,indent,|,table,hr,|,template,visualblocks,styleprops,removeformat';
$buttons3 = '';
$buttons4 = '';
if(is_dir($params['mce_path'] . 'jscripts/tiny_mce/plugins/quickupload'))
Expand Down Expand Up @@ -326,6 +326,8 @@ function build_mce_init($params,$plugins,$buttons1,$buttons2,$buttons3,$buttons4
}
$ph['content_css'] = join(',', $content_css);
$ph['link_list'] = ($params['link_list']=='enabled') ? "'{$params['mce_url']}js/tinymce.linklist.php'" : 'false';

$ph['tpl_list'] = $params['mce_url'] . 'js/get_template.php';

$mce_init = file_get_contents($params['mce_path'] . 'js/mce_init.js.inc');

Expand Down
12 changes: 11 additions & 1 deletion assets/plugins/tinymce/inc/gsettings.html.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<style type="text/css">
textarea.mce {width:95%;height:40px;display:block;}
</style>
<table id="editorRow_TinyMCE" class="settings">
<table id="editorRow_TinyMCE" class="settings editorRow">
<tr class="row1" style="display: [+display+];">
<th colspan="2" style="color:#707070; background-color:#eeeeee"><h4 style="margin:3px;">[+mce_settings+]</h4></th>
</tr>
Expand All @@ -23,6 +23,16 @@ textarea.mce {width:95%;height:40px;display:block;}
<div>[+mce_editor_skin_message+]</div>
</td>
</tr>

<tr class="row1" style="display: [+display+];">
<th>[+mce_tpl_title+]</th>
<td>
<div style="margin-bottom:8px;"><label>[+mce_tpl_docid+] <input onchange="documentDirty=true;" type="text" class="inputBox" style="width: 300px;" name="mce_template_docs" value="[+mce_template_docs+]" /></label></div>
<div><label>[+mce_tpl_chunkname+] <input onchange="documentDirty=true;" type="text" class="inputBox" style="width: 300px;" name="mce_template_chunks" value="[+mce_template_chunks+]" /></label></div>
<div>[+mce_tpl_msg+]</div>
</td>
</tr>

<tr class="row1" style="display: [+display+];">
<th>[+mce_editor_entermode_title+]</th>
<td>
Expand Down
118 changes: 118 additions & 0 deletions assets/plugins/tinymce/js/get_template.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?php
// Get Template from resource for TinyMCE
// v0.1
// By Yamamoto
//
// Changelog:
// v0.1: First release
//
// To do:
// * xxx

// Config options
$templates_to_ignore = array(); // Template IDs to ignore from the link list
$include_page_ids = false;
$charset = 'UTF-8';
$sortby = 'menuindex'; // Could be menuindex or menutitle
$limit = 0;

/* That's it to config! */
define('IN_MANAGER_MODE', true);
define('MODX_API_MODE', true);
$core_path = str_replace('\\','/',realpath('../../../../')) . '/manager/includes/';
include_once("{$core_path}config.inc.php");
startCMSSession();
include_once("{$core_path}document.parser.class.inc.php");
$modx = new DocumentParser;
$modx->db->connect();

/* only display if manager user is logged in */
if ($modx->getLoginUserType() !== 'manager')
{
// Make output a real JavaScript file!
header('Content-type: text/javascript');
header('pragma: no-cache');
header('expires: 0');

echo 'var mceTemplateList = Array();';
exit();
}

$modx->getSettings();

$ids = $modx->config['mce_template_docs'];
$chunks = $modx->config['mce_template_chunks'];

$output = false;

if(isset($_GET['docid']) && preg_match('@^[0-9]+$@',$_GET['docid']))
{
$doc = $modx->getDocument($_GET['docid']);
if($doc) $output = $doc['content'];
}
elseif(isset($_GET['chunk']) && preg_match('@^[0-9]+$@',$_GET['chunk']))
{
$tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets');
$cid = $_GET['chunk'];
$rs = $modx->db->select('snippet', $tbl_site_htmlsnippets, "`id`='{$cid}' AND published=1");
$content = $modx->db->getValue($rs);
if($content) $output = $content;
}
else
{
$list = array();
$tpl = "['[+title+]', '[+site_url+]assets/plugins/tinymce/js/get_template.php?[+target+]', '[+description+]']";

if(isset($ids) && !empty($ids))
{
$docs = $modx->getDocuments($ids, 1, 0, $fields= 'id,pagetitle,menutitle,description,content');

$ph['site_url'] = $modx->config['site_url'];
foreach($docs as $i=>$a)
{
$ph['title'] = ($docs[$i]['menutitle']!=='') ? $docs[$i]['menutitle'] : $docs[$i]['pagetitle'];
$ph['target'] = 'docid=' . $docs[$i]['id'];
$ph['description'] = $docs[$i]['description'];
$list[] = $modx->parsePlaceholder($tpl,$ph);
}
}

if(isset($chunks) && !empty($chunks))
{
$tbl_site_htmlsnippets = $modx->getFullTableName('site_htmlsnippets');
if(strpos($chunks,',')!==false)
{
$chunks = explode(',', $chunks);
foreach($chunks as $i=>$v)
{
$chunks[$i] = $modx->db->escape(trim($v));
}
$chunks = join("','", $chunks);
$where = "`name` IN ('{$chunks}')";
}
else
{
$where = "`name`='{$chunks}'";
}

$rs = $modx->db->select('id,name,description', $tbl_site_htmlsnippets, $where);

while($row = $modx->db->getRow($rs))
{
$ph['title'] = $row['name'];
$ph['target'] = 'chunk=' . $row['id'];
$ph['description'] = $row['description'];
$list[] = $modx->parsePlaceholder($tpl,$ph);
}
}

if(0<count($list)) $output = 'var tinyMCETemplateList = [' . join(',',$list) . '];';
}

if($output)
{
header('Content-type: text/javascript');
header('pragma: no-cache');
header('expires: 0');
echo $output;
}
3 changes: 3 additions & 0 deletions assets/plugins/tinymce/js/mce_init.js.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ tinyMCE.init({
theme_advanced_buttons4 : '[+buttons4+]',
theme_advanced_resize_horizontal : false,
external_link_list_url : [+link_list+],
template_external_list_url : '[+tpl_list+]',
template_popup_width : 550,
template_popup_height : 350,
theme_advanced_blockformats : '[+mce_formats+]',
theme_advanced_styles : '[+css_selectors+]',
theme_advanced_disable : '[+disabledButtons+]',
Expand Down
57 changes: 0 additions & 57 deletions assets/plugins/tinymce/js/tinymce.linklist.flat.php

This file was deleted.

16 changes: 12 additions & 4 deletions assets/plugins/tinymce/lang/english.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Function: English language file for TinyMCE
* Encoding: ISO-Latin-1
* Author: Jeff Whitfield and yama
* Date: 2012/03/10
* Version: 3.3
* MODx version: 0.9.5-1.0.6
* Date: 2012/09/29
* Version: 3.5.7
* MODX version: 0.9.5-1.0.6
*/

$_lang['mce_editor_theme_title'] = 'Theme:';
$_lang['mce_editor_theme_message'] = 'Here you can select which theme or skin to use with the editor.';
$_lang['mce_editor_custom_plugins_title'] = 'Custom Plugins:';
$_lang['mce_editor_custom_plugins_message'] = "Enter the plugins to use for the 'custom' theme as a comma separated list.";
$_lang['mce_editor_custom_plugins_message'] = "Enter the plugins to use for the 'custom' theme as a comma separated list.<br />Default : template,visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen, advimage,paste,advlink,media,contextmenu,table";
$_lang['mce_editor_custom_buttons_title'] = 'Custom Buttons:';
$_lang['mce_editor_custom_buttons_message'] = "Enter the buttons to use for the 'custom' theme as a comma separated list for each row. Be sure that each button has the required plugin enabled in the 'Custom Plugins' setting.";
$_lang['mce_editor_css_selectors_title'] = 'CSS selectors:';
Expand All @@ -37,3 +37,11 @@
$_lang['mce_element_format_message'] = 'This option enables control if elements should be in html or xhtml mode. xhtml is the default state for this option. This means that for example &lt;br /&gt; will be &lt;br&gt; if you set this option to &quot;html&quot;.';
$_lang['mce_schema_title'] = 'Schema';
$_lang['mce_schema_message'] = 'The schema option enables you to switch between the HTML4 and HTML5 schema. This controls the valid elements and attributes that can be placed in the HTML. This value can either be the default html4 or html5.';

$_lang['mce_toolbar1_msg'] = 'Default : undo,redo,|,bold,forecolor,backcolor,strikethrough,formatselect,fontsizeselect, pastetext,pasteword,code,|,fullscreen,help';
$_lang['mce_toolbar2_msg'] = 'Default : image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist, numlist,|,blockquote,outdent,indent,|,table,hr,|,template,visualblocks,styleprops,removeformat';

$_lang['mce_tpl_title'] = 'Template button';
$_lang['mce_tpl_msg'] = 'You can insert the HTML block which you registered beforehand from toolbar. You make HTML block as resource or a chunk, and can appoint plural number with a comma.';
$_lang['mce_tpl_docid'] = 'Resource IDs';
$_lang['mce_tpl_chunkname'] = 'Chunk names';
17 changes: 11 additions & 6 deletions assets/plugins/tinymce/lang/japanese-utf8.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* Function: Japanese language file for TinyMCE.
* Encoding: UTF-8
* Author: yama
* Date: 2010/07/29
* Version: 2.1.1
* MODx version: 0.9.5-1.0.5
* Date: 2012/09/29
* Version: 3.5.7
* MODX version: 0.9.5-1.0.6
*/

$_lang['mce_editor_theme_title'] = 'テーマ:';
$_lang['mce_editor_theme_message'] = 'テーマを選択し、ツールバーアイコンのセットおよびエディタのデザインを変更できます。';
$_lang['mce_editor_custom_plugins_title'] = 'カスタムテーマのプラグイン設定:';
$_lang['mce_editor_custom_plugins_message'] = 'カスタムテーマを選択したときに利用するプラグインをカンマ(,)で区切って記述します。<br />デフォルト値 : visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen,advimage,paste,advlink,media,contextmenu,table';
$_lang['mce_editor_custom_plugins_message'] = 'カスタムテーマを選択したときに利用するプラグインをカンマ(,)で区切って記述します。<br />デフォルト値 : template,visualblocks,autolink,inlinepopups,autosave,save,advlist,style,fullscreen, advimage,paste,advlink,media,contextmenu,table';
$_lang['mce_editor_custom_buttons_title'] = 'カスタムボタン:';
$_lang['mce_editor_custom_buttons_message'] = 'カスタムテーマを選択したときに利用するボタンをカンマ(,)で区切ってそれぞれの行に記述します。セパレータは「separator」または「|」と記述します。プラグインによって機能が提供されるボタンは、プラグイン指定も必要です。詳細については<a href="http://wiki.moxiecode.com/index.php/TinyMCE:Index" target="_blank">TinyMCE開発元の公式ドキュメント</a>の<a href="http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference" target="_blank">Control reference</a>のページをご確認ください。';
$_lang['mce_editor_css_selectors_title'] = 'CSSスタイルセレクタ:';
Expand All @@ -38,5 +38,10 @@
$_lang['mce_schema_title'] = 'スキーマ';
$_lang['mce_schema_message'] = 'スキーマを選択します。';

$_lang['mce_toolbar1_msg'] = 'デフォルト値 : undo,redo,|,bold,forecolor,backcolor,strikethrough,formatselect,fontsizeselect,pastetext,pasteword,code,|, fullscreen,help';
$_lang['mce_toolbar2_msg'] = 'デフォルト値 : image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|, blockquote,outdent,indent,|,table,hr,|,visualblocks,styleprops,removeformat';
$_lang['mce_toolbar1_msg'] = 'デフォルト値 : undo,redo,|,bold,forecolor,backcolor,strikethrough,formatselect,fontsizeselect, pastetext,pasteword,code,|,fullscreen,help';
$_lang['mce_toolbar2_msg'] = 'デフォルト値 : image,media,link,unlink,anchor,|,justifyleft,justifycenter,justifyright,|,bullist, numlist,|,blockquote,outdent,indent,|,table,hr,|,template,visualblocks,styleprops,removeformat';

$_lang['mce_tpl_title'] = 'テンプレート挿入';
$_lang['mce_tpl_msg'] = 'あらかじめ登録しておいたHTMLブロックをツールバーから挿入できます。HTMLブロックはリソースまたはチャンクとして作成し、カンマで区切って複数指定できます。';
$_lang['mce_tpl_docid'] = 'リソースID';
$_lang['mce_tpl_chunkname'] = 'チャンク名';
2 changes: 2 additions & 0 deletions assets/plugins/tinymce/settings/default_params.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
$ph['custom_buttons2'] = $params['custom_buttons2'];
$ph['custom_buttons3'] = $params['custom_buttons3'];
$ph['custom_buttons4'] = $params['custom_buttons4'];
$ph['mce_template_docs'] = $params['mce_template_docs'];
$ph['mce_template_chunks'] = $params['mce_template_chunks'];
$ph['css_selectors'] = (!isset($params['css_selectors'])) ? $css_selectors : $params['css_selectors'];
$ph['mce_entermode'] = (empty($params['mce_entermode'])) ? 'p' : $params['mce_entermode'];
$ph['mce_schema'] = (empty($params['mce_schema'])) ? 'html4' : $params['mce_schema'];
Expand Down
2 changes: 1 addition & 1 deletion assets/snippets/ditto/classes/phx.parser.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function Filter($input, $modifiers)
$output = str_replace(array('[', ']', '`'),array('&#91;', '&#93;', '&#96;'),$output);
break;
case 'strip':
$output = preg_replace("~([\n\r\t\s]+)~",' ',$output); break;
$output = str_replace(array("\n","\r","\t","\s"), ' ', $output); break;
case 'notags':
case 'strip_tags':
if($modifier_value[$i]!=='')
Expand Down
4 changes: 2 additions & 2 deletions assets/snippets/ditto/formats/rss.format.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function rss_author($resource) {
<channel>
<title>[*pagetitle*]</title>
<link>[(site_url)]</link>
<description>[*description*]</description>
<description>[*description:strip*]</description>
<language>[+rss_lang+]</language>
<copyright>[+rss_copyright+]</copyright>
<ttl>[+rss_ttl+]</ttl>
Expand All @@ -125,7 +125,7 @@ function rss_author($resource) {
<item>
<title>[+rss_pagetitle+]</title>
<link>[(site_url)][~[+id+]~]</link>
<description><![CDATA[ [+summary+] ]]></description>
<description><![CDATA[ [+summary:strip+] ]]></description>
<pubDate>[+rss_date+]</pubDate>
<guid isPermaLink="true">[(site_url)][~[+id+]~]</guid>
<dc:creator>[+rss_author+]</dc:creator>
Expand Down
Loading