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;
:((
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.
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 ?
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?
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 🙁
i have this problem:
http://wordpress.org/support/topic/66780?replies=7
but in the admin-functions.php
Probably the best and easiest image setup is ImageManager from http://www.soderlind.no/ – most likely much easier than trying to write your own…. in other words, why reinvent the wheel?
yes, but i must build a different thing….but why it doesn’t work ?? 🙁
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"];
}
}
}
But is possible that it doesn’t work because register_globals is off ?
i’ve find the problem, check_admin_referer(‘add-post’) lost the variable information in $_FILES :
check_admin_referer(‘add-post’);