• Hi

    Afraid I’m having big problems with this.

    1. Can’t get ‘Author’ to save to database. I need to enable users to upload items that may be authored by themselves or another person, or multiple authors. Currently the only data in the db relating to an upload is the user ID of the person logged in when the file was uploaded.

    2. I also need to add (and store in the db) some other custom fields. I can get a custom field to display in the form, but what do I need to do to get it into the db

    3. I can’t seem to change the title. Shortcode is [fu-upload-form post_id=”2″ title=”Submit your paper”] but the form still displays the default “Submit a media file”.

    Help!

    http://wordpress.org/plugins/frontend-uploader/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m having the same problem with the title attribute.

    Thread Starter doverlord

    (@doverlord)

    Couldn’t get item 1 to work: this ‘author’ field seems redundant!

    Got item 2 working eventually, and am using this to write my own author data:

    [fu-upload-form post_id="2" title="Submit your paper"]
    [input type="file" name="photo" id="ug_photo" class="required" description="Your File" multiple=""]
    [input type="text" name="author_name" id="author_name" description="Name of Author"]
    [...other fields added here...]
    [input type="submit" class="btn" value="Submit"]
    [/fu-upload-form]

    (had to check ‘Suppress default fields’ in Settings and add my own, eg submit )

    Then, in Theme Functions (functions.php):

    function my_fu_after_upload( $attachment_ids ) {
    		foreach( $attachment_ids as $att_id ) {
    			$title = $_POST['title'];
    			wp_update_post( array( 'ID' => $att_id, 'post_title' => $title ) );
    
    			$content = $_POST['post_content'];
    			wp_update_post( array( 'ID' => $att_id, 'post_content' => $content ) );
    
    			$excerpt = 'Author: ' . $_POST['author_name'] ;
    			wp_update_post( array( 'ID' => $att_id, 'post_excerpt' => $excerpt ) );
    		}
    	}
    	add_action( 'fu_after_upload', 'my_fu_after_upload' );

    (I’m saving everything to the default fields in wp_post – post_content and post_exerpt)

    Item 3 remains a mystery.

    Hi,

    I would like the user to be able to submit a post where there is a textarea which will be submitted as post_content. But some textareas are optional. is that possible?

    Please reply me asap. Thanks.

    Cheers.
    J

    Hi,

    Does anybody knows what does <class=”your-class”> mean?

    Daniel Ruyter

    (@dbruyteryahoocom)

    jlow82 “your-class” is just a place-holder for a css class that’s in your existing site. For example, if you want the field labels to use a class already found on your site, then it may look like this:

    class=”welcome-message” if .welcome-message exists in your site’s css file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Customisation not working’ is closed to new replies.