mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 13:21:54 +02:00
New notify script added to front end. You can test with forum 'quick reply' for now.
This commit is contained in:
@@ -29,11 +29,7 @@ $(document).ready(function()
|
||||
var insert = $(this).attr('data-forum-insert');
|
||||
var token = $(this).attr('data-token');
|
||||
|
||||
|
||||
if(action != 'stick' && action !='unstick')
|
||||
{
|
||||
e.preventDefault();
|
||||
}
|
||||
e.preventDefault();
|
||||
|
||||
var script = $(this).attr("src");
|
||||
|
||||
@@ -43,17 +39,40 @@ $(document).ready(function()
|
||||
data: { thread: thread, action: action, post: post, text: text, insert:insert, e_token: token },
|
||||
success: function(data) {
|
||||
|
||||
// alert(data);
|
||||
// alert(data);
|
||||
|
||||
var d = $.parseJSON(data);
|
||||
|
||||
if(d)
|
||||
{
|
||||
|
||||
|
||||
if(d.msg)
|
||||
{
|
||||
alert(d.msg);
|
||||
if(d.status == 'ok')
|
||||
{
|
||||
var alertType = 'success';
|
||||
}
|
||||
else {
|
||||
var alertType = 'info';
|
||||
}
|
||||
|
||||
// http://nijikokun.github.io/bootstrap-notify/
|
||||
$('#uiAlert').notify({
|
||||
type: alertType,
|
||||
message: { text: d.msg },
|
||||
fadeOut: { enabled: true, delay: 3000 }
|
||||
}).show();
|
||||
|
||||
// alert(d.msg);
|
||||
}
|
||||
|
||||
if(action == 'stick' || action == 'unstick' || action == 'lock' || action == 'unlock')
|
||||
{
|
||||
location.reload();
|
||||
return;
|
||||
}
|
||||
|
||||
if(action == 'quickreply' && d.status == 'ok' )
|
||||
{
|
||||
// alert(d.html);
|
||||
@@ -75,6 +94,9 @@ $(document).ready(function()
|
||||
$(t).hide('slow');
|
||||
$(p).hide('slow').slideUp(800);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,10 +278,10 @@ class e107forum
|
||||
|
||||
|
||||
|
||||
function ajaxModerate()
|
||||
public function ajaxModerate()
|
||||
{
|
||||
|
||||
if(!ADMIN) //FIXME check permissions per forum.
|
||||
if(!$this->isModerator(USERID)) //FIXME check permissions per forum.
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
@@ -139,6 +139,11 @@ if (MODERATOR)
|
||||
}
|
||||
}
|
||||
|
||||
if(e_AJAX_REQUEST && MODERATOR) // see javascript above.
|
||||
{
|
||||
$forum->ajaxModerate();
|
||||
}
|
||||
|
||||
if(varset($pref['track_online']))
|
||||
{
|
||||
$member_users = $sql->db_Count('online', '(*)', "WHERE online_location REGEXP('viewforum.php.id=$forumId\$') AND online_user_id != 0");
|
||||
|
Reference in New Issue
Block a user