Skip to:
Content
Pages
Categories
Search
Top
Bottom

post_form’s _wponce, what is it?

  • @mistainu

    Member

    (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">

    <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>backticks</code>

    .

    </p>

    <strong><input type="hidden" value="XXXXXX" name="_wpnonce"/></strong>

    <input type="hidden" value="/forums/" name="_wp_http_referer"/>

    </form>

Viewing 5 replies - 1 through 5 (of 5 total)
  • @so1o

    Participant

    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.

    @mistainu

    Member

    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?

    @so1o

    Participant

    _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.

    @ardentfrost

    Member

    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

    @mistainu

    Member

    ok, so help me:

    i want to make a posting form, all fields except the topic-title are hidden, that posts to forum id #2, only tag is ‘aside’, and the posted also becomes the post content.

    can this be done?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar