issue 2662 editor

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12243 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-11-16 09:03:29 +00:00
parent e101348f59
commit 3480da757a
12 changed files with 2252 additions and 2055 deletions

View file

@ -1,104 +1,115 @@
<?php
/**
* @class emoticon
* @author NHN (developers@xpressengine.com)
* @brief Emoticons image connected components
**/
/**
* @class emoticon
* @author NHN (developers@xpressengine.com)
* @brief Emoticons image connected components
*/
class emoticon extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
var $emoticon_path = '';
class emoticon extends EditorHandler {
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
var $emoticon_path = '';
/**
* @brief editor_sequence and components out of the path
*/
function emoticon($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
}
/**
* @brief editor_sequence and components out of the path
**/
function emoticon($editor_sequence, $component_path) {
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
}
/**
* @brief Returns a list of emoticons file
*/
function getEmoticonList()
{
$emoticon = Context::get('emoticon');
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
/**
* @brief Returns a list of emoticons file
**/
function getEmoticonList() {
$emoticon = Context::get('emoticon');
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
$list = $this->getEmoticons($emoticon);
$list = $this->getEmoticons($emoticon);
$this->add('emoticons', implode("\n",$list));
}
$this->add('emoticons', implode("\n",$list));
}
/**
* @brief Likely to be recursively emoticons will search all the files to a subdirectory. 8000 gaekkajineun ran tests whether the stack and raise beef pro-overs and Unsure. (06/09/2007, Benny)
*/
function getEmoticons($path)
{
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
$output = array();
/**
* @brief Likely to be recursively emoticons will search all the files to a subdirectory. 8000 gaekkajineun ran tests whether the stack and raise beef pro-overs and Unsure. (06/09/2007, Benny)
**/
function getEmoticons($path) {
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
$output = array();
$oDir = dir($emoticon_path);
while($file = $oDir->read())
{
if(substr($file,0,1)=='.') continue;
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
}
$oDir->close();
if(count($output)) asort($output);
return $output;
}
$oDir = dir($emoticon_path);
while($file = $oDir->read()) {
if(substr($file,0,1)=='.') continue;
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
}
$oDir->close();
if(count($output)) asort($output);
return $output;
}
/**
* @brief popup window to display in popup window request is to add content
*/
function getPopupContent()
{
// Bringing a list of emoticons directory
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
$emoticon_list = array();
if($emoticon_dirs)
{
foreach($emoticon_dirs as $emoticon)
{
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
}
}
Context::set('emoticon_list', $emoticon_list);
// The first emoticon image files in the directory Wanted
$emoticons = $this->getEmoticons($emoticon_list[0]);
Context::set('emoticons', $emoticons);
// 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() {
// Bringing a list of emoticons directory
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
$emoticon_list = array();
if($emoticon_dirs) {
foreach($emoticon_dirs as $emoticon) {
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
}
}
Context::set('emoticon_list', $emoticon_list);
// The first emoticon image files in the directory Wanted
$emoticons = $this->getEmoticons($emoticon_list[0]);
Context::set('emoticons', $emoticons);
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
/**
* @brief Emoticon of the path were added to solve the problem. (06/09/2007 Benny)
*/
function transHTML($xml_obj)
{
$src = $xml_obj->attrs->src;
$alt = $xml_obj->attrs->alt;
/**
* @brief Emoticon of the path were added to solve the problem. (06/09/2007 Benny)
**/
function transHTML($xml_obj) {
$src = $xml_obj->attrs->src;
$alt = $xml_obj->attrs->alt;
if(!$alt)
{
$tmp_arr = explode('/',$src);
$alt = array_pop($tmp_arr);
}
if(!$alt) {
$tmp_arr = explode('/',$src);
$alt = array_pop($tmp_arr);
}
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
if(!$alt) $alt = $src;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
if(!$alt) $alt = $src;
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
if($alt)
{
$attr_output[] = "alt=\"".$alt."\"";
}
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
if($alt) {
$attr_output[] = "alt=\"".$alt."\"";
}
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
return $code;
}
}
?>
return $code;
}
}
/* End of file emoticon.class.php */
/* Location: ./modules/editor/components/emoticon/emoticon.class.php */

View file

@ -1,78 +1,83 @@
<?php
/**
* @class image_gallery
* @author NHN (developers@xpressengine.com)
* @brief Making images uploaded to the image gallery
**/
/**
* @class image_gallery
* @author NHN (developers@xpressengine.com)
* @brief Making images uploaded to the image gallery
*/
class image_gallery extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class image_gallery 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_gallery($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_gallery($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)
{
$gallery_info->srl = rand(111111,999999);
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
$gallery_info->border_color = $xml_obj->attrs->border_color;
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
/**
* @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) {
$gallery_info->srl = rand(111111,999999);
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
$gallery_info->border_color = $xml_obj->attrs->border_color;
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
$images_list = $xml_obj->attrs->images_list;
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
$gallery_info->images_list = explode("\n",trim($images_list));
// If you set the output to output the XML code generated a list of the image
if(Context::getResponseMethod() == 'XMLRPC')
{
$output = '';
for($i=0;$i<count($gallery_info->images_list);$i++)
{
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
}
return $output;
}
// HTML gallery output, the output settings via the template for the conversion to generate the html code should
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$gallery_info->width = trim($matches[3][0]);
if(!$gallery_info->width) $gallery_info->width = 400;
$images_list = $xml_obj->attrs->images_list;
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
$gallery_info->images_list = explode("\n",trim($images_list));
// If you set the output to output the XML code generated a list of the image
if(Context::getResponseMethod() == 'XMLRPC') {
$output = '';
for($i=0;$i<count($gallery_info->images_list);$i++) {
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
}
return $output;
}
// HTML gallery output, the output settings via the template for the conversion to generate the html code should
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$gallery_info->width = trim($matches[3][0]);
if(!$gallery_info->width) $gallery_info->width = 400;
Context::set('gallery_info', $gallery_info);
Context::set('gallery_info', $gallery_info);
$tpl_path = $this->component_path.'tpl';
Context::set("tpl_path", $tpl_path);
$tpl_path = $this->component_path.'tpl';
Context::set("tpl_path", $tpl_path);
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
else $tpl_file = 'slide_gallery.html';
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
else $tpl_file = 'slide_gallery.html';
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
/* End of file image_gallery.class.php */
/* Location: ./modules/editor/components/image_gallery/image_gallery.class.php */

View file

@ -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('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&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 */

View file

@ -1,70 +1,74 @@
<?php
/**
* @class multimedia_link
* @author NHN (developers@xpressengine.com)
* @brief The components connected to the body of multimedia data
**/
/**
* @class multimedia_link
* @author NHN (developers@xpressengine.com)
* @brief The components connected to the body of multimedia data
*/
class multimedia_link extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class multimedia_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 multimedia_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 multimedia_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->multimedia_src;
$style = $xml_obj->attrs->style;
/**
* @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->multimedia_src;
$style = $xml_obj->attrs->style;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = trim($matches[3][0]);
$height = trim($matches[3][1]);
if(!$width) $width = 400;
if(!$height) $height = 400;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = trim($matches[3][0]);
$height = trim($matches[3][1]);
if(!$width) $width = 400;
if(!$height) $height = 400;
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";
else $auto_start = "true";
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";
else $auto_start = "true";
$wmode = $xml_obj->attrs->wmode;
if($wmode == 'window') $wmode = 'window';
else if($wmode == 'opaque') $wmode = 'opaque';
else $wmode = 'transparent';
$wmode = $xml_obj->attrs->wmode;
if($wmode == 'window') $wmode = 'window';
elseif($wmode == 'opaque') $wmode = 'opaque';
else $wmode = 'transparent';
$caption = $xml_obj->body;
$caption = $xml_obj->body;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
}
}
?>
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
}
}
/* End of file multimedia_link.class.php */
/* Location: ./modules/editor/components/multimedia_link/multimedia_link.class.php */

View file

@ -1,57 +1,61 @@
<?php
/**
* @class poll_maker
* @author NHN (developers@xpressengine.com)
* @brief Editor provides the ability to link to the url.
**/
/**
* @class poll_maker
* @author NHN (developers@xpressengine.com)
* @brief Editor provides the ability to link to the url.
*/
class poll_maker extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class poll_maker 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 poll_maker($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief editor_sequence and components out of the path
**/
function poll_maker($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()
{
// Wanted Skins survey
$oModuleModel = &getModel('module');
$skin_list = $oModuleModel->getSkins("./modules/poll/");
Context::set('skin_list', $skin_list);
// 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() {
// Wanted Skins survey
$oModuleModel = &getModel('module');
$skin_list = $oModuleModel->getSkins("./modules/poll/");
Context::set('skin_list', $skin_list);
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
$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)
{
$poll_srl = $xml_obj->attrs->poll_srl;
$skin = $xml_obj->attrs->skin;
if(!$skin) $skin = 'default';
/**
* @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) {
$poll_srl = $xml_obj->attrs->poll_srl;
$skin = $xml_obj->attrs->skin;
if(!$skin) $skin = 'default';
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$width = $matches[2];
if(!$width) $width = 400;
$style = sprintf('width:%dpx', $width);
// poll model object creation to come get it return html
$oPollModel = &getModel('poll');
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
}
}
?>
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$width = $matches[2];
if(!$width) $width = 400;
$style = sprintf('width:%dpx', $width);
// poll model object creation to come get it return html
$oPollModel = &getModel('poll');
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
}
}
/* End of file poll_maker.class.php */
/* Location: ./modules/editor/components/poll_maker/poll_maker.class.php */