1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

removed inline html/style

This commit is contained in:
lisa
2009-01-27 23:46:12 +00:00
parent dab9ef360c
commit 868d72031b
4 changed files with 81 additions and 81 deletions

View File

@@ -9,8 +9,8 @@
* List Admin Class * List Admin Class
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_admin_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_admin_class.php,v $
* $Revision: 1.1 $ * $Revision: 1.2 $
* $Date: 2009-01-27 21:33:52 $ * $Date: 2009-01-27 23:46:12 $
* $Author: lisa_ $ * $Author: lisa_ $
* *
*/ */
@@ -41,7 +41,7 @@ class list_admin
$this->e107 = e107::getInstance(); $this->e107 = e107::getInstance();
$this->parent = $parent; $this->parent = $parent;
$this->styletable = "style='width:90%; border:1px solid #444; border-collapse:collapse;' cellpadding='0' cellspacing='0' ";
} }
/** /**
@@ -83,18 +83,14 @@ class list_admin
{ {
global $rs; global $rs;
$text = " $text = $this->parseTemplate('ADMIN_START');
<div style='text-align:center'>
".$rs->form_open("post", e_SELF, "menu_conf_form", "", "class='admin-menu' enctype='multipart/form-data'")."\n";
$text .= $this->parse_menu_options("recent_menu"); $text .= $this->parse_menu_options("recent_menu");
$text .= $this->parse_menu_options("new_menu"); $text .= $this->parse_menu_options("new_menu");
$text .= $this->parse_page_options("recent_page"); $text .= $this->parse_page_options("recent_page");
$text .= $this->parse_page_options("new_page"); $text .= $this->parse_page_options("new_page");
$text .= " $text .= $this->parseTemplate('ADMIN_END');
</form>
</div>";
return $text; return $text;
} }
@@ -177,26 +173,22 @@ class list_admin
$this->row['HEADING'] = LIST_ADMIN_SECT_23; $this->row['HEADING'] = LIST_ADMIN_SECT_23;
$this->row['HELP'] = LIST_ADMIN_SECT_24; $this->row['HELP'] = LIST_ADMIN_SECT_24;
$this->row['CONTID'] = "list-new-{$type}-expandable-icon"; $this->row['CONTID'] = "list-new-{$type}-expandable-icon";
$this->row['FIELD'] = "<table $this->styletable>"; $this->row['FIELD'] = $this->parseTemplate('FIELD_TABLE_START');
$iconlist = $fl->get_files($this->parent->plugin_dir."images/"); $iconlist = $fl->get_files($this->parent->plugin_dir."images/");
for($i=0;$i<count($this->parent->sections);$i++) for($i=0;$i<count($this->parent->sections);$i++)
{ {
$this->row['FIELD'] .= " $this->row['FIELD_TITLE'] = $this->parent->titles[$i];
<tr> $this->row['FIELD_ITEM'] = $rs->form_text($this->parent->sections[$i]."_".$type."_icon", 15, $this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"], 100)."
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$this->parent->titles[$i]."</td>
<td class='forumheader3'>
".$rs->form_text($this->parent->sections[$i]."_".$type."_icon", 15, $this->parent->list_pref[$this->parent->sections[$i]."_".$type."_icon"], 100)."
<input class='button' type='button' style='cursor:pointer' size='30' value='".LIST_ADMIN_12."' onclick=\"e107Helper.toggle('div_".$this->parent->sections[$i]."_".$type."_icon'); return false;\" /> <input class='button' type='button' style='cursor:pointer' size='30' value='".LIST_ADMIN_12."' onclick=\"e107Helper.toggle('div_".$this->parent->sections[$i]."_".$type."_icon'); return false;\" />
<div id='div_".$this->parent->sections[$i]."_".$type."_icon' style='display:none;'>"; <div id='div_".$this->parent->sections[$i]."_".$type."_icon' style='display:none;'>";
foreach($iconlist as $icon) foreach($iconlist as $icon)
{ {
$this->row['FIELD'] .= "<a href=\"javascript:insertext('".$icon['fname']."','".$this->parent->sections[$i]."_".$type."_icon','div_".$this->parent->sections[$i]."_".$type."_icon')\"><img src='".$icon['path'].$icon['fname']."' style='border:0' alt='' /></a> "; $this->row['FIELD_ITEM'] .= "<a href=\"javascript:insertext('".$icon['fname']."','".$this->parent->sections[$i]."_".$type."_icon','div_".$this->parent->sections[$i]."_".$type."_icon')\"><img src='".$icon['path'].$icon['fname']."' style='border:0' alt='' /></a> ";
} }
$this->row['FIELD'] .= "</div> $this->row['FIELD_ITEM'] .= "</div>";
</td> $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE');
</tr>";
} }
$this->row['FIELD'] .= "</table>"; $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE_END');
$text .= $this->parseTemplate('TOPIC_ROW'); $text .= $this->parseTemplate('TOPIC_ROW');
//amount //amount
@@ -205,23 +197,19 @@ class list_admin
$this->row['HEADING'] = LIST_ADMIN_SECT_17; $this->row['HEADING'] = LIST_ADMIN_SECT_17;
$this->row['HELP'] = LIST_ADMIN_SECT_18; $this->row['HELP'] = LIST_ADMIN_SECT_18;
$this->row['CONTID'] = "list-new-{$type}-expandable-amount"; $this->row['CONTID'] = "list-new-{$type}-expandable-amount";
$this->row['FIELD'] = "<table $this->styletable>"; $this->row['FIELD'] = $this->parseTemplate('FIELD_TABLE_START');
for($i=0;$i<count($this->parent->sections);$i++) for($i=0;$i<count($this->parent->sections);$i++)
{ {
$this->row['FIELD'] .= " $this->row['FIELD_TITLE'] = $this->parent->titles[$i];
<tr> $this->row['FIELD_ITEM'] = $rs->form_select_open($this->parent->sections[$i]."_".$type."_amount");
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$this->parent->titles[$i]."</td> for($a=1; $a<=$maxitems_amount; $a++)
<td class='forumheader3'> {
".$rs->form_select_open($this->parent->sections[$i]."_".$type."_amount"); $this->row['FIELD_ITEM'] .= ($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_amount"] == $a ? $rs->form_option($a, 1, $a) : $rs->form_option($a, 0, $a));
for($a=1; $a<=$maxitems_amount; $a++) }
{ $this->row['FIELD_ITEM'] .= $rs->form_select_close();
$this->row['FIELD'] .= ($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_amount"] == $a ? $rs->form_option($a, 1, $a) : $rs->form_option($a, 0, $a)); $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE');
}
$this->row['FIELD'] .= $rs->form_select_close()."
</td>
</tr>";
} }
$this->row['FIELD'] .= "</table>"; $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE_END');
$text .= $this->parseTemplate('TOPIC_ROW'); $text .= $this->parseTemplate('TOPIC_ROW');
//order //order
@@ -230,23 +218,19 @@ class list_admin
$this->row['HEADING'] = LIST_ADMIN_SECT_20; $this->row['HEADING'] = LIST_ADMIN_SECT_20;
$this->row['HELP'] = LIST_ADMIN_SECT_21; $this->row['HELP'] = LIST_ADMIN_SECT_21;
$this->row['CONTID'] = "list-new-{$type}-expandable-order"; $this->row['CONTID'] = "list-new-{$type}-expandable-order";
$this->row['FIELD'] = "<table $this->styletable>"; $this->row['FIELD'] = $this->parseTemplate('FIELD_TABLE_START');
for($i=0;$i<count($this->parent->sections);$i++) for($i=0;$i<count($this->parent->sections);$i++)
{ {
$this->row['FIELD'] .= " $this->row['FIELD_TITLE'] = $this->parent->titles[$i];
<tr> $this->row['FIELD_ITEM'] = $rs->form_select_open($this->parent->sections[$i]."_".$type."_order");
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$this->parent->titles[$i]."</td>
<td class='forumheader3'>
".$rs->form_select_open($this->parent->sections[$i]."_".$type."_order");
for($a=1; $a<=$max; $a++) for($a=1; $a<=$max; $a++)
{ {
$this->row['FIELD'] .= ($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_order"] == $a ? $rs->form_option($a, 1, $a) : $rs->form_option($a, 0, $a)); $this->row['FIELD_ITEM'] .= ($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_order"] == $a ? $rs->form_option($a, 1, $a) : $rs->form_option($a, 0, $a));
} }
$this->row['FIELD'] .= $rs->form_select_close()." $this->row['FIELD_ITEM'] .= $rs->form_select_close();
</td> $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE');
</tr>";
} }
$this->row['FIELD'] .= "</table>"; $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE_END');
$text .= $this->parseTemplate('TOPIC_ROW'); $text .= $this->parseTemplate('TOPIC_ROW');
//caption //caption
@@ -254,18 +238,14 @@ class list_admin
$this->row['HEADING'] = LIST_ADMIN_SECT_26; $this->row['HEADING'] = LIST_ADMIN_SECT_26;
$this->row['HELP'] = LIST_ADMIN_SECT_27; $this->row['HELP'] = LIST_ADMIN_SECT_27;
$this->row['CONTID'] = "list-new-{$type}-expandable-caption"; $this->row['CONTID'] = "list-new-{$type}-expandable-caption";
$this->row['FIELD'] = "<table $this->styletable>"; $this->row['FIELD'] = $this->parseTemplate('FIELD_TABLE_START');
for($i=0;$i<count($this->parent->sections);$i++) for($i=0;$i<count($this->parent->sections);$i++)
{ {
$this->row['FIELD'] .= " $this->row['FIELD_TITLE'] = $this->parent->titles[$i];
<tr> $this->row['FIELD_ITEM'] = $rs->form_text($this->parent->sections[$i]."_".$type."_caption", 30, $this->e107->tp->toHTML($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_caption"],"","defs"), "50", "tbox");
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>".$this->parent->titles[$i]."</td> $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE');
<td class='forumheader3'>
".$rs->form_text($this->parent->sections[$i]."_".$type."_caption", 30, $this->e107->tp->toHTML($this->parent->list_pref[$this->parent->sections[$i]."_".$type."_caption"],"","defs"), "50", "tbox")."
</td>
</tr>";
} }
$this->row['FIELD'] .= "</table>"; $this->row['FIELD'] .= $this->parseTemplate('FIELD_TABLE_END');
$text .= $this->parseTemplate('TOPIC_ROW'); $text .= $this->parseTemplate('TOPIC_ROW');
$text .= $this->parseTemplate('TOPIC_ROW_SPACER'); $text .= $this->parseTemplate('TOPIC_ROW_SPACER');
@@ -284,12 +264,9 @@ class list_admin
{ {
global $rs; global $rs;
$text = " $this->row['ID'] = "list-new-".str_replace('_', '-', $type);
<div id='list-new-".str_replace('_', '-', $type)."' class='e-hideme center'> $this->row['TITLE'] = ($type == "new_menu" ? LIST_ADMIN_OPT_5 : LIST_ADMIN_OPT_3);
<table style='".ADMIN_WIDTH."' class='fborder'>"; $text = $this->parseTemplate('OPTIONS_HEADER');
$title = ($type == "new_menu" ? LIST_ADMIN_OPT_5 : LIST_ADMIN_OPT_3);
$text .= "<tr><td colspan='4' class='forumheader'>".$title."</td></tr>";
$text .= $this->parse_global_options($type); $text .= $this->parse_global_options($type);
@@ -396,12 +373,9 @@ class list_admin
$display = ($type == "recent_page" ? "display:none;" : ''); $display = ($type == "recent_page" ? "display:none;" : '');
$text = " $this->row['ID'] = "list-new-".str_replace('_', '-', $type);
<div id='list-new-".str_replace('_', '-', $type)."' class='e-hideme center'> $this->row['TITLE'] = ($type == "new_page" ? LIST_ADMIN_OPT_4 : LIST_ADMIN_OPT_2);
<table style='".ADMIN_WIDTH."' class='fborder'>"; $text = $this->parseTemplate('OPTIONS_HEADER');
$title = ($type == "new_page" ? LIST_ADMIN_OPT_4 : LIST_ADMIN_OPT_2);
$text .= "<tr><td colspan='4' class='forumheader'>".$title."</td></tr>";
$text .= $this->parse_global_options($type); $text .= $this->parse_global_options($type);

View File

@@ -9,8 +9,8 @@
* List Class * List Class
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_class.php,v $
* $Revision: 1.7 $ * $Revision: 1.8 $
* $Date: 2009-01-27 21:33:52 $ * $Date: 2009-01-27 23:46:12 $
* $Author: lisa_ $ * $Author: lisa_ $
* *
*/ */
@@ -625,7 +625,7 @@ class listclass
{ {
if(is_readable($this->plugin_dir."images/".$icon)) if(is_readable($this->plugin_dir."images/".$icon))
{ {
$bullet = "<img src='".$this->plugin_dir."images/".$icon."' style='width:".$icon_width."px; height:".$icon_height."px; border:0; vertical-align:middle;' alt='' />"; $bullet = "<img src='".$this->plugin_dir."images/".$icon."' alt='' />";
} }
} }
} }

View File

@@ -9,8 +9,8 @@
* List Shortcodes * List Shortcodes
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_shortcodes.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_shortcodes.php,v $
* $Revision: 1.2 $ * $Revision: 1.3 $
* $Date: 2009-01-27 21:33:52 $ * $Date: 2009-01-27 23:46:12 $
* $Author: lisa_ $ * $Author: lisa_ $
* *
*/ */
@@ -43,37 +43,37 @@ class list_shortcodes
function get_list_date() function get_list_date()
{ {
return $this->row['date']; return $this->e107->tp->toHTML($this->row['date'], true, "TITLE");
} }
function get_list_icon() function get_list_icon()
{ {
return $this->row['icon']; return $this->e107->tp->toHTML($this->row['icon'], true, "TITLE");
} }
function get_list_heading() function get_list_heading()
{ {
return $this->row['heading']; return $this->e107->tp->toHTML($this->row['heading'], true, "TITLE");
} }
function get_list_author() function get_list_author()
{ {
return $this->row['author']; return $this->e107->tp->toHTML($this->row['author'], true, "");
} }
function get_list_category() function get_list_category()
{ {
return $this->row['category']; return $this->e107->tp->toHTML($this->row['category'], true, "");
} }
function get_list_info() function get_list_info()
{ {
return $this->row['info']; return $this->e107->tp->toHTML($this->row['info'], true, "");
} }
function get_list_caption() function get_list_caption()
{ {
return $this->rc->data['caption']; return $this->e107->tp->toHTML($this->rc->data['caption'], true, "");
} }
function get_list_displaystyle() function get_list_displaystyle()
@@ -89,7 +89,7 @@ class list_shortcodes
function get_list_col_welcometext() function get_list_col_welcometext()
{ {
return $this->e107->tp->toHTML($this->list_pref[$this->rc->mode."_welcometext"]); return $this->e107->tp->toHTML($this->list_pref[$this->rc->mode."_welcometext"], true, "");
} }
function get_list_col_cellwidth() function get_list_col_cellwidth()

View File

@@ -9,8 +9,8 @@
* List Template * List Template
* *
* $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_template.php,v $ * $Source: /cvs_backup/e107_0.8/e107_plugins/list_new/list_template.php,v $
* $Revision: 1.2 $ * $Revision: 1.3 $
* $Date: 2009-01-27 21:33:52 $ * $Date: 2009-01-27 23:46:12 $
* $Author: lisa_ $ * $Author: lisa_ $
* *
*/ */
@@ -99,6 +99,15 @@ $TEMPLATE_LIST_NEW['TIMELAPSE_TABLE'] = "<div class='forumheader3' style='margin
//##### ADMIN //##### ADMIN
$TEMPLATE_LIST_NEW['ADMIN_START'] = "
<div style='text-align:center'>
<form action='".e_SELF."' method='post' name='menu_conf_form' id='menu_conf_form' class='admin-menu' enctype='multipart/form-data'>";
$TEMPLATE_LIST_NEW['ADMIN_END'] = "
</form>
</div>";
//define some variables //define some variables
//$stylespacer = "style='border:0; height:20px;'"; //$stylespacer = "style='border:0; height:20px;'";
@@ -122,6 +131,23 @@ $TEMPLATE_LIST_NEW['TOPIC_ROW'] = "
</td> </td>
</tr>"; </tr>";
//field containing a table
$TEMPLATE_LIST_NEW['FIELD_TABLE_START'] = "<table style='width:90%; border:1px solid #444; border-collapse:collapse;' cellpadding='0' cellspacing='0'>";
$TEMPLATE_LIST_NEW['FIELD_TABLE'] = "
<tr>
<td class='forumheader3' style='width:10%; white-space:nowrap; vertical-align:top;'>{FIELD_TITLE}</td>
<td class='forumheader3'>{FIELD_ITEM}</td>
</tr>";
$TEMPLATE_LIST_NEW['FIELD_TABLE_END'] = "</table>";
//header for options page
$TEMPLATE_LIST_NEW['OPTIONS_HEADER'] = "
<div id='{ID}' class='e-hideme center'>
<table style='".ADMIN_WIDTH."' class='fborder'>
<tr><td colspan='4' class='forumheader'>{TITLE}</td></tr>";
//template for spacer row //template for spacer row
$TEMPLATE_LIST_NEW['TOPIC_ROW_SPACER'] = "<tr><td style='border:0; height:20px;' colspan='2'></td></tr>"; $TEMPLATE_LIST_NEW['TOPIC_ROW_SPACER'] = "<tr><td style='border:0; height:20px;' colspan='2'></td></tr>";