Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

Pages: (2) 1 2  ( Go to first unread post ) Add ReplyNew TopicNew Poll

 Post / Form
#
    Not sure how else to title it, but here we go.

    I remember a while ago there was a code available that would allow you to have a form in a Webpage that, after being filled out, could be submitted and would be posted to a hidden forum for staff members to view/review.

    Is there a code like this which still exists? I want to use it for a role-playing game to handle claims and the like, so the staff member who updates claims lists can go to this one forum to find the newly posted claims so they can do it automatically behind the scenes. Making sure a new post is made in a forum without that forum being visible is a good way to do that, and makes it convenient that the member doesn't have to copy/paste a code or something convoluted. They just fill in a form, post it, go!

    So, is there a way to do this or a code I can implement?
PM
#
QUOTE
I remember a while ago there was a code available that would allow you to have a form in a Webpage that, after being filled out, could be submitted and would be posted to a hidden forum for staff members to view/review.

Is there a code like this which still exists?


I unfortunately couldn't locate said code, but I think this wouldn't be too hard to create. I'll dig deeper and if not I may just make it for you if it's as easy as I think it is.

signature
email: admin@jcink.com :: blog: John C.
#
Sounds like something that would be incredibly helpful to the RP community in general, so I'm probably going to go ahead and stalk this thread if no one minds.

signature
user posted image
#
note that it will probably be a few days or so before I can attempt this.

signature
email: admin@jcink.com :: blog: John C.
#
QUOTE (John @ May 12 2017, 09:22 AM)
QUOTE
I remember a while ago there was a code available that would allow you to have a form in a Webpage that, after being filled out, could be submitted and would be posted to a hidden forum for staff members to view/review.

Is there a code like this which still exists?


I unfortunately couldn't locate said code, but I think this wouldn't be too hard to create. I'll dig deeper and if not I may just make it for you if it's as easy as I think it is.

    This is awesome! Take your time, honestly. It was just something I was looking into making into a feature that hopefully would make things easier on my staff, and it would be awesome to have in general for stuff like, discussion forums or whatever.
PM
#
This should be what you're looking for: http://resource.jcink.com/?showtopic=207

I think you need an account to view it, though.
PM
#
QUOTE (klin @ May 16 2017, 07:18 AM)
This should be what you're looking for: http://resource.jcink.com/?showtopic=207

I think you need an account to view it, though.

    Unfortunately it doesn't work. I tried adding it in but for some reason, it won't recognize that a post was made, and I can't see the thread itself. Nor does it work through submitting it as a PM.
PM
#
Can you post your code? I've used it before without trouble.
PM
#
CODE
<style>
  label { display:block; margin:0 0 5px; vertical-align:baseline; }
  label strong { display:inline-block; width:350px; }
  label input, label select, label textarea { width:298px; padding:3px; border:1px solid #989898; }
  label textarea { height:200px; vertical-align:baseline; }
  </style>
  <script>
  $(document).ready( function() {
          $("#app_form").submit( function() {
                  $("#final").val("[b]Name:[/b] [u]" + $("#name").val() + "[/u]\n" +
                                  "[b]Character Name:[/b] [u]" + $("#c_name").val() + "[/u]\n" +
                                  "[b]Codename:[/b] [u]" + $("#position").val() + "[/u]\n" +
                                  "[b]Face Claim[/b] [u]" + $("#length").val() + "[/u]\n" +
                                  "[b]Member Group[/b] [u]" + $("#time :selected").text() + "[/u]\n" +
                                  "[b]First character?[/b] [u]" + $("#bring").val() + "[/u]\n" +
                                  "[b]Notes[/b] [u]" + $("#sample").val() + "[/u]");
                  $.ajax({
                          type: "POST",
                          url: "index.php?",
                          data: $("#app_form").serialize(),
                          success: function(data) {
                                  alert("Your claims request has been submitted to the staff for review and adding to the claims lists!");
                          }
                  });
                  return false;
          });
  });
  </script>
  <form id="app_form" action="index.php?" method="post" name="REPLIER">
  <input type="hidden" name="act" value="Post" />
  <input type="hidden" name="CODE" value="00" />
  <input type="hidden" name="MODE" value="01" />
  <input type="hidden" name="OID"  value="" />
  <input type="hidden" name="auth_key" value="<!-- |auth_key| -->" />

  <!-- Attention: please change these values.
  USERNAME should reflect the recipient of the application.
  MESSAGE TITLE should reflect the title of the application message.
  -->

<input type="hidden" name="TopicTitle" value="Claims Request" />
<input type="hidden" name="f" value="/index.php?showforum=51" />

  <!-- That is all! -->

  <input type="hidden" name="add_sent" value="yes" />
  <input type="hidden" name="add_tracking" value="1" />

  <label><strong>Name:</strong> <input type="text" id="name" value="" placeholder="Your name" /></label>
  <label><strong>Character's Name:</strong> <input type="text" id="c_name" value="" placeholder="Character's full name" /></label>
  <label><strong>Codename:</strong> <input type="text" id="position" value=""  placeholder="Character's codename (if none, put na)"/></label>
  <label><strong>Face Claim:</strong> <input type="text" id="length" value="" placeholder="First last name of play-by"/></label>
  <label><strong>Member Group:</strong>
          <select id="time">
                  <option>X-Men</option>
                  <option>Juniors</option>
                  <option>Residents</option>
                  <option>Acolytes</option>
                  <option>Unaffiliated</option>
                  <option>X-Factor</option>
          </select>
  </label>
  <label><strong>First character?</strong> <input type="text" id="bring" value="" placeholder="Yes or no"/></label>
  <label><strong>Notes:</strong> <textarea id="sample" placeholder="Anything else you want us to know, put here. Otherwise, please delete the contents of this field."> </textarea></label>

  <input type="hidden" id="final" name="Post" value="" />
  <input type="submit" value="Submit Claims Request" tabindex="4" accesskey="s" class="forminput" name="submit" />
  </form>
PM
#
Haven't had time to investigate more thoroughly, but change the following

CODE
<input type="hidden" name="f" value="/index.php?showforum=51" />


To

CODE
<input type="hidden" name="f" value="51" />


You only need the ID of the forum, not the URL.
PM
#
    I changed it, but the instructions said you needed the whole string I had before in order to appropriately target the correct forum. I thought perhaps it was because the forum doesn't have new topic permissions for some groups, but I have an administrator group (root admin, to be exact), so that shouldn't be the issue.
PM
#
So this is to create a new topic in the forum?

edit:

sorry, dumb question. I was just curious, looking at the POST parameters between the form's submit and a new topic submit:

CODE
act=Post&
CODE=00&
MODE=01&
OID=&
auth_key=7eca4a021aaf9aa32acc603e4d008a1f&
TopicTitle=Claims+Request&
f=53&
add_sent=yes&
add_tracking=1&
Post=&
submit=Submit+Claims+Request


Versus a regular new topic:
CODE
st=0&
act=Post&
s=&
f=53&
auth_key=7eca4a021aaf9aa32acc603e4d008a1f&
CODE=01&
TopicTitle=TITLE&
TopicDesc=DESC&
bbmode=normal&
ffont=0&
fsize=0&
fcolor=0&
talign=&
tagcount=0&
helpbox=Insert+Bold+Text&
Post=BODY&
enableemo=yes&
enablesig=yes&
iconid=0&
mod_options=nowt


This post has been edited by Dusty: May 17 2017, 12:45 PM
PM
#
QUOTE (multiplicity! @ May 17 2017, 10:53 AM)
    I changed it, but the instructions said you needed the whole string I had before in order to appropriately target the correct forum. I thought perhaps it was because the forum doesn't have new topic permissions for some groups, but I have an administrator group (root admin, to be exact), so that shouldn't be the issue.


Ah well, that's just not true. I'm looking at where I have a working version, and it just needs to be the forum ID.

Also change

CODE
<input type="hidden" name="CODE" value="01" />


to

CODE
<input type="hidden" name="CODE" value="00" />


and it should work. Copy and pasted it to my test board, and it's working fine after those two fixes.

This will create a new thread for each submission.

Alternatively, to have a form submission instead post a reply to a pre-created thread, change CODE to have value "03" and add

CODE
<input type="hidden" name="t" value="42">


where "42" is the topic ID you want to reply to.
PM
#
    I went back, reinstalled it, and filled out the information again. Changed the values and it still does not work? I'm not sure what's going wrong there, but the version they give is for PM and it says easy conversion to thread creation. It's not so easy, turns out.

    Dusty, I'm not sure what you mean by the information you gave? Is it something I need to replace?
PM
#
CODE
<style>
 label { display:block; margin:0 0 5px; vertical-align:baseline; }
 label strong { display:inline-block; width:350px; }
 label input, label select, label textarea { width:298px; padding:3px; border:1px solid #989898; }
 label textarea { height:200px; vertical-align:baseline; }
 </style>
 <script>
 $(document).ready( function() {
         $("#app_form").submit( function() {
                 $("#final").val("[b]Name:[/b] [u]" + $("#name").val() + "[/u]\n" +
                                 "[b]Character Name:[/b] [u]" + $("#c_name").val() + "[/u]\n" +
                                 "[b]Codename:[/b] [u]" + $("#position").val() + "[/u]\n" +
                                 "[b]Face Claim[/b] [u]" + $("#length").val() + "[/u]\n" +
                                 "[b]Member Group[/b] [u]" + $("#time :selected").text() + "[/u]\n" +
                                 "[b]First character?[/b] [u]" + $("#bring").val() + "[/u]\n" +
                                 "[b]Notes[/b] [u]" + $("#sample").val() + "[/u]");

                 $.ajax({
                         type: "POST",
                         url: "index.php?",
                         data: $("#app_form").serialize(),
                         success: function(data) {
                                 alert("Your claims request has been submitted to the staff for review and adding to the claims lists!");
                         }
                 });
                 return false;
         });
 });
 </script>
 <form id="app_form" action="index.php?" method="post" name="REPLIER">

 <input type="hidden" name="act" value="Post" />
 <input type="hidden" name="CODE" value="01" />
 <input type="hidden" name="OID"  value="" />
 <input type="hidden" name="auth_key" value="<!-- |auth_key| -->" />

 <!-- Attention: please change these values.
 USERNAME should reflect the recipient of the application.
 MESSAGE TITLE should reflect the title of the application message.
 -->

<input type="hidden" name="TopicTitle" value="Claims Request" />
<input type="hidden" name="f" value="51" />

 <!-- That is all! -->

 <input type="hidden" name="add_sent" value="yes" />
 <input type="hidden" name="add_tracking" value="1" />

 <label><strong>Name:</strong> <input type="text" id="name" value="" placeholder="Your name" /></label>
 <label><strong>Character's Name:</strong> <input type="text" id="c_name" value="" placeholder="Character's full name" /></label>
 <label><strong>Codename:</strong> <input type="text" id="position" value=""  placeholder="Character's codename (if none, put na)"/></label>
 <label><strong>Face Claim:</strong> <input type="text" id="length" value="" placeholder="First last name of play-by"/></label>
 <label><strong>Member Group:</strong>
         <select id="time">
                 <option>X-Men</option>
                 <option>Juniors</option>
                 <option>Residents</option>
                 <option>Acolytes</option>
                 <option>Unaffiliated</option>
                 <option>X-Factor</option>
         </select>
 </label>
 <label><strong>First character?</strong> <input type="text" id="bring" value="" placeholder="Yes or no"/></label>
 <label><strong>Notes:</strong> <textarea id="sample" placeholder="Anything else you want us to know, put here. Otherwise, please delete the contents of this field."> <<</textarea></label>

 <input type="hidden" id="final" name="Post" value="" />
 <input type="submit" value="Submit Claims Request" tabindex="4" accesskey="s" class="forminput" name="submit" />
 </form>


This code is working for me. It will create a new thread for each submission. Find
CODE
<input type="hidden" name="f" value="51" />

and ensure 51 is the ID of the forum you want threads to be posted in.

The only changes I made above are the ones I described before, changing CODE to value="01" and changing f to just the ID.

If this doesn't work for you, there are larger issues at play, and this code is not the problem.

This post has been edited by klin: May 18 2017, 07:24 AM
PM
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

OptionsPages: (2) 1 2  Add ReplyNew TopicNew Poll