Add new input to file field

More
10 years 8 months ago #49943 by tevez15
Hello, I create a new field using a file field, because I want add a news input "name". It´s possible?
Attachments:

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #49944 by ggppdk
Replied by ggppdk on topic Add new input to file field
Hello

an example of such a field is the 'extratable' field that i suggested in a different thread


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #49964 by micker
Replied by micker on topic Add new input to file field
yes the code is inside ! ;)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #49968 by tevez15
Replied by tevez15 on topic Add new input to file field
Hi

Yes, I forgot this plugin.

I tried this, and for me, I need change this, simple things, but I have a question:
Is possible add a File size like the file field have? And the feature of search (flexicontent search page) by file?

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #49971 by ggppdk
Replied by ggppdk on topic Add new input to file field
Hello

about file size open file.php and search for the code that calculates file size and use same code inside the other field

code will look something like:
Code:
// Check if it exists and get file size $basePath = $file_data->secure ? COM_FLEXICONTENT_FILEPATH : COM_FLEXICONTENT_MEDIAPATH; $abspath = str_replace(DS, '/', JPath::clean($basePath.DS.$file_data->filename)); if ($display_size) { $path_exists = file_exists($abspath); $file_data->size = $path_exists ? filesize($abspath) : 0; }

make changes as needed


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 8 months ago #49983 by tevez15
Replied by tevez15 on topic Add new input to file field
I add that code and works right now, I will make other changes and send to you the files. Thank you :)

PS: new file .zip of extratable, with some new option for file download.



PS2: I just need one more thing, but alone I dont think so :P to add this field to adv search index, to use like "search file"??
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.352 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save