• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

Additional "Category" Box

vampir26

Chevereto Member
Hello
Sorry my english is not very good.
I have added an additional category box to the main upload form:
Code:
<select name="category">
   <option value="0">--select image type--</option>
   <option value="1">Non-Nude</option>
   <option value="2">Nude/Erotic</option>
   <option value="3">P***ographic</option>
</select>

And now, I wish to receive the value of the selectbox in the upload.php file:
Code:
...
$to_resize = $_POST['resize'];
$category = $_POST['category'];  < - - - H E R E
require_once('includes/uploader.php');
...

But it's not possible. I had tested a lot of different things, without success.
Can you please help me?
I do not understand the script architecture completely.
How/Where can I get this value?

Thank you!
 
You have to trigger that using javascript. Look in content/system/js/peafowl.php for this:
Code:
$.post("<?php echo __CHV_RELATIVE_ROOT__; ?>upload.php", { url: $(url_input).val(), resize: $(resize_input).val()},
You have to add the fiels in field: fieldvalue format. This works for the remote upload.

To do the same thing but in the local upload (uploadify) you have to use "scriptData", look this: http://stackoverflow.com/questions/...additional-post-data-to-server-with-uploadify

Hope it helps...
 
Thank you for this help.
I have replaced the line with these:
Code:
$.post("<?php echo __CHV_RELATIVE_ROOT__; ?>upload.php", { url: $(url_input).val(), resize: $(resize_input).val(), category: document.getElementById('category').value}

It works now for the remote upload.

But with the local upload, i'm not sure what I must to do.
I can't find the uploadify.php... 🙁
 
vampir26 said:
Thank you for this help.
I have replaced the line with these:
Code:
$.post("<?php echo __CHV_RELATIVE_ROOT__; ?>upload.php", { url: $(url_input).val(), resize: $(resize_input).val(), category: document.getElementById('category').value}

It works now for the remote upload.

But with the local upload, i'm not sure what I must to do.
I can't find the uploadify.php... 🙁

Did you ever figure it out?

If so, can you share the code :=)
 
Back
Top