Support » Plugin: Participants Database » [Plugin: Participants Database] images to files

Viewing 15 replies - 1 through 15 (of 15 total)
  • I found this line of code in the participants-database.php

    self::$allowed_extensions = array( ‘jpg’,’jpeg’,’gif’,’png’ );

    Will just changing this line do the trick, or should I dig somewhere else?

    Thanks a lot in advance for this plugin!

    I tried editing that and some other lines, and now I’m getting it to “accept” the entry, but looks like the file is not being saved, but the rest of the info does..

    Plugin Author xnau webdesign



    You will need to change the allowed MIME types in participants-database.php line 1931. Go to to get the correct constants to use.

    Also, make sure that image uploads are working first…that way you know that your basic setup is good.

    Thanks! I had already commented out that filetype check and the form was being sent and the thank you message appeared, yet seemed like no file was attached.

    Image uploads are working fine, I will continue to review.

    I think I will also need to tweak some other files, like the list participants section both in the admin and the public one (which btw I can’t seem to show, with the [pdb_record] in a page and the record form settings pointing to that page..)

    I’ve been searching for something like this that could be used as an input form for product data rather than for people. I’ve looked at cforms II, but your plugin looks good also.

    Do you think it will work for my application?

    Thanks for your reply and for the plugin.

    Plugin Author xnau webdesign



    You know it’s possible, but if you don’t need “public” user input, you may want to look into using custom post types for that. There are several plugins that will help you set up your custom post type.

    Thanks for your answer. I’ll look into custom post plugins.

    I think I got it. I had to edit one more line in participants-database.php, which in the latest update is line 871:

    $return = empty( $value ) ? ” : ‘<p>Download file</p>’;

    Instead of showing an <img> tag with its src atribute pointing to the image uri, I switched it to a link tag with its href pointing to that same image uri.

    Then I did something similar in FormElement.class.php (within the classes folder):

    $this->_addline( ‘<p class=”uploaded-image” id=”image_’.$this->name.'”>value.'”>Download File</p>’ );

    I couldn’t find the right mime types in line 1931 (in the latest update is line 2045)that “check the type of file to make sure it is an image file”, so I just commented it out.

    So I think this kinda solves it, I will continue to make tests and check but just in case, Xnau, is there anything I’m missing?

    I need also help regarding languages, but for that topic I opened a new thread:

    Thanks in advance!

    The forum ate my code, or rather rendered it as html (as expected) but I think it can still be understood from my comments and context, or in case of any doubts I can send over the files or a .txt with the relevant code..

    Plugin Author xnau webdesign



    Yes, looks pretty good, although you’ll find out when you test it if there are other issues…I haven’t tried to do this. Commenting out the MIME type test was necessary, so that was good.

    For me, I would say, you’ve made it so you can’t also upload images–but maybe you don’t ever need to do that.

    Well then I will set this topic to “resolved”.

    For this particular project I don’t need images, but perhaps in future versions of the plugin there will be an option to select whether you want images or files 😛


    please share the code what you put in the line 871 and the FormElemet.class

    $this->_addline( ‘<p class=”uploaded-image” id=”image_’.$this->name.'”>value.'”>Download File</p>’ );

    deamveawer says this syntax is wrong and I cannot click the Download File as a link!

    please advise

    Hi Kamu_lhr,

    I don’t know if the code will be pasted correctly as it may be parsed by the forum:

    $this->_addline( '<p class="uploaded-image" id="image_'.$this->name.'"><a href="'.$this->value.'">Download File</a></p>' );

    I don’t know if dreamweaver is always right about the syntax, but if you continue to experience errores send me your email and I’ll send you the line of code in a text file.

    Hope it works!

    I know what’s missing! In my first post, the one where you got the code in the first place, I didn’t use the “code” tag, so the forum turned the anchor tag into an actual link for display in this page. But I think it’s right now!

    Also worth noting! I “stayed” in the 1.3.5 version, and current latest is 1.3.7, so the lines might have changed (the line number at least), so check the changelog, or just modify the right ones on the newer version (or if you do like me: avoid updating, which of course is not advisable).

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: Participants Database] images to files’ is closed to new replies.