• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Additional "Category" Box

vampir26

Chevereto Noob
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