Skip to content

Commit

Permalink
refs #1749 : updated - default plugins (continued.)
Browse files Browse the repository at this point in the history
  • Loading branch information
inureyes committed Feb 16, 2015
1 parent d10c3d4 commit db6b0be
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 28 deletions.
2 changes: 1 addition & 1 deletion plugins/FM_Markdown/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ function FM_Markdown_summary($blogid, $id, $content, $keywords = array(), $useAb
$context = Model_Context::getInstance();
$view = FM_Markdown_format($blogid, $id, $content, $keywords, $useAbsolutePath, true);
if (!$context->getProperty("blog.publishWholeOnRSS")) $view = UTF8::lessen(removeAllTags(stripHTML($view)), 255);
return $view;
return $view;
}
?>
11 changes: 4 additions & 7 deletions plugins/FM_TTML/index.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
<?php
// TTML Formatter for Textcube 1.6
// (C) 2004-2009 Needlworks / Tatter Network Foundation
// TTML Formatter for Textcube 1.10.3
// (C) 2004-2015 Needlworks / Tatter Network Foundation

if(!function_exists('FM_TTML_bindAttachments')) require_once 'ttml.php';

function FM_TTML_format($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true, $bRssMode = false) {
global $service;
$path = __TEXTCUBE_ATTACH_DIR__."/$blogid";
$url = "{$service['path']}/attach/$blogid";
$url = $context->getProperty("service.path")."/attach/$blogid";
$view = FM_TTML_bindAttachments($id, $path, $url, $content, $useAbsolutePath, $bRssMode);
// if (is_array($keywords)) $view = FM_TTML_bindKeywords($keywords, $view);
$view = FM_TTML_bindTags($id, $view);
return $view;
}

function FM_TTML_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true) {
global $blog;
$view = FM_TTML_format($blogid, $id, $content, $keywords, $useAbsolutePath, true);
if (!$blog['publishWholeOnRSS']) $view = UTF8::lessen(removeAllTags(stripHTML($view)), 255);
if (!$context->getProperty("blog.publishWholeOnRSS")) $view = UTF8::lessen(removeAllTags(stripHTML($view)), 255);
return $view;
}

?>
6 changes: 4 additions & 2 deletions plugins/FM_TTML/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title xml:lang="en">TTML Formatter</title>
<title xml:lang="ko">TTML 포매터</title>
<link>http://needlworks.org/</link>
<version>1.7</version>
<version>1.10.3</version>
<description xml:lang="en">Implements TTML formatter, dedicated HTML-like syntax for Textcube.</description>
<description xml:lang="ko">텍스트큐브 용으로 사용되는 TTML 문법을 구현합니다.</description>
<description xml:lang="ja">Textcube専用のTTML文法を構成・解釈するプラグイン。</description>
Expand All @@ -12,7 +12,9 @@
<author xml:lang="ko" link="http://tokigun.net/"><![CDATA[강 성훈 (lifthrasiir / Needlworks)]]></author>
<safety changeData="no" exposeData="no" accessLocal="no" accessRemote="no" accessRaw="no" />
<requirements>
<textcube>1.7</textcube>
<textcube>
<minVersion>1.10.3</minVersion>
</textcube>
</requirements>
<binding>
<formatter id="ttml" name="TTML">
Expand Down
15 changes: 9 additions & 6 deletions plugins/FM_Textile/index.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
<?php
// Textile formatter for Textcube 1.6
// Textile formatter for Textcube 1.10.3
// Library by Threshold state.
// Driver by Jeongkyu Shin. ([email protected])
// 2008.1.21
// Last updated : 2015. 2. 16

if(!class_exists('Textile')) require_once 'classTextile.php';

function FM_Textile_format($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true, $bRssMode = false) {
global $service;
$textile = new Textile();
$path = __TEXTCUBE_ATTACH_DIR__."/$blogid";
$url = "{$service['path']}/attach/$blogid";
$url = $context->getProperty("service.path")."/attach/$blogid";
if(!function_exists('FM_TTML_bindAttachments')) { // To reduce the amount of loading code!
require_once 'ttml.php';
}
$view = FM_TTML_bindAttachments($id, $path, $url, $content, $useAbsolutePath, $bRssMode);
$view = FM_TTML_preserve_TTML_type_tags($view);
$view = $textile->TextileThis($view);
$view = FM_TTML_restore_TTML_type_tags($view);
$view = FM_TTML_bindTags($id, $view);
return $view;
}

function FM_Textile_summary($blogid, $id, $content, $keywords = array(), $useAbsolutePath = true) {
global $blog;
$context = Model_Context::getInstance();

$view = FM_Textile_format($blogid, $id, $content, $keywords, $useAbsolutePath, true);
if (!$blog['publishWholeOnRSS']) $view = UTF8::lessen(removeAllTags(stripHTML($view)), 255);
return $view;
if (!$context->getProperty("blog.publishWholeOnRSS")) $view = UTF8::lessen(removeAllTags(stripHTML($view)), 255);
return $view;
}
?>
6 changes: 4 additions & 2 deletions plugins/FM_Textile/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title xml:lang="en">Textile Formatter</title>
<title xml:lang="ko">Textile 포매터</title>
<link>http://www.needlworks.org/</link>
<version>1.6</version>
<version>1.10.3</version>
<description xml:lang="en">Implements Textile formatter, to support semantic XHTML with simple markup syntax. For more information, refer http://textile.thresholdstate.com/ .</description>
<description xml:lang="ko">일반적인 텍스트 문서를 통하여 의미론적인 XHTML을 생성해내는 Textile 포맷을 지원합니다.자세한 설명은 http://textile.thresholdstate.com/ 를 참조하세요.</description>
<description xml:lang="ja">XHTML標準勧告に合わせた文書作成環境を提供する Textileフォーマット用プラグイン。詳細なことは http://textile.thresholdstate.com/ からご参考ください。</description>
Expand All @@ -14,7 +14,9 @@
<author xml:lang="ko" link="http://textile.thresholdstate.com/">Threshold State (Textile library)</author>
<safety changeData="no" exposeData="no" accessLocal="yes" accessRemote="no" accessRaw="no" />
<requirements>
<textcube>1.6</textcube>
<textcube>
<minVersion>1.10.3</minVersion>
</textcube>
</requirements>
<binding>
<formatter id="textile" name="Textile">
Expand Down
18 changes: 10 additions & 8 deletions plugins/KeywordUI/index.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php
/* KeywordUI for Textcube 1.5
----------------------------------
Version 1.5
/* KeywordUI for Textcube 1.10.3
-----------------------------
Version 1.10.3
Needlworks.
Creator : inureyes
Maintainer : inureyes
Created at : 2006.10.3
Last modified at : 2007.8.15
Last modified at : 2015.2.16
This plugin enables keyword / keylog feature in Textcube.
For the detail, visit http://forum.tattersite.com/ko
Expand All @@ -24,8 +24,8 @@
*/
function KeywordUI_bindKeyword($target,$mother) {
global $blogURL;
$target = "<a href=\"#\" class=\"key1\" onclick=\"openKeyword('$blogURL/keylog/" . rawurlencode($target) . "'); return false\">{$target}</a>";
$context = Model_Context::getInstance();
$target = "<a href=\"#\" class=\"key1\" onclick=\"openKeyword('".$context->getProperty("uri.blog")."/keylog/" . rawurlencode($target) . "'); return false\">{$target}</a>";

return $target;
}
Expand All @@ -35,9 +35,11 @@ function KeywordUI_setSkin($target,$mother) {
return $pluginPath."/keylogSkin.html";
}
function KeywordUI_bindTag($target,$mother) {
global $blogURL, $pluginURL, $configVal;
$context = Model_Context::getInstance();
requireModel('blog.keyword');
$blogid = getBlogId();
$blogURL = $context->getProperty("uri.blog");
$pluginURL = $context->getProperty("plugin.uri");
if(isset($mother) && isset($target)){
$tagsWithKeywords = array();
$keywordNames = getKeywordNames($blogid);
Expand All @@ -57,4 +59,4 @@ function KeywordUI_handleConfig($data){
return true;
}

?>
?>
6 changes: 4 additions & 2 deletions plugins/KeywordUI/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
<title xml:lang="ko">키워드 출력</title>
<title xml:lang="en">Keyword Interface</title>
<link>http://needlworks.org/</link>
<version>1.0.1</version>
<version>1.10.3</version>
<description xml:lang="en">This plugin enables keyword feature in Textcube.</description>
<description xml:lang="ko">텍스트큐브의 키워드 기능을 사용합니다.</description>
<license>GPL</license>
<author xml:lang="en" link="http://forest.nubimaru.com"><![CDATA[Jeongkyu Shin (inureyes / Needlworks)]]></author>
<author xml:lang="ko" link="http://forest.nubimaru.com"><![CDATA[신정규 (inureyes / Needlworks)]]></author>
<safety changeData="no" exposeData="no" accessLocal="no" accessRemote="no" accessRaw="no" />
<requirements>
<textcube>1.5</textcube>
<textcube>
<minVersion>1.10.3</minVersion>
</textcube>
</requirements>
<binding>
<listener event="BindKeyword">KeywordUI_bindKeyword</listener>
Expand Down

0 comments on commit db6b0be

Please sign in to comment.