mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Carry across some mods from 0.7
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:35:12 $
|
| $Date: 2007-07-23 21:13:34 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
$eplug_admin = true;
|
$eplug_admin = true;
|
||||||
@@ -986,7 +986,22 @@ class forum
|
|||||||
|
|
||||||
function show_prefs()
|
function show_prefs()
|
||||||
{
|
{
|
||||||
global $pref, $ns;
|
global $pref, $ns, $sql;
|
||||||
|
|
||||||
|
if($sql->db_Count('plugin','(*)', "where plugin_path = 'poll' AND plugin_installflag = 1"))
|
||||||
|
{
|
||||||
|
$poll_installed = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$poll_installed = false;
|
||||||
|
if($pref['forum_poll'] == 1)
|
||||||
|
{
|
||||||
|
$pref['forum_poll'] = 0;
|
||||||
|
save_prefs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "<div style='text-align:center'>
|
||||||
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
<form method='post' action='".e_SELF."?".e_QUERY."'>\n
|
||||||
<table style='".ADMIN_WIDTH."' class='fborder'>
|
<table style='".ADMIN_WIDTH."' class='fborder'>
|
||||||
@@ -1012,8 +1027,16 @@ class forum
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='width:75%' class='forumheader3'>".FORLAN_49."<br /><span class='smalltext'>".FORLAN_50."</span></td>
|
<td style='width:75%' class='forumheader3'>".FORLAN_49."<br /><span class='smalltext'>".FORLAN_50."</span></td>";
|
||||||
<td style='width:25%;text-align:center' class='forumheader3' >".($pref['forum_poll'] ? "<input type='checkbox' name='forum_poll' value='1' checked='checked' />" : "<input type='checkbox' name='forum_poll' value='1' />")."</td>
|
if($poll_installed)
|
||||||
|
{
|
||||||
|
$text .= "<td style='width:25%;text-align:center' class='forumheader3' >".($pref['forum_poll'] ? "<input type='checkbox' name='forum_poll' value='1' checked='checked' />" : "<input type='checkbox' name='forum_poll' value='1' />")."</td>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$text .= "<td style='width:25%;text-align:center' class='forumheader3' >".FORLAN_66."</td>";
|
||||||
|
}
|
||||||
|
$text .= "
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1223,8 +1246,8 @@ class forum
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style='text-align:center' class='forumheader3'>".FORLAN_2."<br />
|
<td style='text-align:center' class='forumheader3'>".FORLAN_2."<br />
|
||||||
".FORLAN_89." <input type='radio' name='prune_type' value='".FORLAN_3."' />
|
".FORLAN_89." <input type='radio' name='prune_type' value='delete' />
|
||||||
".FORLAN_90." <input type='radio' name='prune_type' value='".FORLAN_111."' checked='checked' />
|
".FORLAN_90." <input type='radio' name='prune_type' value='make_inactive' checked='checked' />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@@ -11,9 +11,9 @@ e107 website system
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_newforumposts_menu.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_newforumposts_menu.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:35:18 $
|
| $Date: 2007-07-23 21:13:34 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,5 +28,7 @@ define("NFP_8", "Show original topics in menu?");
|
|||||||
define("NFP_9", "Update menu Settings");
|
define("NFP_9", "Update menu Settings");
|
||||||
define("NFP_10", "New Forum Posts Menu Configuration");
|
define("NFP_10", "New Forum Posts Menu Configuration");
|
||||||
define("NFP_11", "Posted by");
|
define("NFP_11", "Posted by");
|
||||||
|
define("NFP_12", "Maximum age of displayed posts");
|
||||||
|
define("NFP_13", "Use zero on a quiet site; setting a value in days will reduce database time on a busy site");
|
||||||
|
|
||||||
?>
|
?>
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2007-06-08 19:15:08 $
|
| $Date: 2007-07-23 21:13:34 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -30,16 +30,20 @@ else
|
|||||||
include_once(e_PLUGIN."forum/languages/English/lan_newforumposts_menu.php");
|
include_once(e_PLUGIN."forum/languages/English/lan_newforumposts_menu.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$max_age = varset($menu_pref['newforumposts_maxage'],0);
|
||||||
|
$max_age = $max_age == 0 ? '' : "(t.thread_datestamp > '".intval(time()-$max_age*86400)."') AND ";
|
||||||
$query2 = "
|
$query2 = "
|
||||||
SELECT tp.thread_name AS parent_name, t.thread_datestamp , t.thread_thread, t.thread_name, t.thread_id, t.thread_user, f.forum_id, f.forum_name, f.forum_class, u.user_name, fp.forum_class FROM #forum_t AS t
|
SELECT tp.thread_name AS parent_name,
|
||||||
|
t.thread_datestamp , t.thread_thread, t.thread_name, t.thread_id, t.thread_user,
|
||||||
|
f.forum_id, f.forum_name, f.forum_class, u.user_name, fp.forum_class FROM #forum_t AS t
|
||||||
LEFT JOIN #user AS u ON t.thread_user = u.user_id
|
LEFT JOIN #user AS u ON t.thread_user = u.user_id
|
||||||
LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id
|
LEFT JOIN #forum_t AS tp ON t.thread_parent = tp.thread_id
|
||||||
LEFT JOIN #forum AS f ON (f.forum_id = t.thread_forum_id
|
LEFT JOIN #forum AS f ON (f.forum_id = t.thread_forum_id AND f.forum_class IN (".USERCLASS_LIST."))
|
||||||
AND f.forum_class IN (".USERCLASS_LIST."))
|
|
||||||
LEFT JOIN #forum AS fp ON f.forum_parent = fp.forum_id
|
LEFT JOIN #forum AS fp ON f.forum_parent = fp.forum_id
|
||||||
WHERE fp.forum_class IN (".USERCLASS_LIST.")
|
WHERE {$max_age} fp.forum_class IN (".USERCLASS_LIST.")
|
||||||
ORDER BY t.thread_datestamp DESC LIMIT 0, ".$menu_pref['newforumposts_display'];
|
ORDER BY t.thread_datestamp DESC LIMIT 0, ".$menu_pref['newforumposts_display'];
|
||||||
|
|
||||||
|
|
||||||
$results = $sql->db_Select_gen($query2);
|
$results = $sql->db_Select_gen($query2);
|
||||||
|
|
||||||
if(!$results)
|
if(!$results)
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu_config.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu_config.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:35:15 $
|
| $Date: 2007-07-23 21:13:34 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
$eplug_admin = TRUE;
|
$eplug_admin = TRUE;
|
||||||
@@ -40,44 +40,58 @@ if (isset($_POST['update_menu'])) {
|
|||||||
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
|
$sql->db_Update("core", "e107_value='$tmp' WHERE e107_name='menu_pref' ");
|
||||||
$ns->tablerender("", "<div style=\"text-align:center\"><b>".NFP_3."</b></div>");
|
$ns->tablerender("", "<div style=\"text-align:center\"><b>".NFP_3."</b></div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$menu_pref['newforumposts_maxage'] = varset($menu_pref['newforumposts_maxage'],0);
|
||||||
|
|
||||||
$text = "<div style='text-align:center'>
|
$text = "<div style='text-align:center'>
|
||||||
<form method=\"post\" action=\"".e_SELF."?".e_QUERY."\" name=\"menu_conf_form\">
|
<form method=\"post\" action=\"".e_SELF."?".e_QUERY."\" name=\"menu_conf_form\">
|
||||||
<table style=\"width:85%\" class=\"fborder\">
|
<table style='width:85%' class=\"fborder\">
|
||||||
|
<colgroup>
|
||||||
|
<col style='width:40%;' />
|
||||||
|
<col style='width:60%;' />
|
||||||
|
</colgroup>
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width:40%\" class='forumheader3'>".NFP_4.": </td>
|
<td class='forumheader3'>".NFP_4.": </td>
|
||||||
<td style=\"width:60%\" class='forumheader3'>
|
<td class='forumheader3'>
|
||||||
<input class=\"tbox\" type=\"text\" name=\"newforumposts_caption\" size=\"20\" value=\"".$menu_pref['newforumposts_caption']."\" maxlength=\"100\" />
|
<input class=\"tbox\" type=\"text\" name=\"newforumposts_caption\" size=\"20\" value=\"".$menu_pref['newforumposts_caption']."\" maxlength=\"100\" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width:40%\" class='forumheader3'>".NFP_5.":
|
<td class='forumheader3'>".NFP_5.":
|
||||||
</td>
|
</td>
|
||||||
<td style=\"width:60%\" class='forumheader3'>
|
<td class='forumheader3'>
|
||||||
<input class=\"tbox\" type=\"text\" name=\"newforumposts_display\" size=\"20\" value=\"".$menu_pref['newforumposts_display']."\" maxlength=\"2\" />
|
<input class=\"tbox\" type=\"text\" name=\"newforumposts_display\" size=\"20\" value=\"".$menu_pref['newforumposts_display']."\" maxlength=\"2\" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width:40%\" class='forumheader3'>".NFP_6.": </td>
|
<td class='forumheader3'>".NFP_12.":
|
||||||
<td style=\"width:60%\" class='forumheader3'>
|
</td>
|
||||||
|
<td class='forumheader3'>
|
||||||
|
<input class=\"tbox\" type=\"text\" name='newforumposts_maxage' size='20' value='".$menu_pref['newforumposts_maxage']."' maxlength='3' /><br />
|
||||||
|
<span class='smalltext'><em>".NFP_13."</em></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class='forumheader3'>".NFP_6.": </td>
|
||||||
|
<td class='forumheader3'>
|
||||||
<input class=\"tbox\" type=\"text\" name=\"newforumposts_characters\" size=\"20\" value=\"".$menu_pref['newforumposts_characters']."\" maxlength=\"4\" />
|
<input class=\"tbox\" type=\"text\" name=\"newforumposts_characters\" size=\"20\" value=\"".$menu_pref['newforumposts_characters']."\" maxlength=\"4\" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width:40%\" class='forumheader3'>".NFP_7.":
|
<td class='forumheader3'>".NFP_7.":
|
||||||
</td>
|
</td>
|
||||||
<td style=\"width:60%\" class='forumheader3'>
|
<td class='forumheader3'>
|
||||||
<input class=\"tbox\" type=\"text\" name=\"newforumposts_postfix\" size=\"30\" value=\"".$menu_pref['newforumposts_postfix']."\" maxlength=\"200\" />
|
<input class=\"tbox\" type=\"text\" name=\"newforumposts_postfix\" size=\"30\" value=\"".$menu_pref['newforumposts_postfix']."\" maxlength=\"200\" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width:40%\" class='forumheader3'>".NFP_8.":</td>
|
<td class='forumheader3'>".NFP_8.":</td>
|
||||||
<td style=\"width:60%\" class='forumheader3'>
|
<td class='forumheader3'>
|
||||||
<input type=\"checkbox\" name=\"newforumposts_title\" value=\"1\" ";
|
<input type=\"checkbox\" name=\"newforumposts_title\" value=\"1\" ";
|
||||||
if ($menu_pref['newforumposts_title']) {
|
if ($menu_pref['newforumposts_title']) {
|
||||||
$text .= " checked ";
|
$text .= " checked ";
|
||||||
|
Reference in New Issue
Block a user