Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#151 2012-10-15 08:10:02
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
SuMu wrote:
…No matter what I do, I can only view 1 photo
Hi,
I need more infos, can you post here:
- the exact code you are using now to show the image(s)?
- the contents of the two configuration lines starting with ‘bot_iu_fields’ and ‘bot_iu_mono_list’?
- the html output in your public site for the second image
Offline
#152 2012-10-15 12:04:25
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Hi redbot
'bot_iu_fields' => '#article-image',// fields to be used (comma separated | use #custom-n for custom fields)
'bot_iu_mono_list' => '#second-image', // fields with single image (comma separated | use #custom-n for cfs)
custom field: second-image
Code to show the images
<txp:if_article_image><div class="thumb">
<txp:permlink class="thumbs" title='<txp:title />'>
<txp:article_image thumbnail="1" escape="html" />
</txp:permlink>
<txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="article_image" />' />
</div>
</txp:if_article_image>
</txp:if_individual_article>
<txp:if_article_list>
<txp:if_excerpt>
<txp:excerpt />
<p class="morelink"><txp:permlink>→ Den ganzen Artikel lesen</txp:permlink></p>
<txp:else/>
<txp:body />
</txp:if_excerpt>
<txp:else/>
<txp:excerpt />
<txp:if_article_image><div class="mitte"><txp:article_image class="" /><txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="article_image" />' /></div></txp:if_article_image>
<txp:body />
<txp:if_custom_field name="second-image">
<txp:if_article_image><div class="mitte"><txp:article_image class="" /><txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="second-image" />' /></div></txp:if_article_image>
</txp:if_custom_field>
</txp:if_article_list>
Here is the html live
Offline
#153 2012-10-15 19:54:28
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Hi again,
I see I wasn’t clear enough.
Anyway, based on the code you posted, this should work:
1) Replace the snippet you pasted with this:
<txp:if_article_image>
<div class="thumb">
<txp:permlink class="thumbs" title='<txp:title />'>
<txp:article_image thumbnail="1" escape="html" />
</txp:permlink>
<txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="article_image" />' />
</div>
</txp:if_article_image>
</txp:if_individual_article>
<txp:if_article_list>
<txp:if_excerpt>
<txp:excerpt />
<p class="morelink"><txp:permlink>→ Den ganzen Artikel lesen</txp:permlink></p>
<txp:else/>
<txp:body />
</txp:if_excerpt>
<txp:else/>
<txp:excerpt />
<txp:if_article_image>
<div class="mitte">
<txp:article_image class="" />
<txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="article_image" />' />
</div>
</txp:if_article_image>
<txp:body />
<txp:if_custom_field name="second-image">
<div class="mitte">
<txp:image class="" id='<txp:cusdtom_field name="second-image" />' />
<txp:image_info type="caption" wraptag="p" class="img_cap" id='<txp:custom_field name="second-image" />' />
</div>
</txp:if_custom_field>
</txp:if_article_list>
Then, in your preferences, replace as well the two lines you posted with these:
'bot_iu_fields' => '#article-image, #second-image',// fields to be used (comma separated | use #custom-n for custom fields)
'bot_iu_mono_list' => '#article-image, #second-image', // fields with single image (comma separated | use #custom-n for cfs)
Offline
#154 2012-10-16 04:47:13
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Thank You very much :-)
@ Redbot :-)
Now I can only select one image …
*I will select two, but I can choose only one – *
Now is not that bad, but it would have been nice
Last edited by SuMu (2012-10-16 05:06:11)
Offline
#155 2012-10-16 13:38:28
- GugUser
- Member

- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
If you would like to show more than one article image, then you have to replace in your code the <txp:article_image /> tag by the <txp:images /> tag. Then you can put in each article in the article image field a comma-separated list of image ids.
Offline
#156 2012-10-16 20:27:51
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
GugUser wrote:
If you would like to show more than one article image, then you have to replace in your code the <txp:article_image /> tag by the <txp:images /> tag. Then you can put in each article in the article image field a comma-separated list of image ids.
GugUser is right. Just remember to change the plugin configuration before, so to be able to insert multiple images in a single field:
'bot_iu_mono_list' => '', // fields with single image (comma separated | use #custom-n for cfs)
Offline
#157 2012-10-17 05:38:56
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Ah, Thanks :-)
Offline
#158 2012-12-04 04:27:29
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
I have a weird occurrence when using the plugin. In certain article image fields, I see values like these: 1,2,3, or sometimes like this: 1,2,,3,4, … and because of which the images don’t show on the front-end. It seems the plugin doesn’t remove previously used image IDs if images are edited or deleted from the article.
Is there a fix in the code that could solve this? I am using TXP 4.4.1.
Many thanks!
Offline
#159 2012-12-04 09:52:46
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Hi Husain,
thank you for reporting, I’ll look into it asap.
Which plugin version are you using?
Offline
#160 2012-12-04 16:21:49
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
husainhk wrote:
I have a weird occurrence when using the plugin. In certain article image fields, I see values like these: 1,2,3, or sometimes like this: 1,2,,3,4, … and because of which the images don’t show on the front-end. It seems the plugin doesn’t remove previously used image IDs if images are edited or deleted from the article.
Is there a fix in the code that could solve this? I am using TXP 4.4.1.
Many thanks!
I saw this happen recently on a customer’s site but fixed the image ids manually and it went away. No idea how the customer got it to do that so I dismissed it as a gremlin issue.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#161 2012-12-05 07:06:28
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Hi Matt … similar experience here too. To fix this manually, should I delete IDs from the database or just disable the plugin, clear things up and re-enable? Thanks!
Offline
#162 2012-12-05 09:45:22
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Hi Husain,
once again, which plugin version are you using? I can’t help you if you don’t tell me ;)
Offline
#163 2013-03-08 08:36:28
- Teemu
- Member
- From: Shanghai
- Registered: 2010-04-27
- Posts: 60
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
I think this plugin is great, but seems to have an issue with IE8. Please don’t ask why I even bother.
v0.6.1 and v0.6.2 (TXP 4.4.1) both give this error on page and the dialog window won’t open:
Line: 578
Char: 7
Error: 'parents(...).attr(...)' is null or not an object
Many times this type IE specific JS error is results of a trailing comma somewhere in the code or sorts, but I didn’t find the cause for this.
Any kind of help would be appreciated. Thanks!
Offline
#164 2013-03-08 12:41:40
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
Teemu wrote:
I think this plugin is great, but seems to have an issue with IE8. Please don’t ask why I even bother.
Thank you Teemu I’ll have a look ASAP
Offline
#165 2013-03-22 04:00:13
- Teemu
- Member
- From: Shanghai
- Registered: 2010-04-27
- Posts: 60
Re: bot_image_upload: upload, sort, edit, show images in ‘write' tab
I think I found the cause for the IE8 problem.
Somewhere about line 320:
$("#bot_temporary "+idClass).clone().appendTo(container);
I added space between second questionmarks and plus sign:
$("#bot_temporary " +idClass).clone().appendTo(container);
Seems to be working now.
Offline