Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#151 2010-02-01 13:16:16
Re: jmd_img_selector: Thickbox-style image selector
Hey All, I’m using this plugin with no problems on a couple of sites. Tried installing it on another today, and I get the following error:
Parse error: syntax error, unexpected '(', expecting '}' in /hermes/web05b/b1145/moo.nancym/testing/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 284
The above errors were caused by the plugin:jmd_img_selector
The site is in a subdirectory called ‘testing’, not sure if that is significant.
Offline
#152 2010-02-02 03:44:18
Re: jmd_img_selector: Thickbox-style image selector
Solved my own problem! Upgraded from PHP 4 to PHP 5, and the error is gone.
Offline
#153 2010-03-03 13:01:24
Re: jmd_img_selector: Thickbox-style image selector
Hi
There is a little syntaxe error in the plugin at line 782:
the code :
case 'popup':
jmdImgSel.insert(jmdImgSel.bodyImg('thumbnail', 'poplink="1"'));
break;
must become :
case 'popup':
jmdImgSel.insert(jmdImgSel.bodyImg('thumbnail', ' poplink="1"'));
break;
Notice the space before poplink=“1”, when it s missing the code inserted into body will not work.
Cheers
Last edited by Dragondz (2010-03-03 13:01:47)
Offline
#154 2010-09-27 12:49:40
Re: jmd_img_selector: Thickbox-style image selector
This is just a courtesy call for anybody installing this plugin on Textpattern 4.3.0. Until jm has a chance to update the plugin officially, you’ll need to edit line 194 of plugin v1.0b2 from:
safe_insert("txp_css", "name='jmd_img_selector', css='" . base64_encode($css) . "'");
to:
safe_insert("txp_css", "name='jmd_img_selector', css='" . doSlash($css) . "'");
If you’re upgrading to 4.3.0, the stylesheet will be updated automatically when you first login, but you should probably edit that line anyway in case the sheet ever goes missing or you delete it and click ‘Create CSS’ on the jmd_img_selector’s tab again.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#155 2010-10-04 17:25:18
- Gerich
- Member
- Registered: 2009-08-30
- Posts: 35
Re: jmd_img_selector: Thickbox-style image selector
Is it possible to make that other registered users in txp can see and select only they own images and not the others authors?
Maybe somebody know, what code I need to add in the plugin.
Offline
#156 2011-03-15 18:46:34
Re: jmd_img_selector: Thickbox-style image selector
Just a general note for anyone using this plugin in v. 4.3:
After I activated it and created the stylesheet, it wasn’t working correctly — the CSS wasn’t being applied. I edited the plugin’s encoded stylesheet, deleted all the base64 junk, and put this into its place:
#jmdImgSel_overlay
{
background: #000;
height: 100%;
opacity: 0.8;
/*ie*/
filter: alpha(opacity=80);
position: fixed;
top: 0;
width: 100%;
}
#jmdImgSel_modal, #jmdImgSel_modal *
{
margin: 0;
padding: 0;
}
#jmdImgSel_modal
{
background: #fff;
position: absolute;
top: 35px;
}
#jmdImgSel_close
{
background: #000;
border: 3px solid #fff;
-moz-border-radius: 1.1em;
-webkit-border-radius: 1.1em;
-webkit-box-shadow: rgba(0, 0, 0, 0.3) 2px 3px 3px;
color: #fff;
font-size: 12px;
font-weight: 900;
left: -20px;
padding: 0.25em 0.55em;
position: absolute;
text-decoration: none;
top: -20px;
}
#jmdImgSel_controls
{
background: #eee;
margin: 0 0 8px;
padding: 5px 10px 5px;
/*ie*/
zoom: 1;
}
#jmdImgSel_controls:after
{
clear: both;
content: '.';
display: block;
height: 0;
visibility: hidden;
}
#jmdImgSel_controls button
{
float: right;
font-size: 100%;
padding: 0 0.5em;
}
#jmdImgSel_options
{
float: left;
width: 85%;
}
/*lazy way of targeting the two labels.*/
#jmdImgSel_options label
{
float: right;
}
#jmdImgSel_options label:first-child
{
float: left;
}
#jmdImgSel_info
{
clear: both;
color: #333;
font-weight: 900;
}
#jmdImgSel_msg
{
padding: 0 10px;
}
#jmdImgSel_imgName
{
font-weight: 900;
}
#jmdImgSel_images
{
clear: both;
overflow: auto;
padding: 0 0 0 10px;
}
#jmdImgSel_images li
{
border: 5px solid #8A8856;
float: left;
margin: 0 5px 10px 0;
opacity: 0.3;
overflow: hidden;
}
#jmdImgSel_images li:hover
{
border-color: #999;
opacity: 1;
}
#jmdImgSel_images li.selected
{
border-color: #666;
opacity: 1;
}
#jmdImgSel_images img
{
line-height: 0;
}
That’s just a decoded version of the CSS, but it worked for me. There may be some minor changes of mine in that CSS…nothing drastic though.
Offline
#157 2012-05-18 15:06:09
Re: jmd_img_selector: Thickbox-style image selector
Arrived at this one rather late, and running this on the latest version of Textpattern, but I can’t quite get it to work though…
Amended the CSS from the gobbledegook and changed line 194 of the plugin as Stef suggested
The images appear in a lovely thickbox, I click on ‘Add image’, and then nothing is inserted…
Textpattern 4.4.1 | PHP 5.2.17
Anything else obvious I’m missing?
Offline
#158 2012-05-19 12:21:43
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: jmd_img_selector: Thickbox-style image selector
Have you checked for plugin incompatibilities? I remember I had some with this plugin but can’t recall which ones exactly. (And just to be sure cause you don’t mention it: You have clicked any image before you click “Add image”.)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#159 2012-06-11 12:06:23
Re: jmd_img_selector: Thickbox-style image selector
Does this let you CMD+CLICK multiple images to drop straight into a post? Preferably wrapping in a <p> tag?
Offline
#160 2012-06-11 12:23:43
Re: jmd_img_selector: Thickbox-style image selector
rossharvey wrote:
Does this let you CMD+CLICK multiple images to drop straight into a post? Preferably wrapping in a <p> tag?
You can just click multiples, afair, and choose if you want them in the article_image field or at the cursor caret.
I’m working on an updated version that remembers settings and extends functionality, and a heap of other goodies like being able to define the markup that’s inserted, but development is slow going due to lots of other stuff. Trial version available if you want to play: get in touch.
Last edited by Bloke (2012-06-11 12:24:21)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#161 2012-06-11 14:12:19
Re: jmd_img_selector: Thickbox-style image selector
Ha! Didn’t realise this was yours Stef :) Legend. Email sent.
Offline
#162 2013-02-03 23:13:12
Re: jmd_img_selector: Thickbox-style image selector
is there any way of inserting the image in html rather than txp with the height and width tags???
Offline
#163 2013-11-20 13:39:19
Re: jmd_img_selector: Thickbox-style image selector
Hi Guys, I’ve made some edits to this to allow a lightbox option in the dropdown and a custom form that outputs your thumb and link so you can use whatever lightbox solution you prefer.. It also stays away from using rel=lightbox which will be deprecated soon and so give an error in your code, feel free to nab edited version from my web design site
…………………
I <3 txp
…………………
Offline