TDO Mini Forms News and here is the RSS Feed.
You can use the TDOMF Support Forum or you can post on Wordpress.org's Support Form.
You can use the button in the options menu to create a page automatically.
Or instead you can add:
[tdomf_form1]
to any post or page. The plugin will replace this with your Form 1. If you have multiple forms, each form has an ID. Just replace the '1' with the correct form ID.
You can add it to your template directly using this template tag:
<?php tdomf_the_form(1); ?>
There are options to automatically modify the the_author tag with submitter information if available and also to append submitter information to the end of the post. If thats not good enough for you, you can use the template tag:
<?php tdomf_the_submitter(); ?>
(Replace '1' with the ID of the form you are interested in)
<?php if(tdomf_can_current_user_see_form(1)) { ?> Link to form <?php } ?>
<?php echo tdomf_get_the_form(1); ?>
<?php tdomf_the_form(1); ?>
These tags must be used within the loop:
<?php echo tdomf_get_the_submitter(); ?>
<?php tdomf_the_submitter(); ?>
<?php tdomf_the_submitter_email(); ?>
The tdomfgetthesubmitteremail template tag can be used to get the gravatar icon for a submitter.
With v0.9, you can! There is now a Custom Field widget avaliable to add to your form. Currenly only text fields and text areas are supported but future versions will support check boxes, drop down lists, radio groups, etc.
With v0.8, you can allow users to upload files. You can specify what files can be uploaded and how big. You can also optionally have the upload files automatically added to the post as an image, link or a Wordpress attachment.
To add the option to upload files, as admin, go into the TDOMF menu and then the widgets menu. On that page you can drap and drop widgets. Just drag and drop the "Upload Files" widget.
The best way to do this is to use Wordpress roles. Create a role using the Role Manager Plugin. This plugin has nothing to do with me. Make sure it is not the default role and that it can't edit_other_posts or publish_posts. Then you can use the TDOMF options page to set that as the only role that can access the form.
If you don't want people to have to register, you might try looking at this plugin: Wordpress OpenID Plugin. This plugin has nothing to do with me. This plugin allows people to use an OpenID identity to login to your Wordpress site. If the user has an account on Wordpress.com, LiveJournal, Yahoo and numerous other sites, they can log in using that account and once they have logged in, you can assign them to the right role.
Another suggestion, but much less secure and not recommended, is to have the page where you have the form, password protected and only send the page link and password to the people you want to access the form.
You can disable moderation in the options menu for a specific form and all posts will be published. However such posts get passed through Wordpress' kses filters automatically to remove nasty scripts.
Enable moderation and it'll work. If you disable moderation, posts get passed through kses to remove nasty scripts before being published. This removes YouTube code. If you have to approve posts, you can make sure no-one has snuck in something tricky.
Alternativily you can use a custom field. Add the Custom Field widget to your form, set it as a URL and ask your submitters to add the URL of the YouTube video they want to include. Then in your theme, you can use the Custom Fields template tags to automatically display the YouTube video underneath the submitted post. Or you can use another plugin that gives you tags to support YouTube and have the Custom Field append the YouTube link with the tags to your post.
I have spent some time exploring the use of TinyMCE (and to a lesser degree FckEditor) for TDO Mini Forms. Both libraries provide a WYSIWYG or "Rich Text" editors in place of your bog-standard text area. Wordpress' write screen using a heavily modified version of TinyMCE. I haven't settled on the right method to do this yet. However you can easily integrate TinyMCE without modifying any of TDO Mini Forms. Grab the latest copy and installed it somewhere on your website and then follow the directions on how to replace a text area with TinyMCE. This can be used to even change your comment input field.
Right now there is no user interface for adding your own tags to quicktags. Feel free, however, to modify tdomf-quicktags.js.php to add any tags you want.
In later versions, proper template tag support will be added. However, for the moment you can use:
// Gets the name of the first uploaded file for post $post_ID
get_post_meta($post_ID, "_tdomf_download_name_0");
// Gets the type of the first uploaded file for post $post_ID
get_post_meta($post_ID, "_tdomf_download_type_0");
// Gets the download count of the first uploaded file for post $post_ID
get_post_meta($post_ID, "_tdomf_download_count_0");
// Gets the path to the first uploaded file for post $post_ID
get_post_meta($post_ID, "_tdomf_download_path_0");
// Gets the command output for the first uploaded file for post $post_ID (if avaliable)
get_post_meta($post_ID, "_tdomf_download_cmd_output_0");
// Gets the name of the second uploaded file for post $post_ID
get_post_meta($post_ID, "_tdomf_download_name_1");
// And so on...
Styling and formatting of posts is really outside the scope of this plugin. Some nominal features in TDO Mini Forms allow you to append content to the Post's content area but this has limited application. Wordpress core gives more than enough options to do this.
Custom Fields, Title, Categories, Tags, etc. can be displayed in myriad ways using Template Tags, without having to modify your post content using TDO Mini Forms.
You can style TDO Mini Forms differently to normally posts in your Theme (within the loop):
<?php if(defined('TDOMF_KEY_FLAG') && get_post_meta($id,TDOMF_KEY_FLAG,true) != false) { ?>
<p>This post was submitted by TDO Mini Forms, so use a TDO Mini Forms format, etc.</p>
<?php } else { ?>
<p>Default Post Formatting</p>
<?php } ?>
TDO Mini Forms uses the wp_head action in your theme to add a link to the stylesheet. Check for the existance of a line like this in your header.php:
do_action('wp_head');
You can also manually add like this:
<link rel="stylesheet" href="<?php echo get_bloginfo('url'); ?>/wp-content/plugins/tdo-mini-forms/tdomf-style-form.css" type="text/css" media="screen" />
If you have the options for attachments and thumbnail generation turned on for Upload Files and you try to upload a *.bmp (bitmap) image, you'll get an error like this:
Warning: imageantialias(): supplied argument is not a valid Image resource...
Wordpress does not support bitmaps for thumbnails so you cannot use bitmaps for thumbnail generation.
First step, make sure you can upload with the normal Wordpress admin UI. If you can't then your not going to be able to upload with TDOMF until that is sorted.
If you do and you get an error with something like this
Warning: mkdir() [function.mkdir]: open_basedir restriction in effect
or
Warning: mkdir(): [function.mkdir]: SAFE MODE Restriction in effect
Then you host has restricted where you can create and upload files. Safe mode is particularly bad because it'll fail in unexpected ways. Ultimately the best solution is not to use safe mode or open_basedir but you may not have the option to do that.
The best solution is to use a folder to store uploads that does not break safe mode. If you can upload with the normal wordpress interface then you can use something like /wp-content/uploads. Remember also that you cannot use symbolic links in your path to get around open_basedir restrictions.
You can enable extra log messages from the options screen to see more detailed messages about file uploading. You can also check your "phpinfo()" from the main TDOMF page.
This is outside the scope of TDOMF as TDOMF only enables people to submit posts. However you can use a plugin like Advanced Category Excluder Plugin. This plugin has nothing to do with me. You could have posts submitted to a specific category that is excluded from your main blog.
Installing TDOMF plugin on WordPress MU
I've used code in TDOMF that I've found in the wild so some credit is due to these authors for making their source code avaliable for re-use.
PHP Function to create a random string based on (http://www.tutorialized.com/view/tutorial/PHP-Random-String-Generator/13903)
PHP Function to validate an email address based on (http://www.ilovejackdaniels.com/php/email-address-validation/ )
PHP Function to turn a file size in bytes to an intelligable format based on (http://www.phpriot.com/d/code/strings/filesize-format/index.html)
Quicktags Javascript script taken from (http://www.alexking.org/)
Freecap (PHP Image capatcha) taken from (http://puremango.co.uk/)
Customfield Select Box javascript based on (http://www.mredkj.com/tutorials/tutorial006.html)
PHP Function to display a human readable time interval based on a function I found here (http://ie2.php.net/time)
Checkbox support in the Categories Widget initially added by Sillybean




