mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
Comment prefs and some jquery fixes on the prefs page.
This commit is contained in:
@@ -122,7 +122,7 @@ if(e_AJAX_REQUEST) // TODO improve security
|
|||||||
$row['user_id'] = USERID;
|
$row['user_id'] = USERID;
|
||||||
$row['user_name'] = USERNAME;
|
$row['user_name'] = USERNAME;
|
||||||
$row['comment_datestamp'] = time();
|
$row['comment_datestamp'] = time();
|
||||||
$row['comment_blocked'] = (vartrue($pref['comments_moderate']) ? 2 : 0);
|
$row['comment_blocked'] = (check_class($pref['comments_moderate']) ? 2 : 0);
|
||||||
|
|
||||||
$width = ($pid) ? 5 : 0;
|
$width = ($pid) ? 5 : 0;
|
||||||
|
|
||||||
|
@@ -29,8 +29,8 @@ e107::getDb()->db_Mark_Time('(Header Top)');
|
|||||||
e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2);
|
e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2);
|
||||||
e107::css('core', 'colorbox/colorbox.css', 'jquery');
|
e107::css('core', 'colorbox/colorbox.css', 'jquery');
|
||||||
|
|
||||||
e107::js('core', 'fancybox/jquery.fancybox-1.3.4.js', 'jquery', 2);
|
// e107::js('core', 'fancybox/jquery.fancybox-1.3.4.js', 'jquery', 2);
|
||||||
e107::css('core', 'fancybox/jquery.fancybox-1.3.4.css', 'jquery');
|
// e107::css('core', 'fancybox/jquery.fancybox-1.3.4.css', 'jquery');
|
||||||
|
|
||||||
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
|
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
|
||||||
e107::js('core', 'jquery-ui-timepicker-addon.js', 'jquery', 2);
|
e107::js('core', 'jquery-ui-timepicker-addon.js', 'jquery', 2);
|
||||||
|
@@ -29,6 +29,36 @@ if(! getperms("1"))
|
|||||||
|
|
||||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
||||||
$e_sub_cat = 'prefs';
|
$e_sub_cat = 'prefs';
|
||||||
|
|
||||||
|
//FIXME temporary fix - need universal solution.
|
||||||
|
e107::js('inline',"
|
||||||
|
$(document).ready(function()
|
||||||
|
{
|
||||||
|
var hash = document.location.hash;
|
||||||
|
if(hash)
|
||||||
|
{
|
||||||
|
$('.plugin-navigation a').each(function(index) {
|
||||||
|
var ot = $(this).attr('href');
|
||||||
|
$(ot).hide();
|
||||||
|
$(this).closest('li').removeClass('active');
|
||||||
|
$(this).switchClass( 'link-active', 'link', 0 );
|
||||||
|
});
|
||||||
|
var button = '#eplug-nav-' + hash.replace('#', '') + '-prev-nav';
|
||||||
|
$(hash).show();
|
||||||
|
$(button).switchClass('link', 'link-active', 30 );
|
||||||
|
$(button).closest('li').addClass('active');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#core-prefs-main').show();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
","jquery");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
require_once (e_ADMIN."auth.php");
|
require_once (e_ADMIN."auth.php");
|
||||||
|
|
||||||
$e_userclass = e107::getUserClass();
|
$e_userclass = e107::getUserClass();
|
||||||
@@ -197,7 +227,7 @@ $pref['membersonly_exceptions'] = implode("\n",$pref['membersonly_exceptions']);
|
|||||||
$text = "
|
$text = "
|
||||||
<div id='core-prefs'>
|
<div id='core-prefs'>
|
||||||
<form class='admin-menu' method='post' action='".e_SELF."'>
|
<form class='admin-menu' method='post' action='".e_SELF."'>
|
||||||
<fieldset id='core-prefs-main'>
|
<fieldset class='e-hideme' id='core-prefs-main'>
|
||||||
<legend>".PRFLAN_1."</legend>
|
<legend>".PRFLAN_1."</legend>
|
||||||
<table class='adminform'>
|
<table class='adminform'>
|
||||||
<colgroup>
|
<colgroup>
|
||||||
@@ -1315,10 +1345,13 @@ $text .= "
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class='label'>Approve Comments: </td>
|
<td class='label'>Moderate Comments made by: </td>
|
||||||
<td class='control'>
|
<td class='control'>
|
||||||
".$frm->radio_switch('comments_moderate', $pref['comments_moderate'], LAN_YES, LAN_NO)."
|
".
|
||||||
<div class='field-help'>Posted comments will require approval before being visible to others</div>
|
|
||||||
|
$frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes").
|
||||||
|
"
|
||||||
|
<div class='field-help'>Comments will require manual approval by an admin prior to being visible to other users</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
<core name="comments_disabled">0</core>
|
<core name="comments_disabled">0</core>
|
||||||
<core name="comments_emoticons">0</core>
|
<core name="comments_emoticons">0</core>
|
||||||
<core name="comments_icon">0</core>
|
<core name="comments_icon">0</core>
|
||||||
<core name="comments_moderate">0</core>
|
<core name="comments_moderate">247</core>
|
||||||
<core name="comments_sort">desc</core>
|
<core name="comments_sort">desc</core>
|
||||||
<core name="compress_output">0</core>
|
<core name="compress_output">0</core>
|
||||||
<core name="contact_emailcopy">0</core>
|
<core name="contact_emailcopy">0</core>
|
||||||
@@ -64,10 +64,9 @@
|
|||||||
<core name="e_jslib_gzip">1</core>
|
<core name="e_jslib_gzip">1</core>
|
||||||
<core name="e_jslib_nocombine">0</core>
|
<core name="e_jslib_nocombine">0</core>
|
||||||
<core name="e_jslib_core"><![CDATA[array (
|
<core name="e_jslib_core"><![CDATA[array (
|
||||||
'prototype' => 'none',
|
'prototype' => 'none',
|
||||||
'prototype-cdn' => 'none',
|
'jquery' => 'auto',
|
||||||
'jquery' => 'auto',
|
)]]></core>
|
||||||
)]]></core>
|
|
||||||
<core name="e_jslib_plugin"><![CDATA[array ()]]></core>
|
<core name="e_jslib_plugin"><![CDATA[array ()]]></core>
|
||||||
<core name="e_jslib_theme"><![CDATA[array ()]]></core>
|
<core name="e_jslib_theme"><![CDATA[array ()]]></core>
|
||||||
<core name="email_notify">0</core>
|
<core name="email_notify">0</core>
|
||||||
@@ -236,6 +235,7 @@ City, State, Country
|
|||||||
<core name="user_reg">1</core>
|
<core name="user_reg">1</core>
|
||||||
<core name="user_reg_secureveri">1</core>
|
<core name="user_reg_secureveri">1</core>
|
||||||
<core name="user_reg_veri">1</core>
|
<core name="user_reg_veri">1</core>
|
||||||
|
<core name="user_new_period">3</core>
|
||||||
<core name="user_tracking">cookie</core>
|
<core name="user_tracking">cookie</core>
|
||||||
<core name="wmessage_sc">0</core>
|
<core name="wmessage_sc">0</core>
|
||||||
<core name="wysiwyg">0</core>
|
<core name="wysiwyg">0</core>
|
||||||
|
@@ -78,6 +78,9 @@ $(document).ready(function()
|
|||||||
// Admin Prefs Navigation
|
// Admin Prefs Navigation
|
||||||
|
|
||||||
$(".plugin-navigation a").click(function () {
|
$(".plugin-navigation a").click(function () {
|
||||||
|
|
||||||
|
// alert(document.location.hash);
|
||||||
|
|
||||||
$(".plugin-navigation a").each(function(index) {
|
$(".plugin-navigation a").each(function(index) {
|
||||||
var ot = $(this).attr("href");
|
var ot = $(this).attr("href");
|
||||||
$(ot).hide();
|
$(ot).hide();
|
||||||
|
@@ -615,7 +615,7 @@ class comment
|
|||||||
'comment_author_email' => $tp->toDB($cuser_mail),
|
'comment_author_email' => $tp->toDB($cuser_mail),
|
||||||
'comment_datestamp' => $_t,
|
'comment_datestamp' => $_t,
|
||||||
'comment_comment' => $comment,
|
'comment_comment' => $comment,
|
||||||
'comment_blocked' => (vartrue($pref['comments_moderate']) ? 2 : 0),
|
'comment_blocked' => (check_class($pref['comments_moderate']) ? 2 : 0),
|
||||||
'comment_ip' => $ip,
|
'comment_ip' => $ip,
|
||||||
'comment_type' => $tp->toDB($type, true),
|
'comment_type' => $tp->toDB($type, true),
|
||||||
'comment_lock' => 0 //Not locked by default
|
'comment_lock' => 0 //Not locked by default
|
||||||
|
Reference in New Issue
Block a user