Welcome Guest [Log In] [Register]
NOTICE
If you need support for any of the codes on this board, please visit ZBCode and ask in the code's original topic. Please do not make a one.
Thank you
Add Reply
Disable Double Posting
Topic Started: May 11 2009, 07:40 PM (14 Views)
Vitality
Member Avatar
Administrator
What does it do: This disables the add reply, quote and removes the fast reply box from the topic view if you were the last one to post.
Where does it go: Below the Board
Code: HTML
 
<script type="text/javascript">
/*ZBCode - Vitality*/
if(location.href.match('topic/')){
var proTop=$("#top_info a").parent().html().split("profile/")[1].split("/")[0];
var posTop=$("td.c_username:last a.member").attr("href").split("profile/")[1].split("/")[0];
if(proTop===posTop){
$("#fast-reply").remove();
$("div.topic-buttons a").removeAttr("href");
$("span.right a").removeAttr("href");}}
</script>


Because I've seen this being asked around, here is a version that doesn't stop everyone from double posting. This one is done by group:
Code: HTML
 
<script type="text/javascript">
/*ZBCode - Vitality*/
if(location.href.match('topic/')){
function omitGroup(group){
var gName=$("dl.user_info dd").next().next().html();
if(gName===group){
$(function(){$("#fast-reply").remove();
$("div.topic-buttons a").removeAttr("href");
$("span.right a").removeAttr("href");});}}
omitGroup("GROUP_NAME")
}
</script>

Now before you put this script in, there is something you need to understand. The group names you edit in for this are those groups which will NOT be able to double post. All groups that you don't enter will be able to.
So, just find that omitGroup("GROUP_NAME") line and just edit in the group name you don't want to be able to double post. Just add more under it to disallow other groups.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code Gallery · Next Topic »
Add Reply