Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] Appeal Offense Form
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
  • Pages:
  • 1
  • 2
  • …
  • 5
[Completed] [ZB] Appeal Offense Form
Tweet Topic Started: Sep 9 2009, 08:30 PM (1,501 Views)
Desire Law Sep 9 2009, 08:30 PM Post #1


Posts:
114
Group:
Dedicated
Member
#3,362
Joined:
Jul 26, 2009
Coding language
None
[ZB] Appeal Offense Form



Desire Law here with another code request. I was wondering if someone could make or provide me with a code which would make a form on a webpage including the fields:

  • Username;
  • Date;
  • Offense being contested;
  • Why you feel the offense should be removed;
  • Additional comments
This would allow users with offenses (warnings, bans, other restrictions) to be able to contest whatever offense they may have by filling out the above fields and by hitting a submit button which would then, preferably, submit the appeal to an or all administrators.

Thanks!
Edited by Desire Law, Sep 15 2009, 03:11 PM.
Offline Profile Goto Top
 
Gorgor Sep 9 2009, 08:43 PM Post #2
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
So you want it to create a PM to all administrators?

What format do you want all of the stuff to appear in the PM?
Offline Profile Goto Top
 
Desire Law Sep 9 2009, 08:45 PM Post #3


Posts:
114
Group:
Dedicated
Member
#3,362
Joined:
Jul 26, 2009
Coding language
None
Yes, all administrators.



Preferably in the order in which the fields are listed in the appeal form:

  • Username;
  • Date;
  • Offense being contested;
  • Why you feel the offense should be removed;
  • Additional comments
Edited by Desire Law, Sep 9 2009, 08:45 PM.
Offline Profile Goto Top
 
Gorgor Sep 9 2009, 09:10 PM Post #4
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
Well this will work for sending it to the main admin...

Code:
 
if(location.href.match("PAGE URL")){
$("button[name=sendit]").click(function(){
message = "Username: "+$('#top_info strong a').html()+"\nDate: "+$('input[name=date]').val()+"\nOffence commited: "+$('input[name=offence]').val()+"\nWhy it should be removed:\n"+$('textarea[name=reason]').val()+"\n\nAdditional comments:\n"+$('textarea[name=reason]').val()
$.get(main_url + 'msg/?c=2', function(e) {
var xc = $('input[name=xc]',e).val(), msg = $('input[name=msg]',e).val(), secure = $('input[name=secure]', e).val(), fwd = $('input[name=fwd]').val(), convo = $('input[name=convo]',e).val(), draft_edit = $('input[name=draft_edit]',e).val(), name = "Brandt", title = "Offence appeal";
$.post(main_url + 'msg/?c=3&sd=1', {
xc:xc, msg:msg, secure:secure, fwd:fwd, convo:convo, draft_edit:draft_edit, name:name, title:title, post:message },
function(r) {
alert("Appeal sent.");
});
});
});
}


Make that page say:
Code:
 
Date: <input name='date'></input><br>
Offence commited: <input name='offence'></input><br>
Why it should be removed: <textarea name='reason'></textarea><br><br>
Additional comments: <textarea name='additional'></textarea><br>
<button name='sendit'>Submit</button>


And make sure that this will work for me so I can appeal and get a real answer for why I was banned from your forums for no reason.
Offline Profile Goto Top
 
Desire Law Sep 9 2009, 09:12 PM Post #5


Posts:
114
Group:
Dedicated
Member
#3,362
Joined:
Jul 26, 2009
Coding language
None
Any specific location for the placement of the first code? I can't find a proper place. :hmm:

EDIT: Resolved. Currently testing it.

EDIT (2): Thanks, gorgor. It works; I'll be sending you information on how to appeal without an approved account through a private message.

Preview: http://s1.zetaboards.com/Scapers_Clearing/pages/contest/
Edited by Desire Law, Sep 9 2009, 10:55 PM.
Offline Profile Goto Top
 
Swordslam46 Sep 10 2009, 06:07 PM Post #6
Member Avatar


Posts:
934
Group:
Dedicated
Member
#2,773
Joined:
Apr 9, 2009
where do you put it O_o
Offline Profile Goto Top
 
Desire Law Sep 10 2009, 06:49 PM Post #7


Posts:
114
Group:
Dedicated
Member
#3,362
Joined:
Jul 26, 2009
Coding language
None
From what I took it, I placed it in Above the Copyright as this:

Code:
 

<script>
if(location.href.match("PAGE URL")){
$("button[name=sendit]").click(function(){
message = "Username: "+$('#top_info strong a').html()+"\nDate: "+$('input[name=date]').val()+"\nOffence commited: "+$('input[name=offence]').val()+"\nWhy it should be removed:\n"+$('textarea[name=reason]').val()+"\n\nAdditional comments:\n"+$('textarea[name=additional]').val()
$.get(main_url + 'msg/?c=2', function(e) {
var xc = $('input[name=xc]',e).val(), msg = $('input[name=msg]',e).val(), secure = $('input[name=secure]', e).val(), fwd = $('input[name=fwd]').val(), convo = $('input[name=convo]',e).val(), draft_edit = $('input[name=draft_edit]',e).val(), name = "Brandt", title = "Offence appeal";
$.post(main_url + 'msg/?c=3&sd=1', {
xc:xc, msg:msg, secure:secure, fwd:fwd, convo:convo, draft_edit:draft_edit, name:name, title:title, post:message },
function(r) {
alert("Appeal sent.");
});
});
});
}
</script>


And then I edited in the appropriate fields and also corrected a careless error.

Also, if you want the webpage more visually appealing, you can use this:

Code:
 

<div class="category">
<table class="cat_head">
<tr>
<td>
<h2>
<div align="center">Contest an Offense</div>
</h2>
</td>
</tr>
</table>
</div>
<table>
<tr>
<td style="width:25%">

</td>
<td style="width:75%">

</td>
</tr>
<tr>
<td>
<span style="font-weight:bold;">How to contest an offense:</span>
</td>
<td>
If your Scapers' Clearing account has accumulated an offense or offenses, such as a warning, ban, or other restriction, and you feel as if it should be removed, please fill out the below forms and submit it to forum administration for further review. <p></p>For more information on account termination & suspension, please click <a href="http://s1.zetaboards.com/Scapers_Clearing/topic/1960389/1/?x=15">here</a>. <p></p>If you are unsure of what offenses you may have, please inquire about them by private messaging <a href="http://s1.zetaboards.com/Scapers_Clearing/profile/316319/">Brandt.</a></div>
</td>
</tr>
<tr>
<td colspan="2">
<span style="line-height:10%">
<!--Don't edit this-->
</span>
</td>
</tr>
</table>

<table>
<tr>
<th colspan="2">
<h2>
Please fill out the below fields:
</h2>
</th>
</tr>
<tr>
<td>
<span style="font-weight:bold;">Date:</span>
</td>
<td>
<input name='date'></input><br>
</td>
</tr>
<tr>
<td>
<span style="font-weight:bold;">Offense committed:</span>
</td>
<td>
<input name='offence'></input><br>
</td>
</tr>
<tr>
<td>
<span style="font-weight:bold;">Why it should be removed:</span>
</td>
<td>
<textarea name='reason'></textarea><br><br>
</td>
</tr>
<tr>
<td>
<span style="font-weight:bold;">Additional information:</span>
</td>
<td>
<textarea name='additional'></textarea><br>
</td>
</tr>

<td colspan="2"><!--Don't edit this td element unless altering height-->
<span style="line-height:10%">

</span>
</td>
</tr>
</table>
<p></p>
<button name='sendit'>Submit</button>
Edited by Desire Law, Sep 10 2009, 06:51 PM.
Offline Profile Goto Top
 
stargazer Sep 11 2009, 02:53 AM Post #8


Posts:
219
Group:
Dedicated
Member
#2,299
Joined:
Feb 11, 2009
Coding language
HTML/CSS
I have a question about this code. Is it possible to have the information sent to a forum/topic instead of PM?

How can I add additional fields?
Offline Profile Goto Top
 
stargazer Sep 11 2009, 02:58 AM Post #9


Posts:
219
Group:
Dedicated
Member
#2,299
Joined:
Feb 11, 2009
Coding language
HTML/CSS
I have tested this one one of my boards but I do receive any PM.., do I have to send it from an account that is not the one that I am logged into (admin)?
Offline Profile Goto Top
 
Desire Law Sep 11 2009, 06:06 AM Post #10


Posts:
114
Group:
Dedicated
Member
#3,362
Joined:
Jul 26, 2009
Coding language
None
stargazer
Sep 11 2009, 02:58 AM
I have tested this one one of my boards but I do receive any PM.., do I have to send it from an account that is not the one that I am logged into (admin)?
Yes - it does not work if you, the root administrator, attempts to submit one. I suggest testing it out with another account.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Completed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • …
  • 5

Track Topic · E-mail Topic Time: 2:28 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy