Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • Moderation buttons
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
Moderation buttons
Tweet Topic Started: Sep 4 2009, 07:58 AM (1,012 Views)
Gorgor Sep 4 2009, 07:58 AM Post #1
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Code names: Moderation buttons
Description: Adds buttons above the topic for mods and admins with quick links to moderation options
Preview: http://z3.ifrm.com/307/162/0/p211861/mod_buttons.jpg

Add this to above the board:
Code:
 
<div id='tools'></div>


Add this below the board/above the copyright:
Code
 
<script>
// Moderation tool buttons
// By Gorgor
if(location.href.match("topic") && document.getElementById("top").innerHTML.match("Report CP")){
function tools(value){
$("select[name=modopts_menu]").val(value)
$("button.btn_mod:first").click()
}
function add(mod,name){
$("#tools").append("- <a href=javascript:tools('"+mod+"')>"+name+"</a> -")
}
add("2","Lock")
add("3","Unlock")
add("10","Edit")
add("12","Move")

} else {
$("#tools").remove()
}
</script>


The blue is what the moderation options are. The number is the option value of the action, and the word is what the button will say. The value of the action reffers to the regular moderation menu.

To add more, just add
Code:
 
add("#","NAME")


Here are the list of actions:
1 - Approve
2 - Close
3 - Open
4 - Delete
5 - Unpin
6 - Pin
8 - Hide
9 - Bump
10 - Edit title
12 - Move
13 - Trash

If you want to style the box the buttons are in, add to CSS:
Code:
 
#tools {
...
}
Offline Profile Goto Top
 
Viral Sep 4 2009, 02:33 PM Post #2


Posts:
342
Group:
Dedicated
Member
#48
Joined:
Jul 17, 2008
Coding language
PHP
Great idea for a code, and the preview looks great ^_^ .

Posted Image
Offline Profile Goto Top
 
R0cky 0wnz Sep 5 2009, 07:15 AM Post #3


Posts:
12
Group:
Member
Member
#3,451
Joined:
Aug 31, 2009
Great idea gorg. :)
Offline Profile Goto Top
 
Jamaal Jun 12 2010, 10:54 AM Post #4
Member Avatar


Posts:
9
Group:
Member
Member
#3,863
Joined:
Jun 12, 2010
Coding language
HTML/CSS
Referred by:
God
Awesome code ;) Just loaded now, runs smooth as a.... as a... *googles a similie*
Jamaal- Admin of Episteme Forums- A forum for intellectuals, and code testers Quotes of the Week
Funny: With the sexual tension between us we could power a search engine-Jamaal
Philiosophical: If a cake needs a baker, does a baker need a cake?- Anonymous
Random: Mmm.... Bananaaaassss...- Spongebob Squarepants
Offline Profile Goto Top
 
viperver1 Jun 12 2010, 06:05 PM Post #5
Member Avatar


Posts:
100
Group:
Member
Member
#1,984
Joined:
Jan 9, 2009
Coding language
Everything
Nice code. Might make it easier for me to moderate topics on my forum this way rather than going to it. :)
Edited by viperver1, Jun 12 2010, 06:06 PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Our users say it best:
"A great way to make a forums for free and it is very reliable as well. Thank you Zetaboards."
Learn More · Register Now
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy