Author Topic: Multi upload for 1 ID  (Read 22242 times)

0 Members and 1 Guest are viewing this topic.

Offline eslack

  • Newbie
  • *
  • Posts: 12
    • View Profile
Multi upload for 1 ID
« on: September 14, 2007, 05:56:16 AM »
how can i do this?:

i want the users be able to upload multiple files so then show that files on details.php

thnx!
« Last Edit: September 16, 2007, 11:37:46 PM by eslack »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #1 on: September 14, 2007, 12:52:08 PM »
1 - Please read this:

http://www.4homepages.de/forum/index.php?topic=8802.0

Quote
i want the users be able to upload multiple files so then show that files on details.php

2 - http://www.4homepages.de/forum/index.php?topic=8517.0 for multiupload MOD request.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Multi upload for 1 ID
« Reply #2 on: September 14, 2007, 02:03:12 PM »
@thunderstrike

that's wrong mod for request.

he want to add more pics for 1 IMAGE_ID

with "multiupload MOD" you will get 10 pics with 10 image_id's

@eslack,
i think not there is rightnow mod for that what you want. BUT maybe thunderstrike will have time to make one :)
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #3 on: September 14, 2007, 10:16:09 PM »
Quote
he want to add more pics for 1 IMAGE_ID

I do with one of MOD. No point really ... more SQL ressource use for use many IDs of row ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Multi upload for 1 ID
« Reply #4 on: September 14, 2007, 11:41:21 PM »
thunder,
no idea what you talking about. try to write a little bit clearer.

table images:

row1 : image_id, cat_id, image_name, image_media_file_1, image_media_file_2, image_media_file_3, image_thumb_file_1, image_thumb_file_2, image_thumb_file_3 and so on..
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #5 on: September 14, 2007, 11:47:16 PM »
Quote
no idea what you talking about. try to write a little bit clearer.

I write clearer and clear I can write !

Quote
image_id

1 same image ID with 10 rows ? Think of 1000 images like that ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Multi upload for 1 ID
« Reply #6 on: September 14, 2007, 11:56:30 PM »
on a good server that should not be a problem..
maybe he have one..

Quote
Our database contains: 2437 models in 22 categories.

site working fine for me
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Multi upload for 1 ID
« Reply #7 on: September 15, 2007, 12:42:55 AM »
... without any copyright ... :!:
... and no 4images Copyright-Removal-Licence ... :!:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline eslack

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multi upload for 1 ID
« Reply #8 on: September 15, 2007, 02:45:02 AM »
thanks,i already saw that mod, thunderstrike, but it is not what I am looking for..

i can add more images and raise them to the data folder

but i have no idea how to display that in details.php

maybe creating folders for each user?

how can i do that?

i ve tried to edit

define('MEDIA_DIR', '../data/media/');

to

define('MEDIA_DIR', '../data/media/$user_id');

but it doesnt work...


thank you!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #9 on: September 15, 2007, 05:17:16 AM »
What exacly you try do ? ... Look like some peace miss ... you say $user_id ... so something no say here ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eslack

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multi upload for 1 ID
« Reply #10 on: September 15, 2007, 09:16:36 PM »
when a member uploads a new image a want the script to create a folder with that member id, and put the images there..

i tryed to change includes/constants.php with define('MEDIA_DIR', '../data/media/$user_id');

but i have no luck..

how can i do that?

for exmple, user eslack has ID 5, then, when he wants to upload a new image, i want the script to make a new folder with his user_id

something like /data/media/5/new_image.jpg


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #11 on: September 15, 2007, 09:28:48 PM »
Hum ... quick but if:

Quote
define('MEDIA_DIR', '../data/media/$user_id');

for:

Code: [Select]
define('MEDIA_DIR', 'data/media/' . $user_info['user_id']);

but if do so, you need edit ALL PHP files use MEDIA_DIR ... I say use new define:

Code: [Select]
define('MEDIA_USER_DIR', 'data/media/' . $user_info['user_id']);

;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eslack

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multi upload for 1 ID
« Reply #12 on: September 15, 2007, 09:50:24 PM »
mm, thath doesnt work, i tryed to put that in
constants.php with no luck
and in
upload.php

changing

Code: [Select]
$this->upload_path['media'] = MEDIA_PATH."/".$cat_id;
to

Code: [Select]
$this->upload_path['media'] = MEDIA_PATH."/". $user_info['user_id'];
with no better luck  :(

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multi upload for 1 ID
« Reply #13 on: September 15, 2007, 10:07:26 PM »
You no say $this, you say define. You change foreach post !!!
$user_info need global in class for work. If no global, $user_info is no see by 4images.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline eslack

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multi upload for 1 ID
« Reply #14 on: September 15, 2007, 10:22:11 PM »
thunderstrike, constants.php and upload.php are different files, you know...

i tryed in both...

constants.php is define('MEDIA_DIR', './data/media/');

i change that with no luck and changed that back to define('MEDIA_DIR', '../data/media/');

then i edit upload.php

with no luck too...


i only want to do what i say...