diff --git a/e107_admin/menus.php b/e107_admin/menus.php
index 525019445..37ff2bac7 100644
--- a/e107_admin/menus.php
+++ b/e107_admin/menus.php
@@ -380,8 +380,8 @@ TEMPL;
.sortable li { border-radius: 4px }
.sortable li:hover { background-color: silver; box-shadow:3px 3px 3px silver }
- .regularMenu { cursor:move; border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-top:10px; padding-bottom:10px }
-
+ .regularMenu { cursor:move; border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-top:10px; padding-bottom:10px;background-color: #E0EBF1; border-radius: 5px; }
+ .regularMenu span {padding:3px; font-weight:bold; color:#2F2F2F;text-align:left; }
.ui-draggable { background-color: rgb(245, 245, 245); min-width:100px;}
",'jquery');
diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php
index 5b3f38c62..15f02b145 100644
--- a/e107_core/shortcodes/batch/admin_shortcodes.php
+++ b/e107_core/shortcodes/batch/admin_shortcodes.php
@@ -1817,6 +1817,8 @@ Inverse 10 10
global $pref;
$action = "";
+ return ;
+
$var['menumanager']['text'] = LAN_MENULAYOUT;
$var['menumanager']['link'] = e_ADMIN_ABS.'menus.php';
diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php
index 88e54cf79..9acdf64be 100644
--- a/e107_core/shortcodes/batch/news_shortcodes.php
+++ b/e107_core/shortcodes/batch/news_shortcodes.php
@@ -60,6 +60,12 @@ class news_shortcodes extends e_shortcode
$text = e107::getParser()->toAttribute($text);
}
+ if(!empty($parm['limit']))
+ {
+ $text = e107::getParser()->text_truncate($text, $parm['limit']);
+ }
+
+
return $text;
}
@@ -485,12 +491,13 @@ class news_shortcodes extends e_shortcode
function sc_newssummary($parm=null)
{
+ $text = '';
+
if($this->news_item['news_summary'])
{
- return $this->news_item['news_summary'].'
';
+ $text = $this->news_item['news_summary'];
}
-
- if($this->news_item['news_body']) // Auto-generate from first 2 sentences of news-body. //TODO Add Pref?
+ elseif($this->news_item['news_body']) // Auto-generate from first 2 sentences of news-body. //TODO Add Pref?
{
$tp = e107::getParser();
$text = $tp->toHtml($this->news_item['news_body'],true);
@@ -501,9 +508,17 @@ class news_shortcodes extends e_shortcode
if($tmp[0])
{
- return trim($tmp[0]);
+ $text = trim($tmp[0]);
}
}
+
+ if(!empty($parm['limit']))
+ {
+ $text = e107::getParser()->text_truncate($text, $parm['limit']);
+ }
+
+
+ return $text;
}
/**
diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php
index 9d6752a68..a59596db4 100644
--- a/e107_handlers/media_class.php
+++ b/e107_handlers/media_class.php
@@ -1101,9 +1101,9 @@ class e_media
$img_data['media_url'] = $tp->createConstants($newpath,'rel');
$img_data['media_name'] = $tp->toDB(basename($newpath));
- $img_data['media_caption'] = $new_data['media_caption'];
+ $img_data['media_caption'] = vartrue($new_data['media_caption']);
$img_data['media_category'] = vartrue($category,'_common_image');
- $img_data['media_description'] = $new_data['media_description'];
+ $img_data['media_description'] = vartrue($new_data['media_description']);
$img_data['media_userclass'] = '0';
if($sql->insert("core_media",$img_data))
@@ -1114,7 +1114,7 @@ class e_media
}
else
{
- $this->log("Db Insert Failed ");
+ $this->log("Db Insert Failed: ".var_export($img_data,true));
rename($newpath,$oldpath); //move it back.
return FALSE;
}
diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php
index 128922f17..d140db48d 100644
--- a/e107_handlers/menumanager_class.php
+++ b/e107_handlers/menumanager_class.php
@@ -1605,7 +1605,7 @@ class e_menuManager {
if(!$this->dragDrop)
{
- return "".$caption."
". $text;
+ return "".$caption."
". $text;
// return;
diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php
index 2d0b3c750..1ecd192da 100644
--- a/e107_handlers/news_class.php
+++ b/e107_handlers/news_class.php
@@ -684,10 +684,12 @@ class e_news_tree extends e_front_tree_model
$parser = e107::getParser();
$batch = e107::getScBatch('news')
->setScVar('param', $param);
-
- $batch->wrapper('news_menu/latest'); //@SecretR - Please FIXME, I'm lost in here. (Cam)
+
+ $wrapperKey = ($parms['tmpl'].'/'.$parms['tmpl_key']);
+ $batch->wrapper($wrapperKey);
$i = 1;
+
$items = $this->getTree();
if(!empty($items))
diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php
index 7d3243f95..842e62b6a 100644
--- a/e107_handlers/shortcode_handler.php
+++ b/e107_handlers/shortcode_handler.php
@@ -81,7 +81,7 @@ class e_parse_shortcode
*/
protected $wrappers = array();
protected $wrapper = null; // current wrapper being processed.
- protected $wrapperDebugDone = false;
+ protected $wrapperDebugDone = array();
/**
* Former $sc_style global variable. Internally used - performance reasons
@@ -772,6 +772,7 @@ class e_parse_shortcode
}
elseif(E107_DBG_BBSC)
{
+ $this->wrapper = $this->addedCodes->getWrapperID();
// e107::getMessage()->addDebug("Wrapper Empty: ".$this->addedCodes->wrapper());
}
@@ -1101,7 +1102,7 @@ class e_parse_shortcode
}
}
- if(E107_DBG_BBSC && $this->wrapperDebugDone==false && !empty($this->wrappers))
+ if(E107_DBG_BBSC && $this->wrapperDebugDone[$this->wrapper]==false && !empty($this->wrapper))
{
list($wrapTmpl, $wrapID1, $wrapID2) = explode('/',$this->wrapper,3);
@@ -1112,10 +1113,10 @@ class e_parse_shortcode
}
// e107::getMessage()->addDebug("Active Wrapper: \$".$wrapActive);
- $this->wrapperDebugDone = true;
+ $this->wrapperDebugDone[$this->wrapper] = true;
global $db_debug;
- $db_debug->logCode(3, $this->wrapper,null, '
To use, add to the '.$wrapTmpl.' template:'); + $db_debug->logCode(3, $this->wrapper,null, '
$'.$wrapActive.'[\'SHORTCODE_NAME\'] = "(html before){---}(html after)";
To use, add to the file '.$wrapTmpl.'_template.php:'); } if (isset($ret) && ($ret != '' || is_numeric($ret))) diff --git a/e107_plugins/news/e_menu.php b/e107_plugins/news/e_menu.php index ffa11f74f..1ab6b33cc 100644 --- a/e107_plugins/news/e_menu.php +++ b/e107_plugins/news/e_menu.php @@ -26,7 +26,7 @@ class news_menu * Configuration Fields. * @return array */ - public function config($menu='') + public function config($menu='') //TODO LAN { $fields = array(); $categories = array(); @@ -47,6 +47,16 @@ class news_menu $fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$categories, 'default'=>'blank')); break; + case "news_grid": + $fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge')); + $fields['category'] = array('title'=> LAN_CATEGORY, 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$categories, 'default'=>'blank')); + $fields['layout'] = array('title'=> "Layout", 'type'=>'method', 'writeParms'=>''); + $fields['count'] = array('title'=> "Number of Items", 'type'=>'number', 'writeParms'=>array('pattern'=>'[0-9]*', 'default'=>4)); + $fields['titleLimit'] = array('title'=> "Title Character Limit", 'type'=>'number', 'writeParms'=>''); + $fields['summaryLimit'] = array('title'=> "Summary Character Limit", 'type'=>'number', 'writeParms'=>''); + // TODO Add a field for 'latest' vs 'sticky' vs 'assigned by news item (news_render_type)' + break; + case "news_categories": $fields['caption'] = array('title'=> LAN_CAPTION, 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge')); @@ -74,3 +84,31 @@ class news_menu } + +// optional +class news_menu_form extends e_form +{ + + public function layout($curVal) + { + + $arr = array( + "col-md-6" => "
$'.$wrapActive.'[\'SHORTCODE_NAME\'] = "(html before){---}(html after)";
".$this->radio('layout', $k, $curVal, array('label'=>$k))." | ".$v." |