• Hi Folks,
    I’m building a new site for conwycameraclub.co.uk and have used EntryWizard to successfully implement a simple image upload form.
    The “boss” however wants the facility to have the uploaded images file name syntax to be validated in simmilar fashion to the sizes. Ie, reject image unless syntax corrected.
    There is an image on the page that illustrates the syntax of file names required by the clubs admin.
    Here is the page in question
    So far I’ve managed to implement rejections for file types and sizes but the file name is foxing me a bit.
    Any help gratefully appreciated.
    Cheers,
    Eugene.

    https://www.ads-software.com/plugins/entrywizard/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter gene-stevo

    (@gene-stevo)

    Forgot to say…spreadsheets will be downloaded from admin interface.
    Images (up to 90± at a time) will be downloaded via FTP.
    Not sure if that makes a difference.
    Cheers,
    Eugene.
    Q. Why is always the advanced members that still mess up the files names despite having visual reminders everywhere? ??

    Plugin Author Josie Stauffer

    (@joanne123)

    Unfortunately, there are a couple of things here that are not possible within EntryWizard at the moment.

    First, you can add a custom prefix to a filename, or you can rename the file completely, but you cannot add a suffix as seems to be required.

    Second, it’s not clear if an underscore is considered to be a special character or not. The problem is that most webservers run unix/linux systems, which make it difficult to handle filenames containing spaces or special characters. So EntryWizard always replaces spaces/special characters in filenames with underscores.

    One of the aims of EntryWizard was to do away with the sort of filename requirements you are talking about, since it is so difficult to get people to comply. But if they are really still necessary, I would suggest renaming the images after download, and using a macro to change the filenames in the spreadsheet.

    Plugin Author Josie Stauffer

    (@joanne123)

    A second thought: you seem to be trying to “validate” the filename, whereas the approach taken by EntryWizard is to accept whatever the user has and modify it to suit requirements.

    Check the help item beside “Optional prefix” in the webform.

    Thread Starter gene-stevo

    (@gene-stevo)

    Hi Josie,
    Many thanks for answering my query personally. I’ll report back and explain to the admin team. I agree the idea should be to accept the file name as is, esp as the fact the user is logged in means the picture isn’t “anonymous” (thanks to your spreadsheet).

    about, since it is so difficult to get people to comply.

    Personally I feel that if different people keep making the same mistakes the issue is with the system not the people.
    Thanks for writing this plugin, I think we’ll be using it on a regular basis.
    No more spammed emails or insane file sizes.
    Cheers,
    Eugene.

    So EntryWizard always replaces spaces/special characters in filenames with underscores.

    Hi Josie,

    Is it possible to change that feature? I’ve got a camera club piece of software that separates the entrant name from the title with either an underscore or a semi colon. EntryWizard automatically changing spaces or special characters to an underscore means I have to change all the filenames that are submitted.

    Cheers,

    Peter

    Plugin Author Josie Stauffer

    (@joanne123)

    I’m interested to know what this software does, and how you use it in conjunction with EntryWizard.

    If a lot of clubs are using it and want the feature, it should be possible to add an option to use a dash instead of an underscore. But I do have a fairly long list of desired features already.

    peterthompson80

    (@peterthompson80)

    Hi Josie,

    This is the software: https://www.wilburimaging.com/wisoftware/DiCentra.htm

    Dashes would do the trick as I could easily replace them with spaces.

    Plugin Author Josie Stauffer

    (@joanne123)

    I’ll see if I can make that available for the next version. But no promises as to the time frame, I’m afraid.

    You might also want to look at Flexishow:
    https://sourceforge.net/projects/flexishow/

    Hi,
    I am implementing EntryWizard for the Chilterns Association of Camera Clubs. I looked at the features for either prefixing the users filename or replacing it within EntryWizard. On balance I felt that it is an advantage for the user to have no particular filename format required, in which case a synthetic filename is required. But, the hassle of implementing any arbitrary filename in EntryWizard would be too much work, and there will always be incompatibilities between filenames that WordPress is happy with and filenames for some competitions display/scoring systems.
    My solution is to download the images and spreadsheet, and then use an Excel macro driven system to create the required filename within the spreadsheet and rename all the image files to the new filename format. The folder/filename structure is always going to be some combination of a Category, a Sequence number, the Title, the Author and the Entrant (ie User account), with specific separators.
    I have done this for the ICPro competitions system, and it could easily be modified for DiCentra or any other system.
    There is no need to pile complexity into one system, when the work can be easily split and done separately.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Validation of filename syntax. Is it possible?’ is closed to new replies.