Textpattern Forum

You are not logged in. Register | Login | Help

#151 2010-02-01 13:16:16

nabrown78
Moderator
From: Boston, MA, USA
Registered: 2006-10-04
Posts: 289
Website

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

nabrown78
Moderator
From: Boston, MA, USA
Registered: 2006-10-04
Posts: 289
Website

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

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,145
Website

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#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

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 564
Website

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

gavnosis
Member
From: Milton Keynes, UK
Registered: 2005-03-12
Posts: 111
Website

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/Köln
Registered: 2006-08-15
Posts: 3,117

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

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 205
Website

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

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.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB