Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Styling Multiple File Inputs
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Styling Multiple File Inputs
I did try that - but the file information is still not showing.

In the custom thread fields when we input a file then there is a list of the formats we can access and it says:

Quote:For file inputs accepting multiple values, the above only exists in an array as {$GLOBALS['threadfields_x']['key']['items'][index]['item']}, where index is 0 for the 1st attachment, 1 for the 2nd etc. The value can also be accessed through {$GLOBALS['threadfields_x']['key']['value'][index]}. For {$GLOBALS['threadfields']['key']['item']}, item can be one of the following:

num_files - number of files uploaded
num_files_friendly - as above, but number is formatted (eg 1,234 vs 1234)
total_downloads - sum of download counts
total_downloads_friendly - as above, but number is formatted (eg 1,234 vs 1234)
total_filesize - sum of file sizes, in bytes
total_filesize_friendly - as above, but formatted (eg 1.5MB vs 1572864)
upload_time - time when latest file was uploaded
upload_date - date when latest file was uploaded
value - if no file is uploaded, will be Blank Value (see below), otherwise, will be Display Item Format, joined together with Multiple Value Delimiter, then formatted by Display Format

So the characteristics I am trying to access are not available for multiple uploads without an index.

Just to test, I replaced the word index with a number - and of course that sent out the same data for each file (as I expected) - but it did return a value for the filename etc. What I cannot figure out is how to access that index number dynamically.


Attached File(s) Thumbnail(s)
   


[Image: leelink.gif]
MYBB1.6 & XThreads
05-19-2014 12:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Styling Multiple File Inputs - leefish - 05-17-2014, 11:35 PM
RE: Styling Multiple File Inputs - leefish - 05-19-2014 12:46 AM
RE: Styling Multiple File Inputs - leefish - 05-19-2014, 10:12 AM
RE: Styling Multiple File Inputs - leefish - 05-19-2014, 07:32 PM
RE: Styling Multiple File Inputs - leefish - 05-22-2014, 10:00 PM

 Standard Tools
Forum Jump: