Forum Replies Created

Viewing 15 replies - 16 through 30 (of 39 total)
  • I would guess that if you’re concerned about upload simplicity, you will also be concerned about handling images after that – browsing and putting into posts. For this reason I highly recommend Martin Chlup????’s excellent iimage_browser plugin, which handles uploads, browsing and post insertion. It’s at https://fredfred.net/skriker/index.php/iimage-browser

    I’m using v1.4.5 beta (the latest I think) and it works great.

    Thread Starter kaat

    (@kaat)

    REVISED COMPLETE INSTRUCTIONS:

    Okay, as far as I can see, to guaratee this works, the Javascript needs to be included for each theme you are using. So, instead of putting it in quicktags.js, the thing to do is put it in the theme’s header.

    (1) Edit your theme’s header template (header.php). If your theme doesn’t have a header template, then you’ll need to do this to the default theme. Insert the following on it’s own, anywhere between <head … and </head> :

    <script language=”JavaScript”>
    function ViewImage(ifile,ix,iy)
    {
    var ititle = “Click to close” ;
    var win = window.open(“”,”imageviewer”,”width=”+ix+”,height=”+iy+”,menubar=no,toolbar=no”);
    win.document.open();
    win.document.write(“<html><head><title>”+ititle+”</title>”);
    win.document.write(“</head><body onBlur=\”self.close()\” onClick=\”self.close()\”>”);
    win.document.write(‘<div style=”position:absolute;width:’+ix+’px;height:’+iy+’px;left:0px;top:0px”>’);
    win.document.write(“<img src=\””+unescape(ifile)+”\”></div></body></html>”);
    win.document.close();
    }
    </script>

    (2) In /wp-admin/iimage_browser.php find and make this variable read as follows:

    $ib_custom_code_thumb = ‘<x href=”#” onClick=”ViewImage(\’%src\’,%width,%height)”><img style=”float: left; margin: 0 10px 0px 0; display: inline;” src=”%tsrc” title=”%title” alt=”%title” width=”%twidth” height=”%theight” border=”0″ />’;

    IMPORTANT! Change the <x href above to <a href .. this was just to make the code display properly here.

    NOTES
    – Works with iimage_browser v1.4.5 beta (the latest).
    – Seems to work well with different browsers.
    – When clicked or unfocused, the popup closes.
    – Style: you can adjust the style=”…” element to your preference, or remove it to let your theme CSS handle the image style.

    Sorry for the confusion!

    Thread Starter kaat

    (@kaat)

    I just realised a problem with this:

    If your theme doesn’t include quicktags.js, then of course the popup code isn’t available. So I need to find somewhere to put the Javascript so it’s always available. I’ll post as soon as I figure that out.

    The “#” sign just makes the link be “same place we already are”, while the OnClick element is what opens the new window.

    Will post back ASAP

    Thread Starter kaat

    (@kaat)

    Sorry, no, I just put it into a new blog that is in development and changing every few minutes ??

    Thread Starter kaat

    (@kaat)

    Oh bother, the $ib_custom_code_thumb is showing up wrong above …

    It’s this:

    $ib_custom_code_thumb = ‘<x href=”#” onClick=”ViewImage(\’%src\’,%width,%height)”><img style=”float: left; margin: 0 10px 0px 0; display: inline;” src=”%tsrc” title=”%title” alt=”%title” width=”%twidth” height=”%theight” border=”0″ />’;

    BUT CHANGE <x href to <a href
    !

    Forum: Plugins
    In reply to: FCKeditor Plugin ChenPress

    I just fixed my problem (1) above …

    A change is needed in the config.php file – same file that holds $fckphp_config[a€?UserFilesPatha€?]

    At line 32, change:
    $fckphp_config[‘basedir’]=$_SERVER[‘DOCUMENT_ROOT’];

    To:
    $fckphp_config[‘basedir’]=substr($_SERVER[‘PATH_TRANSLATED’], 0, strlen($_SERVER[‘SCRIPT_NAME’]) * – 1);

    Reason it wasn’t working: I use mass virtual hosting, so DocumentRoot holds wrong base path. The change above uses 2 different server variables to achieve it reliably. This problem would also occur for certain non-Apache servers too.

    Forum: Plugins
    In reply to: FCKeditor Plugin ChenPress

    Hi chweifly – thanks for great work making this.

    I have two little issues:

    (1) Like ablewave above, even though file structure is created, permissions done, and config set, no uploads show in ChenPress browser.

    (2) I would like to always show ChenPress, not Quicktags – can you tell me how?

    Thanks!

    Forum: Plugins
    In reply to: Best Image Gallery Plugin

    LazyGallery is cool, but I kept having problems with it (can’t remember what now!).

    So I’ve ended up using Photopress https://isaac.wedin.org/2005/03/08/photopress/ – it’s very simple & unobtrusive.

    I think if/when I need more features, I’m going to get the open source Gallery2 and using the available wp interface plugin(s).

    Thank you it looks very nice indeed!

    Thread Starter kaat

    (@kaat)

    Success! My first little wp hack. I just changed (B) above to work in the same way as (A), and now both buttons work. This should work for any quicktags buttons that cause malfunction that were written in the style of (B).

    If anyone wants more detail, speak up!

    Thread Starter kaat

    (@kaat)

    Okay, maybe a coder can help …

    Why does button (B) break button (A)?

    (A) via PHP, as used in ca-cpicker:

    var colorButton = document.createElement(‘input’);
    colorButton.type = ‘button’;
    colorButton.value = ‘<?php echo $caption; ?>’;
    colorButton.onclick = <?php echo $js_onclick; ?>;
    colorButton.className = ‘ed_button’;
    colorButton.title = “<?php echo $title; ?>”;
    colorButton.id = “<?php echo “ed_{$caption}”; ?>”;
    toolbar.appendChild(colorButton);

    (B) via JS, as used in photopress:

    <script language=”JavaScript” type=”text/javascript”>
    <!–
    document.getElementById(“quicktags”).innerHTML += “<input type=\”button\” class=\”ed_button\” id=\”ed_upload\” value=\”Browse\” onclick=\”return pp_browse_popup();\” /><input type=\”button\” class=\”ed_button\” id=\”ed_upload\” value=\”Upload\” onclick=\”return pp_upload_popup();\” />”;
    //–>
    </script>

    Thanks for any help.

    Thread Starter kaat

    (@kaat)

    Okay, I’m onto something now … my statement “there’s another way to interface with quicktags” is correct. The plugins mentioned each add their button using DOM and amending the quciktags elements. And they each do it in quite different ways. So now I just need to try and figure out why one breaks the other …

    Thread Starter kaat

    (@kaat)

    Thanks podz. Yes, I’ve looked at my live quicktags.js but I don’t see code in it specific to some of the custom quicktags, e.g.: ca-cpicker. I don’t know Javascript that well – I assume there’s either a routine in there to check for which buttons to create, OR, there’s another way to interface with quicktags that I’m not aware of. Either way, where would it be looking to know which buttons to create? I figure that’s where I might debug.

    I don’t believe it’s a popup-stopping issue, since I can get all buttons to work as long as their “conflicters” are deactivated.

    Forum: Plugins
    In reply to: WP Plugin: CA-ColorPicker

    What I’ve found is that certain custom quicktag buttons cause certain others to malfunction. If you have other plugins using quicktag buttons (like say contact-form), try deactivating them. I can attest that ca-colorpicker works very nicely if not impeded as described.

    I’m off to search on how to avoid this quicktag clash – it happens with others too.

    Thread Starter kaat

    (@kaat)

    Well, at the semiologic site it says use email if you have a donation, or this forum if not, so .. here it is ??

Viewing 15 replies - 16 through 30 (of 39 total)