".NWSLAN_115." |
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 571a9d6ca..3cfd7fd03 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -1410,7 +1410,7 @@ class e_form
* @param string $name
* @param array $option_array
* @param mixed $checked
- * @param array $options [optional]
+ * @param array $options [optional useKeyValues]
*/
function checkboxes($name, $option_array, $checked, $options=array())
{
@@ -1439,6 +1439,11 @@ class e_form
$text .= $this->checkbox($cname, $key, $c, $label);
}
+ if(!empty($text))
+ {
+ return " ".$text." ";
+ }
+
return $text;
}
diff --git a/e107_languages/English/admin/lan_newspost.php b/e107_languages/English/admin/lan_newspost.php
index 29b3bb845..92a53160f 100644
--- a/e107_languages/English/admin/lan_newspost.php
+++ b/e107_languages/English/admin/lan_newspost.php
@@ -90,9 +90,9 @@ define("NWSLAN_77", "Post to other news menu");
define("NWSLAN_83","Extended news post");
define("NWSLAN_84","Choose which visitors will see news item");
-define("NWSLAN_86", "Show News-Category Footer Menu");
-define("NWSLAN_87", "News Category Columns?");
-define("NWSLAN_88", "News posts to display per page?");
+define("NWSLAN_86", "News-category footer menu");
+define("NWSLAN_87", "News-category columns");
+define("NWSLAN_88", "Default-view limit per page");
//define("NWSLAN_89", "Save News Preferences");
define("NWSLAN_90", "News Preferences");
define("NWSLAN_100", "Enable Image uploading on Submit News page");
@@ -111,7 +111,7 @@ define("NWSLAN_112", "If this box is ticked, a box containing the date will be d
define("NWSLAN_113", "Use non-standard template for news layout");
define("NWSLAN_114", "if the theme you're using has a news layout template, use this instead of the generic layout");
-define("NWSLAN_115", "News posts to display in archive ?");
+define("NWSLAN_115", "Archive limit");
define("NWSLAN_116", "First update the preferences with the changed display per page setting, then update again after setting the news archive preference. (0 is un-activated)");
define("NWSLAN_117", "Set the title for the news archive");
// define("NWSLAN_118", "View Images"); already defined above.
@@ -214,7 +214,9 @@ define("LAN_NEWS_87", "eg. blogsearch.google.com/ping/RPC2");
define("LAN_NEWS_88", "Determines how the default news page should appear.");
define("LAN_NEWS_89", "Notify these services when you create/update news items.");
define("LAN_NEWS_90", "One per line.");
-define("LAN_NEWS_91", "Limit for News-Listing Pages");
+define("LAN_NEWS_91", "List-view limit per page");
define("LAN_NEWS_92", "eg. news.php?all or news.php?cat.1 or news.php?tag=xxx");
+define("LAN_NEWS_93", "List-view content");
+define("LAN_NEWS_94", "Items assigned to these templates will be displayed in the list.");
?>
\ No newline at end of file
diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js
index 210f85356..cbe520207 100644
--- a/e107_web/js/core/admin.jquery.js
+++ b/e107_web/js/core/admin.jquery.js
@@ -345,10 +345,10 @@ $(document).ready(function()
});
// run tips on .field-help
- $("div.tbox,input,textarea,select,label,.e-tip").each(function(c) {
+ $("div.tbox,div.checkboxes,input,textarea,select,label,.e-tip").each(function(c) {
var t = $(this).nextAll(".field-help");
-
+
var placement = 'right';
if($(this).is("textarea"))
diff --git a/news.php b/news.php
index b0c88c775..4bf39052d 100644
--- a/news.php
+++ b/news.php
@@ -189,12 +189,18 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
extract($row); // still required for the table-render. :(
}
- //XXX These are all correctly using LIST templates.
+ //XXX These are all correctly using LIST templates.
if ($action == 'all') // show archive of all news items using list-style template.
{
+ $renTypeQry = '';
+
+ if(!empty($pref['news_list_templates']) && is_array($pref['news_list_templates']))
+ {
+ $renTypeQry = " AND (n.news_render_type REGEXP '(^|,)(".implode("|", $pref['news_list_templates']).")(,|$)')";
+ }
- $news_total = $sql->count("news", "(*)", "WHERE news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.") AND news_start < ".time()." AND (news_end=0 || news_end>".time().")");
+ $news_total = $sql->count("news", "(*)", "WHERE news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (news_class REGEXP ".$nobody_regexp.") AND news_start < ".time()." AND (news_end=0 || news_end>".time().")". str_replace("n.news", "news", $renTypeQry));
$query = "
SELECT n.*, u.user_id, u.user_name, u.user_customtitle, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon,
nc.category_meta_keywords, nc.category_meta_description
@@ -202,10 +208,15 @@ if ($action == 'cat' || $action == 'all' || vartrue($_GET['tag']))
LEFT JOIN #user AS u ON n.news_author = u.user_id
LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id
WHERE n.news_class REGEXP '".e_CLASS_REGEXP."' AND NOT (n.news_class REGEXP ".$nobody_regexp.") AND n.news_start < ".time()."
- AND (n.news_end=0 || n.news_end>".time().")
+ AND (n.news_end=0 || n.news_end>".time().") ";
+
+ $query .= $renTypeQry;
+
+ $query .= "
ORDER BY n.news_sticky DESC, n.news_datestamp DESC
LIMIT ".intval($newsfrom).",".deftrue('NEWSALL_LIMIT', NEWSLIST_LIMIT); // NEWSALL_LIMIT just for BC. NEWSLIST_LIMIT is sufficient.
$category_name = ($defTemplate == 'list') ? PAGE_NAME : "All";
+ unset($renTypeQry);
}
elseif ($action == 'cat') // show archive of all news items in a particular category using list-style template.
{
|