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

content: small correction to IE7 fix, added order method for preset tags

This commit is contained in:
lia
2007-01-14 14:18:10 +00:00
parent 6096c325b9
commit 34b3215cf3
3 changed files with 38 additions and 18 deletions

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $
| $Revision: 1.4 $
| $Date: 2007-01-14 11:59:11 $
| $Revision: 1.5 $
| $Date: 2007-01-14 14:18:09 $
| $Author: lisa_ $
+---------------------------------------------------------------+
*/
@@ -473,13 +473,31 @@ class content{
}
}
}
print_a($_POST);
/*
//create array of custom preset tags
foreach($_POST['content_custom_preset_key'] as $ck => $cv){
if(!empty($cv)){
$string[] = $cv;
}
}
*/
//create array of custom preset tags
asort($_POST['content_custom_preset_key_order']);
$corder = array_keys($_POST['content_custom_preset_key_order']);
foreach($_POST['content_custom_preset_key'] as $ck => $cv){
if(!empty($cv)){
//next routine to keep 'order' of preset tags
if(isset($_POST['content_custom_preset_key_order'][$ck])){
$k = intval($corder[$ck]);
$string[$k] = $cv;
}else{
$string[] = $cv;
}
}
}
$_POST['content_custom_preset_key'] = $string;
//echo "<pre>"; print_r($_POST); echo "</pre>";

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_db_class.php,v $
| $Revision: 1.4 $
| $Date: 2007-01-13 23:18:39 $
| $Revision: 1.5 $
| $Date: 2007-01-14 14:18:09 $
| $Author: lisa_ $
+---------------------------------------------------------------+
*/
@@ -250,9 +250,9 @@ class contentdb{
}
}
if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day'] != "none"
&& isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month'] != "none"
&& isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year'] != "none" ){
if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day']!='0' && $_POST['end_day'] != "none"
&& isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month']!='0' && $_POST['end_month'] != "none"
&& isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year']!='0' && $_POST['end_year'] != "none" ){
$endtime = mktime( 0, 0, 0, intval($_POST['end_month']), intval($_POST['end_day']), intval($_POST['end_year']));
}else{
$endtime = "0";
@@ -369,7 +369,8 @@ class contentdb{
}
}else{
if($qs[2]==$_POST['cat_id']){
$parent = 0;
$parent = intval($_POST['parent_id']);
$parent = ($parent!=0 ? "0.".$parent : 0);
}else{
}
}
@@ -379,17 +380,17 @@ class contentdb{
}
$_POST['parent'] = $parent;
if( isset($_POST['ne_day']) && $_POST['ne_day']!='' && $_POST['ne_day'] != "none"
&& isset($_POST['ne_month']) && $_POST['ne_month']!='' && $_POST['ne_month'] != "none"
&& isset($_POST['ne_year']) && $_POST['ne_year']!='' && $_POST['ne_year'] != "none" ){
if( isset($_POST['ne_day']) && $_POST['ne_day']!='' && $_POST['ne_day']!='0' && $_POST['ne_day'] != "none"
&& isset($_POST['ne_month']) && $_POST['ne_month']!='' && $_POST['ne_month']!='0' && $_POST['ne_month'] != "none"
&& isset($_POST['ne_year']) && $_POST['ne_year']!='' && $_POST['ne_year']!='0' && $_POST['ne_year'] != "none" ){
$starttime = mktime( 0, 0, 0, intval($_POST['ne_month']), intval($_POST['ne_day']), intval($_POST['ne_year']));
}else{
$starttime = time();
}
if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day'] != "none"
&& isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month'] != "none"
&& isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year'] != "none" ){
if( isset($_POST['end_day']) && $_POST['end_day']!='' && $_POST['end_day']!='0' && $_POST['end_day'] != "none"
&& isset($_POST['end_month']) && $_POST['end_month']!='' && $_POST['end_month']!='0' && $_POST['end_month'] != "none"
&& isset($_POST['end_year']) && $_POST['end_year']!='' && $_POST['end_year']!='0' && $_POST['end_year'] != "none" ){
$endtime = mktime( 0, 0, 0, intval($_POST['end_month']), intval($_POST['end_day']), intval($_POST['end_year']));
}else{
$endtime = "0";

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_form_class.php,v $
| $Revision: 1.4 $
| $Date: 2007-01-14 11:59:11 $
| $Revision: 1.5 $
| $Date: 2007-01-14 14:18:10 $
| $Author: lisa_ $
+---------------------------------------------------------------+
*/
@@ -1277,7 +1277,7 @@ class contentform{
$button = $hidden;
if($qs[1] == "edit" && is_numeric($qs[2]) ){
$button .= $rs -> form_button("submit", "preview_category", (isset($_POST['preview_category']) ? CONTENT_ADMIN_MAIN_LAN_27 : CONTENT_ADMIN_MAIN_LAN_26));
$button .= $rs -> form_button("submit", "update_category", CONTENT_ADMIN_CAT_LAN_7).$rs -> form_button("submit", "category_clear", CONTENT_ADMIN_CAT_LAN_21).$rs -> form_hidden("cat_id", $qs[2]).$rs -> form_hidden("id", $qs[2]).$rs -> form_hidden("menuheading", $menuheading);
$button .= $rs -> form_button("submit", "update_category", CONTENT_ADMIN_CAT_LAN_7).$rs -> form_button("submit", "category_clear", CONTENT_ADMIN_CAT_LAN_21).$rs -> form_hidden("parent_id", $parent).$rs -> form_hidden("cat_id", $qs[2]).$rs -> form_hidden("id", $qs[2]).$rs -> form_hidden("menuheading", $menuheading);
}else{
$button .= $rs -> form_button("submit", "preview_category", (isset($_POST['preview_category']) ? CONTENT_ADMIN_MAIN_LAN_27 : CONTENT_ADMIN_MAIN_LAN_26));
$button .= $rs -> form_button("submit", "create_category", CONTENT_ADMIN_CAT_LAN_6);
@@ -1643,6 +1643,7 @@ class contentform{
if(!empty($content_pref['content_custom_preset_key'][$i])){
$TOPIC_FIELD .= "
<span style='white-space:nowrap;'>
".$rs -> form_text("content_custom_preset_key_order[$existing]", 3, $existing+1, 3)."
".$rs -> form_text("content_custom_preset_key[$existing]", 50, $content_pref['content_custom_preset_key'][$existing], 100)."
".$rs -> form_button("button", "x", "x", "onclick=\"document.getElementById('content_custom_preset_key[$existing]').value='';\"", "", "")."
</span>";