Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Tiny Moderation mod
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

dcwebman
Junior Member

USA
105 Posts

Posted - 27 June 2005 :  09:54:59  Show Profile  Visit dcwebman's Homepage
All my forums are moderated and even though there's a nice little icon to go to the moderation page, it gets a little cumbersome. There are other moderators besides myself so I go to the Active Topics link to read any that the others have approved and then click the icon to approve those that they didn't approve yet. The problem is that once I'm in the topic reading, I then have to go back to Active Topics, and then click the moderation icon again. I know I could add a link to my favorites for the moderation page but I wanted to make it easy for the other moderators too, so I simply added a "Moderation Needed" link in the top right row of links. Here's what I had to change to make it work which was just a one file change:

In inc_header.asp after the first #INCLUDE FILE line, add:
<!--#INCLUDE FILE="inc_moderation.asp" -->

In the subroutine sForumNavigation (around line 432), add this immediately following the sub line:
dim UnModeratedPosts
if strModeration = "1" and mLev > 2 then
	UnModeratedPosts = CheckForUnmoderatedPosts("BOARD", 0, 0, 0)
end if

At the bottom of that subroutine, just before "end sub", add:
'added Moderation link to make it easier for moderators
if (mLev = 4 or mLev = 3) or (lcase(strNoCookies) = "1") then
	if UnModeratedPosts > 0 then
		Response.Write " | <a href=""moderate.asp"">Moderation Needed</a>"
	end if
end if

Enjoy!

Jeff

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 27 June 2005 :  11:09:31  Show Profile  Visit MarcelG's Homepage
Jeff, can you show me a little screenshot of how this would work on a live board, just to give me an idea ?
This might be something for my site.
Tnx

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

dcwebman
Junior Member

USA
105 Posts

Posted - 28 June 2005 :  08:31:28  Show Profile  Visit dcwebman's Homepage
No problem.


The Moderation Needed only appears when you need to approve posts.

Jeff

Edited by - dcwebman on 28 June 2005 08:33:17
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 28 June 2005 :  08:52:43  Show Profile  Visit MarcelG's Homepage
Aha, now I see!
But, wouldn't you need to remove the includes from the other files if you're going to include it once already in inc_header.asp ? (The other files that have this include in my case are active.asp, admin_config_features.asp, topic.asp, forum.asp, default.asp, moderate.asp, post_info.asp and search.asp).
Otherwise the function CheckForUnmoderatedPosts would be included twice.
Or am I completely wrong now ?

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 28 June 2005 08:53:32
Go to Top of Page

dcwebman
Junior Member

USA
105 Posts

Posted - 29 June 2005 :  09:15:00  Show Profile  Visit dcwebman's Homepage
I don't believe it does any harm having a function appear twice (at least it works for me). The proper thing is to make sure it does appear only once, but I didn't want to have to modify a bunch of files and hope I found every instance that gets access to that function. Feel free to make any changes and if you get a good solution that works, please post it.

Jeff
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 29 June 2005 :  09:44:20  Show Profile  Visit MarcelG's Homepage
I've implemented it on oxle, and got immediate response from the mods!!! Good work Jeff!!
I've removed the inc_moderation.asp file from all the other files, so that's fixed now. (Not that it actually provided any problems, but still )
Here's the screenshot of the mod at work:

So, once again ; thanks for this nice mod!

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

dcwebman
Junior Member

USA
105 Posts

Posted - 30 June 2005 :  09:03:52  Show Profile  Visit dcwebman's Homepage
You're welcome. Glad it worked okay for you. Was the list of files you identified in your previous post all the files you had to remove the include from?

Jeff
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 30 June 2005 :  09:17:57  Show Profile
Never worked with moderation, meself but could the line below be modified for forum.asp and topic.asp to only show if there are posts requiring moderation in the particular forum or topic the moderator is currently viewing rather than the whole board, or would that actually defeat the purpose of this mod?

UnModeratedPosts = CheckForUnmoderatedPosts("BOARD", 0, 0, 0)


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 30 June 2005 :  11:27:16  Show Profile  Visit MarcelG's Homepage
@Jeff ; yes, those were all the files I needed to modify (tip: in Crimson Editor, there's a function called 'Find in files', allowing you to search all files in a folder/directory for a certain string).

@Shaggy ; I think it would defaat the purpose of the mod, as you put it so nicely, since it would require the user to visit that specific forum before seeing that there were topics to moderate.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 30 June 2005 :  11:37:43  Show Profile
Sorry, I meant that on forum.asp and topic.asp it would only display the number of posts awaiting moderation in that particular forum or topic while still displaying the total number of posts requiring moderation in all forums on the rest of the forum pages.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 30 June 2005 :  14:35:57  Show Profile  Visit MarcelG's Homepage
Ah, like thát you mean....seems very much doable! Let me have a go at it.

In fact, it's already in forum.asp ;
if strModeration = "1" and AdminAllowed = 1 then
	UnModeratedPosts = CheckForUnModeratedPosts("FORUM", Cat_ID, Forum_ID, 0)
end if
So, we've already got the number of unmoderated posts in this forum.
A bit further we find this::
' DEM --> Start of Code for Moderated Posting
if (UnModeratedPosts > 0) and (AdminAllowed = 1) then
	Response.Write "                <a href=""moderate.asp"">" & getCurrentIcon(strIconFolderModerate,"View All UnModerated Posts","") & "</a>" & vbNewline
end if
' DEM --> End of Code for Moderated Posting
This piece of code is responsible for writing the 'moderate' icon.
So, instead of that icon we can write something else. Depending on whére you would like to show the number of posts to moderate, you can do a simple thing like this:
if (UnModeratedPosts > 0) and (AdminAllowed = 1) then
	if UnModeratedPosts = 1 then 
		Response.Write "<a href=""moderate.asp"" title=""There's 1 topic awaiting moderation"">One topic awaiting moderation</a>" & vbNewline
	else
		Response.Write "<a href=""moderate.asp"" title=""There are " & UnModeratedPosts & " topics awaiting moderation in this forum"">" & UnModeratedPosts & " topics awaiting moderation</a>" & vbNewline
	end if
end if

Just insert it anywhere you'd like to place it, for example next to the forumname.

I'm now working on topic.asp....brb

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 30 June 2005 15:38:15
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 30 June 2005 :  15:28:52  Show Profile  Visit MarcelG's Homepage
Okay, done it for topic.asp too.
Inserted these two snippets;
The first one for behind the forumname (in the forumnavigation part)
dim UnmoderatedPostsInForum
UnmoderatedPostsInForum = CheckForUnModeratedPosts("FORUM", Cat_ID, Forum_ID, 0)
if (UnmoderatedPostsInForum > 0) and (AdminAllowed = 1) then
	if UnmoderatedPostsInForum = 1 then 
		Response.Write " (<a href=""moderate.asp"" title=""There's 1 post awaiting moderation"">One post awaiting moderation in this forum</a>)" & vbNewline
	else
		Response.Write " (<a href=""moderate.asp"" title=""There are " & UnmoderatedPostsInForum & " posts awaiting moderation in this forum"">" & UnmoderatedPostsInForum & " posts awaiting moderation in this forum</a>)" & vbNewline
	end if
end if

and this piece of code to be inserted behind the Topic-title line in the same navigation:
dim UnmoderatedPostsInTopic
UnmoderatedPostsInTopic = CheckForUnModeratedPosts("TOPIC", Cat_ID, Forum_ID, Topic_ID)
if (UnmoderatedPostsInTopic > 0) and (AdminAllowed = 1) then
	if UnmoderatedPostsInTopic = 1 then 
		Response.Write " (<a href=""moderate.asp"" title=""There's 1 post awaiting moderation"">One post awaiting moderation in this topic</a>)" & vbNewline
	else
		Response.Write " (<a href=""moderate.asp"" title=""There are " & UnmoderatedPostsInTopic & " posts awaiting moderation in this topic"">" & UnmoderatedPostsInTopic & " posts awaiting moderation in this topic</a>)" & vbNewline
	end if
end if

Here are some screenshots of this modification at work at oxle.
I've modified the header slightly, but it should be easy to integrate into the normal code.
Screenshot 1: Forum.asp (50 Kb)
Screenshot 2: Topic.asp (43Kb)

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 30 June 2005 15:36:44
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 July 2005 :  07:05:59  Show Profile
Nicely done, Marcel Even better than my original suggestion.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 01 July 2005 :  07:24:57  Show Profile  Visit MarcelG's Homepage
Well, I've changed the code a bit more today, to spare a db call if the member viewing topic.asp is not a moderator.
First snippet:
if AdminAllowed = 1 then
	dim UnmoderatedPostsInForum
	UnmoderatedPostsInForum = CheckForUnModeratedPosts("FORUM", Cat_ID, Forum_ID, 0)
	if UnmoderatedPostsInForum > 0 then
		if UnmoderatedPostsInForum = 1 then 
			Response.Write " (<a href=""moderate.asp"" title=""There's 1 post awaiting moderation"">One post awaiting moderation in this forum</a>)" & vbNewline
		else
			Response.Write " (<a href=""moderate.asp"" title=""There are " & UnmoderatedPostsInForum & " posts awaiting moderation in this forum"">" & UnmoderatedPostsInForum & " posts awaiting moderation in this forum</a>)" & vbNewline
		end if
	end if
end if

second snippet:
if AdminAllowed = 1 then
	dim UnmoderatedPostsInTopic
	UnmoderatedPostsInTopic = CheckForUnModeratedPosts("TOPIC", Cat_ID, Forum_ID, Topic_ID)
	if UnmoderatedPostsInTopic > 0 then
		if UnmoderatedPostsInTopic = 1 then 
				Response.Write " (<a href=""moderate.asp"" title=""There's 1 post awaiting moderation"">One post awaiting moderation in this topic</a>)" & vbNewline
		else
				Response.Write " (<a href=""moderate.asp"" title=""There are " & UnmoderatedPostsInTopic & " posts awaiting moderation in this topic"">" & UnmoderatedPostsInTopic & " posts awaiting moderation in this topic</a>)" & vbNewline
		end if
	end if
end if

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

dcwebman
Junior Member

USA
105 Posts

Posted - 01 July 2005 :  08:53:28  Show Profile  Visit dcwebman's Homepage
Isn't it nice how one idea can bring forth other ideas? Marcel, thanks for your further work!

Jeff
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 01 July 2005 :  09:08:35  Show Profile  Visit MarcelG's Homepage
Perhaps it's worth an addition to the basecode in version 3.4.06 (Just as the Split Topic mod)

portfolio - linkshrinker - oxle - twitter
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07