• Resolved Marcomail

    (@marcomail)


    I’ve an external form to upload photo, i pass this with the form:

    <input type=”File” name=”upl_file” />

    what i do to call the field in the admin-functions.php ? or i must call it in the post.php ?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Marcomail

    (@marcomail)

    i’ve modified the “case” post in post.php with this code, but it doesn’t show anything :

    switch($action) {
    case ‘post’:
    $img1_name = $_FILES[‘upl_file’][‘name’];
    echo “$imgl_name”;
    exit();
    break;

    :((

    Thread Starter Marcomail

    (@marcomail)

    bump

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Bumping a post doesn’t help when nobody knows what you’re talking about in the first place.

    You really need more than a few lines of text explaining things. We cannot read your mind.

    Thread Starter Marcomail

    (@marcomail)

    i don’t have the variable $img1_name with a value…i don’t know how can i call it in post.php

    sorry but my english is not perfect, i’ve some problem to explain better ??

    do you can build the script for money Otto ?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    No, but I’m more than willing to try to help for free. I’m just trying to figure out what you’re actually doing. ??

    You’ve added an input to upload a file to the post page then? Or what? What are you trying to accomplish, exactly?

    Thread Starter Marcomail

    (@marcomail)

    No no, i use quick post plugin to add quicklt new article, it works externally the dashboard, in the homepage. i’ve created an input to add an image, the form submit the article to post.php…i don’t know how can show the variable of the uploaded file, like the post_content and post_title ??

    Thread Starter Marcomail

    (@marcomail)

    i have this problem:

    https://www.ads-software.com/support/topic/66780?replies=7

    but in the admin-functions.php

    Probably the best and easiest image setup is ImageManager from https://www.soderlind.no/ – most likely much easier than trying to write your own…. in other words, why reinvent the wheel?

    Thread Starter Marcomail

    (@marcomail)

    yes, but i must build a different thing….but why it doesn’t work ?? ??

    Thread Starter Marcomail

    (@marcomail)

    is possible the problem is at the top of post.php page ?

    $wpvarstoreset = array('action', 'safe_mode', 'withcomments', 'posts', 'content', 'edited_post_title', 'comment_error', 'profile', 'trackback_url', 'excerpt', 'showcomments', 'commentstart', 'commentend', 'commentorder' );

    for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    $wpvar = $wpvarstoreset[$i];
    if (!isset($$wpvar)) {
    if (empty($_POST["$wpvar"])) {
    if (empty($_GET["$wpvar"])) {
    $$wpvar = '';
    } else {
    $$wpvar = $_GET["$wpvar"];
    }
    } else {
    $$wpvar = $_POST["$wpvar"];
    }
    }
    }

    Thread Starter Marcomail

    (@marcomail)

    But is possible that it doesn’t work because register_globals is off ?

    Thread Starter Marcomail

    (@marcomail)

    i’ve find the problem, check_admin_referer(‘add-post’) lost the variable information in $_FILES :

    check_admin_referer(‘add-post’);

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘advanced plugins develop’ is closed to new replies.