<h2>bot | image upload</h2>

<p>This plugin allows to insert, upload, sort, show and edit  images within the &#8216;write&#8217; tab.</p>
<h3>Features:</h3>
<ul>
  <li>Multiple fields (&quot;article image&quot; or  any other custom field) can be set for the plugin to operate.</li>
  <li>A field can be set to accept single or multiple  images</li>
  <li>Image thumbnails associated with an article are shown in the 'write' tab  </li>
  <li>drag'n'drop support for easy images sorting in the 'write' tab'</li>
</ul>
<h3>How it works </h3>
<p>Multiple fields can be set. For example you may want to set the &quot;article image&quot; field to accept only one image,  custom field 2 to accept a list of them for a gallery,  custom field 3 for another gallery  and so on </p>
<p> The plugin does not alter texpattern natural behavieur, it just   operates at a  visual level hiding the  field and replacing it with an interface. Under the skin, images are still stored normally as  comma separated values.</p>
<p> If you are associating a lot of images with an article I suggest to use my other plugin "<a href="http://forum.textpattern.com/viewtopic.php?id=32175">bot_wtc</a>"  to move the field in the central colum for a nicier look</p>
<h3>Installation</h3>
<p>Just install the plugin the normal way. If you want to sort images (optional) you must upload the jquery ui script which comes with the plugin. Default location is in 'textpattern' directory. If you choose another you must change the path in the plugins preferences (bot_iu_ui_path).</p>
<h3>Other plugins compatibility </h3>
<p> If you are using another plugin which already loads <strong>the entire </strong>jQuery ui script (such as msd_admin_datepicker) you don't want to load it again causing issues so you must set bot_iu_ui_path to ''. Mind that the other plugin must load <strong>the complete </strong>ui script (including sortables), if it is another custom ui which does not include sortables you still have to use the script provided with the download and set bot_iu_ui_path accordingly. </p>
<h3>Configuration - customization</h3>

<p>If you want to change some default settings configure the plugin directly in the plugins code. Go to plugins &gt; edit and  search for &#8216;Global preferences - Configuration&#8217; in the first lines. <br />
You'll see something like this:
</p>
		<p><code>'bot_iu_fields' =&gt; '#article-image // fields to be used<br />
  'bot_iu_mono_list' =&gt; '', // filelds with single image<br />
  'bot_choose_image_text' =&gt; gTxt('Choose image'), // text for &quot;Choose images&quot; link and button<br />
  'bot_image_delete_text' =&gt; gTxt('Delete image'), // text and title for &quot;delete image&quot; button<br />
  'bot_image_edit_text' =&gt; gTxt('Edit image'), // text and title for &quot;edit image&quot; button&quot;<br />
  'bot_add_image_text' =&gt; gTxt('Add'), // text for &quot;add image&quot; checkbox<br />
  'bot_iu_save_text' =&gt; gTxt('save'), // text for &quot;Save&quot; button&quot;<br />
  'bot_iu_cancel_text' =&gt; gTxt('cancel'), // text for &quot;Cancel&quot; button&quot;<br />
'bot_iu_row_bg' =&gt; '#eaeaea', // selected row background<br />
		'bot_iu_ui_path' =&gt; 'jquery-ui-1.8.9.custom.min.js', // path to the jQuery ui script. Defaults to the 'textpattern' directory</code></p>
		<p>To configure change the part that comes after the &quot;=&gt;&quot; and its enclosed in single quotes. Read comments for help.</p>
		<p>The most important configuration options are the first two: </p>
		<ol>
		  <li>&quot;bot_iu_fields&quot; determines  the fields which will be used (can be &quot;article image&quot; or  any other custom field)</li>
		  <li>'bot_iu_mono_list' sets the fields which will accept only a single image</li>
</ol>
		<p>Each of them takes a comma separated list of values which <strong>must be</strong> in this form:</p>
		<p><code>#article-image </code>for article image and <br />
	    <code>#custom-n for custom fields where n is the custom field id </code> </p>
		<p>For an example I could configure them this way:</p>
		<p><code>'bot_iu_fields' =&gt; '#article-image, #custom-3, #custom-2' // fields to be used<br />
  'bot_iu_mono_list' =&gt; '#article-image, #custom-3,', // filelds with single image </code></p>
<p>This plugin can be quite easily adapted to your needs, from text to aspect. If you want to modify its look edit the css in the function 'bot_image_css'. For more complex mods you will save some time if you have a look at the underlying html structure first.</p><p>Keep in mind that the iframe content style cannot be addressed throught this css: you'll have to add or change some js lines.</p>