mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 19:59:54 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -1,103 +1,111 @@
|
|||
<?php
|
||||
/**
|
||||
* @class image_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Add an image, or to modify the properties of components
|
||||
**/
|
||||
/**
|
||||
* @class image_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief Add an image, or to modify the properties of components
|
||||
*/
|
||||
class image_link extends EditorHandler
|
||||
{
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
class image_link extends EditorHandler {
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
/**
|
||||
* @brief editor_sequence and components out of the path
|
||||
*/
|
||||
function image_link($editor_sequence, $component_path)
|
||||
{
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function image_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
$this->component_path = $component_path;
|
||||
}
|
||||
/**
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
*/
|
||||
function getPopupContent()
|
||||
{
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
/**
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
|
||||
Context::set("tpl_path", $tpl_path);
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
/**
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
*/
|
||||
function transHTML($xml_obj)
|
||||
{
|
||||
$src = $xml_obj->attrs->src;
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$title = $xml_obj->attrs->title;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
$style = $xml_obj->attrs->style;
|
||||
$margin = (int)$xml_obj->attrs->margin;
|
||||
|
||||
/**
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
$width = $xml_obj->attrs->width;
|
||||
$height = $xml_obj->attrs->height;
|
||||
$align = $xml_obj->attrs->align;
|
||||
$alt = $xml_obj->attrs->alt;
|
||||
$title = $xml_obj->attrs->title;
|
||||
$border = (int)$xml_obj->attrs->border;
|
||||
$link_url = $xml_obj->attrs->link_url;
|
||||
$open_window = $xml_obj->attrs->open_window;
|
||||
$style = $xml_obj->attrs->style;
|
||||
$margin = (int)$xml_obj->attrs->margin;
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
|
||||
$temp_src = explode('/', $src);
|
||||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
else if(substr($src , 0, 1)=='/')
|
||||
{
|
||||
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
|
||||
else $http_src = 'http://';
|
||||
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
|
||||
}
|
||||
else if(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
|
||||
|
||||
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
|
||||
$temp_src = explode('/', $src);
|
||||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
elseif(substr($src , 0, 1)=='/') {
|
||||
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
|
||||
else $http_src = 'http://';
|
||||
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
|
||||
}
|
||||
elseif(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
|
||||
$attr_output = array();
|
||||
$attr_output = array("src=\"".$src."\"");
|
||||
$attr_output[] = "alt=\"".$alt."\"";
|
||||
if($title)
|
||||
{
|
||||
$attr_output[] = "title=\"".$title."\"";
|
||||
}
|
||||
if($margin)
|
||||
{
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' margin:'.$margin.'px;';
|
||||
}
|
||||
if($align) $attr_output[] = "align=\"".$align."\"";
|
||||
|
||||
if($title) {
|
||||
$attr_output[] = "title=\"".$title."\"";
|
||||
}
|
||||
if($margin) {
|
||||
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' margin:'.$margin.'px;';
|
||||
}
|
||||
if($align) $attr_output[] = "align=\"".$align."\"";
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
|
||||
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
|
||||
if($width) $attr_output[] = 'width="'.$width.'"';
|
||||
if($height) $attr_output[] = 'height="'.$height.'"';
|
||||
if($border)
|
||||
{
|
||||
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' border-style: solid; border-width:'.$border.'px;';
|
||||
}
|
||||
|
||||
if($width) $attr_output[] = 'width="'.$width.'"';
|
||||
if($height) $attr_output[] = 'height="'.$height.'"';
|
||||
if($border) {
|
||||
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
|
||||
$style = str_replace(';;',';',$style);
|
||||
if($style == ';') $style = '';
|
||||
$style .= ' border-style: solid; border-width:'.$border.'px;';
|
||||
}
|
||||
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
|
||||
|
||||
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
|
||||
|
||||
if($link_url) {
|
||||
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
|
||||
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
if($link_url)
|
||||
{
|
||||
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
|
||||
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
}
|
||||
/* End of file image_link.class.php */
|
||||
/* Location: ./modules/editor/components/image_link/image_link.class.php */
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
<value xml:lang="zh-CN"><![CDATA[新窗口打开]]></value>
|
||||
</item>
|
||||
<item name="about_url_link_open_window">
|
||||
<value xml:lang="ko"><![CDATA[선택하시면 링크 선택 시 새 창으로 열립니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[선택하면 링크 선택 시 새 창으로 열립니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Select this to open a link in a new window.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[チェックを入れると、リンクをクリックする際に新しいウィンドウで開きます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[将在新窗口中打开链接。]]></value>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../modules/admin/tpl/css/admin.css);
|
||||
@import url(../../../../../common/css/bootstrap.min.css);
|
||||
|
||||
.image_align {
|
||||
margin:0px 0px 5px 0px;
|
||||
|
|
|
|||
|
|
@ -1,88 +1,83 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<col width="100" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_url}</th>
|
||||
<td><input type="text" id="image_url" value="{url_decode($manual_url)}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_scale}</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li><input type="text" id="width" value="0" size="4" />px </li>
|
||||
<li><input type="text" id="height" value="0" size="4" />px </li>
|
||||
<li><button type="button" id="get_scale">{$lang->cmd_get_scale}</button></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">URL</th>
|
||||
<td><input type="text" id="link_url" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->urllink_open_window}</th>
|
||||
<td><input type="checkbox" id="open_window" value="Y" /> {$lang->about_url_link_open_window}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_alt}</th>
|
||||
<td><input type="text" id="image_alt" value=""/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_align}</th>
|
||||
<td>
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="" id="align_normal" checked="checked"/>
|
||||
<label for="align_normal">
|
||||
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
|
||||
{$lang->image_align_normal}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="left" id="align_left" />
|
||||
<label for="align_left">
|
||||
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
|
||||
{$lang->image_align_left}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="middle" id="align_middle" />
|
||||
<label for="align_middle">
|
||||
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
|
||||
{$lang->image_align_middle}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="right" id="align_right" />
|
||||
<label for="align_right">
|
||||
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
|
||||
{$lang->image_align_right}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_border}</th>
|
||||
<td><input type="text" id="image_border" value="0" size="2" />px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->image_margin}</th>
|
||||
<td><input type="text" id="image_margin" value="0" size="2" />px</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><button type="button" id="btn_insert">{$lang->cmd_insert}</button></span>
|
||||
<span class="btn"><a href="./?module=editor&act=dispEditorComponentInfo&component_name={$component_info->component_name}" target="_blank" onclick="window.open('this.href','ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a></span>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<section class="section">
|
||||
<h1>{$component_info->title} ver. {$component_info->version}</h1>
|
||||
<form action="./" method="get" onSubmit="return false" id="fo" class="x_form-horizontal">
|
||||
<div class="x_control-group">
|
||||
<label for="image_url" class="x_control-label">{$lang->image_url}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="image_url" value="{url_decode($manual_url)}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->image_scale}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="width" value="0" size="4" style="width:80px" /> px
|
||||
<input type="text" id="height" value="0" size="4" style="width:80px" /> px
|
||||
<button type="button" id="get_scale" class="x_btn">{$lang->cmd_get_scale}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="link_url" class="x_control-label">URL</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="link_url" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="open_window" class="x_control-label">{$lang->urllink_open_window}</label>
|
||||
<div class="x_controls">
|
||||
<input type="checkbox" id="open_window" value="Y" /> {$lang->about_url_link_open_window}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="image_alt" class="x_control-label">{$lang->image_alt}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="image_alt" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->image_align}</label>
|
||||
<div class="x_controls">
|
||||
<label for="align_normal">
|
||||
<input type="radio" name="align" value="" id="align_normal" checked="checked"/>
|
||||
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
|
||||
{$lang->image_align_normal}
|
||||
</label>
|
||||
<label for="align_left">
|
||||
<input type="radio" name="align" value="left" id="align_left" />
|
||||
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
|
||||
{$lang->image_align_left}
|
||||
</label>
|
||||
<label for="align_middle">
|
||||
<input type="radio" name="align" value="middle" id="align_middle" />
|
||||
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
|
||||
{$lang->image_align_middle}
|
||||
</label>
|
||||
<label for="align_right">
|
||||
<input type="radio" name="align" value="right" id="align_right" />
|
||||
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
|
||||
{$lang->image_align_right}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="image_border" class="x_control-label">{$lang->image_border}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="image_border" value="0" size="2" />px
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="image_margin" class="x_control-label">{$lang->image_margin}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" id="image_margin" value="0" size="2" />px
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="button" id="btn_insert" class="x_btn x_btn-primary">{$lang->cmd_insert}</button>
|
||||
<a class="x_btn" href="{getUrl('','module','editor','act','dispEditorComponentInfo','component_name',$component_info->component_name)}" target="_blank" onclick="window.open(this.href,'ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue