We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
[ C ] Forum Notification
Topic Started: Dec 22 2014, 04:35 PM (899 Views)
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
http://w11.zetaboards.com/GamesAndAnime/index/
Zeta
I'm looking for a code that will send a notification to the Report CP when a new post is made in a specific forum.

I'm using the Flexible Forum Script to send data to a specific forum and wish to get notifications sent to the Report CP for the Admins, Owner, and Strong Mods groups
Offline Profile Goto Top
 
Replies:
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
That's possible as well. Basically if the 'unread' icon for a topic listing is present, that topic will appear in the Report CP.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Dec 31 2014, 12:13 AM
That's possible as well. Basically if the 'unread' icon for a topic listing is present, that topic will appear in the Report CP.
Perfect then. Only thing is that I need it to be automatic, be able to select the groups I want via Group ID (or by Member ID if that's easier) and specify what forum(s) I want it to apply to.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Why would you need to insert a group or member ID? Whoever has access to the Report CP will be able to view the topic listings.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Dec 31 2014, 12:19 AM
Why would you need to insert a group or member ID? Whoever has access to the Report CP will be able to view the topic listings.
True. Can mod groups access it though? Not Global/Super mod groups, but forum mods.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
It doesn't look like it, based on my tests.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Hmm. That's fine. A long as the Report CP number shows correctly go ahead and make it. I'm mainly focusing on Global Mods and Admins seeing the notifications anyways.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
$(function() {
var fID = FORUM_ID;

$('#rcp_pm_list').after('<br /><table cellspacing="0" id="forum_notifications"><thead><tr><th colspan="6">Forum Notifications</th></tr></thead><tbody><tr><td id="none" colspan="6">There are no unread topics at this time.</td></tr></tbody></table>');

$.get(main_url + 'forum/' + fID + '/?force_ads', function(data) {
$('tr.newreplies', data).each(function() {
$(this).appendTo('#forum_notifications tbody');
});

if ($('tr.newreplies').length) {
$('#none').hide();
}

$('td.c_cat-mark:has(input)').hide();

if ($('#menu_rcp small').text() === '0') {
$('#menu_rcp small').text($('tr.newreplies', data).length);
} else {
$('#menu_rcp small').text($('tr.newreplies', data).length + parseInt($('#menu_rcp small').text(), 10));
}
});
});
</script>
Change FORUM_ID as necessary.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Great, but can you make the table in the Report CP match the themes? Like give it the h2 and all that so it matched the Reported Posts and Reported PMs?

EDIT: It also kinda messes up the /forum/ page tables: http://prntscr.com/5n1bi9
Edited by Kankuro, Dec 31 2014, 01:29 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
$('td.c_cat-mark:has(input)').hide();
Change that to this:
Code:
 
if (location.href.indexOf('/report/') !== -1) {
$('td.c_cat-mark:has(input)').hide();
}
As for the H2 not appearing correctly, try inserting this code before the 3-Piece H2 code.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Got the tables to appear correctly but it doesn't take the h2 of the theme I'm using for the Notification table.

http://prntscr.com/5nfil0
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Did you try making the change I suggested?
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
http://z5.ifrm.com/30458/170/0/f5307244/AwardStaffNotifications.js

I had to move it to theme layout though. Doubt that will make a difference however. But I moved it there because that's the only 3-Piece H2 code I could find.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try adding a document ready() function around the 3-Piece H2 code, and if that doesn't work a window load() function or a setTimeout() function may be other viable choices. You're basically needing the 3-Piece H2 code to fully load after all other codes have loaded so it will take affect on codes that use an H2 like my code.

If none of the above options work, you could just change the HTML to use the 3-Piece H2 HTML instead.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Cory
Jan 2 2015, 08:05 AM
Try adding a document ready() function around the 3-Piece H2 code, and if that doesn't work a window load() function or a setTimeout() function may be other viable choices. You're basically needing the 3-Piece H2 code to fully load after all other codes have loaded so it will take affect on codes that use an H2 like my code.

If none of the above options work, you could just change the HTML to use the 3-Piece H2 HTML instead.
Alrighty
Offline Profile Goto Top
 
Helena
Member Avatar
M is for Mod

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2