Info
- 6 posts
- 3 voices
- Started 5 years ago by Mistainu
- Latest reply from Mistainu
- This topic is not a support question
post_form's _wponce, what is it?
-
- Posted 5 years ago #
(scroll down to find bold part of code, please explain what is that?)
<form id="postform" class="postform" action="/forums/bb-post.php" method="post" name="postform">backticks
<p>
<label for="topic">
Topic title: (be brief and descriptive)
<input id="topic" type="text" tabindex="1" maxlength="80" size="50" name="topic"/>
</label>
</p>
<p>
<label for="post_content">
Post:
<textarea id="post_content" tabindex="3" rows="8" cols="50" name="post_content"/>
</label>
</p>
<p>
<label for="tags">
Enter a few words (called
<a href="/forums/tags.php">tags</a>
) separated by spaces to help someone find your topic:
<input type="text" tabindex="4" value=" " maxlength="100" size="50" name="tags"/>
</label>
</p>
<p>
<label for="forum_id">
Pick a section:
<select id="forum_id" tabindex="5" name="forum_id">
</select>
</label>
</p>
<p class="submit">
<input id="postformsub" type="submit" tabindex="4" value="Send Post ยป" name="Submit"/>
</p>
<p>
Allowed markup:
<code>a em strong code ul ol li blockquote</code>
.
<br/>
Put code in between
<code></code>
.
</p>
<strong><input type="hidden" value="XXXXXX" name="_wpnonce"/></strong>
<input type="hidden" value="/forums/" name="_wp_http_referer"/>
</form> -
- Posted 5 years ago #
The _wpnonce is used to determine if there needs to be a confirmation page for the post.. if you remove it you will see one (or atleast you should).
if you see the delete functionalities closely you will see what i mean.
-
- Posted 5 years ago #
but the value="XXXXX" changes every login, what is this value? i want to create a sort of "non-forum-specific" topic submission form (reasons why is too long), but basicly i wnat to substitute the value so it works everytime... how?
-
- Posted 5 years ago #
_wpnonce doesnt have anything to do with the functionality.
you dont need to set the value of the variable. just call
bb_nonce_field($x);
and when you are processing the $_POST call
bb_check_admin_referer( $x);you can put $x as 'create-topic' or 'create-no-forum-specific-topic' or anything else you want.. it will take care of itself
i think the _wpnonce is a security mechanism that checks for the posting source.
-
- Posted 5 years ago #
S010 - i think the _wpnonce is a security mechanism that checks for the posting source.
That's what I was thinking the other day when looking for an answer to this question, but it wasn't fully clear to me, so I didn't bother responding :D
-
You must log in to post.