Photopress 0.9

This version includes a few fixes, and a couple of new features. It should work with both WP 1.5.2 and 2.0. If you’re upgrading, make sure to de-activate and re-activate to update the database table.

New features and fixes:

  • Added a category slug field and code to use it - this should fix the permalink problems related to strange characters in category names.
  • The popup tool shouldn’t throw Javascript errors anymore. I also added code to suppress the Browse tab if the tool is launched from the Manage page.
  • There’s now some Javascript to change the Insert buttons a little to show users which images they’ve inserted.
  • The popup tool’s Browse tag has a dropdown category menu that will display images images in a single category.
  • The random image template function (pp_random_image_bare) can now display multiple random images. There are some details about it in the readme and the Photopress page.

Download Photopress 0.9: photopress.zip OR photopress.tar.gz

As usual, let me know what’s broken or needs work. Thanks again for all the bug reports and feature ideas!

21 Responses to “Photopress 0.9”

  1. James Says:

    Works like a charm! Many thanks for your efforts. I really like the new features, and using HTML for inserting images is in my opinion a great combo with the Rich Text editor.

  2. Stahn Says:

    Permalinks still don’t work. You must code… something so the code appears in the Permalinks tab in the Options (Options > Permalinks) and we can copypaste it into our htaccess file. Yes, I deactivated and activated the plugin.

    General Suggestions:

    - An intelligent way to check that if the image is of the same size or less than the one specified in “Maximum thumbnail dimensions” so it won get “resized” to an higher or same size, it’s a big waste of hard disk space. The same with popups, don’t popup an image if it’s the same size (popup shold be if it’s smaller of bigger).
    - If we use the [photopress] tags, an option to select if we want the image linked (to an popup or an album, it doesn’t matter, we should have the option). Now with the HTML it’s a lot easier, anyways.
    - If we don’t use the “Link to Album” option we should have an option to select if we gonna link to the thumbnail or the full image, because this breaks the idea to keep the original images. Let me explain, if we select to keep the original images, and then we don’t link to the album, when we click on the thumbnail, the popup will select the middle sized image.

    Uff, that’s it for now. I’m having a lot of validation problems that I don’t see here but that my problem, if I can’t fix it I’ll ask you what can I do about that…

  3. Stahn Says:

    Ah, and I liked that the “Upload” function was disabled… what about incluiding that “bug” in the Filez plugin? (I’m using it).

  4. SHRIKEE Says:

    I just installed PP0.9.0. (at plugins it shows 0.9.1)

    All seems to work!! I didnt dare to use the richtext editor, i find it such a bitch… But in the normal editor it works perfect.

    I needed to update the db and categories in the manage > maintain page.

    One suggestion tho, when viewing the images with permalinks its like
    /album/cat/catname and

    when we click a image its
    /album/img/imgname

    works great! but maybe
    /album/catname

    and
    /album/catname/imgname

    would be better ;)
    See what im getting at?

    Anyway, GREAT WORK as always!

  5. pedqnk Says:

    0.9.1 the pop-up insert photo button is fixed, however when I insert an image from the wordpress uploader always include

    The height and widht always insert small in thumbnails inserts and in full image insert.

  6. pedqnk Says:

    The code is no show in the previos comment, I want say that when I insert an image with “send to editor” from the wordpress uploader always include, in thunbnail and in full image, de width and height -> height=”96″ width=”67″

  7. Slaughter Says:

    Hi there. Whenever I try to upload via the photo upload link in wp-admin i always get the same error; file was ‘wrong size’,'wrong type’ etc. nothing wrong with images, as far as i know…my max size for uploads is set to 1000kb and my photos are all less than that. jpg allowed, and my photos are jpgs. so i uploaded by using http://ftp. then went to ‘manage’ then ‘maintain’ and chose ‘Import Photos’ to “import any images in the photos folder that are not in the database”. after each attempt to hit that button the next screen just says ‘one image uploaded’ - weird, i’d expect more infor than that but supposed ‘ok, it’s to upload one image at a time’ so hit the button 10 times, once for each image. thing is, at manage > photopress, there are only 2 options: ‘maintain’ and ‘upload’! nothing else, no category management, nothing - options> photopress just sets paramaters for uploads etc, nothing re categories etc. i tried to use your code for inserting random image to test if this was working: then realised that’s incorrect - it’s actually (no space between

  8. Slaughter Says:

    ie re: “You can edit the information at Manage:Photopress. To create a new category just give an image one that doesn’t exist yet. You can also rename categories and category slugs at Manage:Photopress.”

    nope - those options do NOT exist when i go to ‘manage’ - ‘photopress’. only ‘maintain’ and ‘upload’.

  9. Jedi Rory Says:

    The upload still isn’t working for me. After I tell it what pics to upload, it acts like its doing it and then returns just a blank window. When I then go to the album, I’m not seeing the new pics anywhere….I appreciate any help you can give me!!!

    R

  10. Jedi Rory Says:

    When I actually do a “View Source” on that blank pop-up after attempting an upload, I see the following returned:

    WordPress › Upload Images

    .pp_insert_button {
    font-weight: bold;
    }
    .pp_browse_table {
    width: 100%;
    text-align: right;
    }
    #insertimages {
    display: block;
    }
    #uploadcomplete {
    display: none;
    }

    //”;
    } else {
    var linkcode = ““;
    }
    }
    if (typeof tinyMCE != “undefined”) {
    tinyMCE.execCommand(”mceInsertContent”, false, linkcode);
    } else if (typeof window.opener.document.post.content != “undefined”) {
    window.opener.document.post.content.value += linkcode;
    }
    return;
    }
    if (typeof window.opener.tinyMCE != “undefined”) {
    /**
    * $RCSfile: tiny_mce_popup.js,v $
    * $Revision: 1.18 $
    * $Date: 2005/10/29 19:13:20 $
    *
    * @author Moxiecode
    * @copyright Copyright © 2004, Moxiecode Systems AB, All rights reserved.
    */

    var tinyMCE = null, tinyMCELang = null;

    function TinyMCEPopup() {
    };

    TinyMCEPopup.prototype.init = function() {
    var win = window.opener ? window.opener : window.dialogArguments;

    if (!win)
    win = top;

    window.opener = win;
    this.windowOpener = win;
    this.onLoadEval = “”;

    // Setup parent references
    tinyMCE = win.tinyMCE;
    tinyMCELang = win.tinyMCELang;

    if (!tinyMCE) {
    alert(”tinyMCE object reference not found from popup.”);
    return;
    }

    this.isWindow = tinyMCE.getWindowArg(’mce_inside_iframe’, false) == false;
    this.storeSelection = tinyMCE.isMSIE && !this.isWindow && tinyMCE.getWindowArg(’mce_store_selection’, true);

    if (this.isWindow)
    window.focus();

    // Store selection
    if (this.storeSelection)
    tinyMCE.selectedInstance.execCommand(’mceStoreSelection’);

    // Setup dir
    if (tinyMCELang['lang_dir'])
    document.dir = tinyMCELang['lang_dir'];

    // Setup title
    var re = new RegExp(’{|\\\$|}’, ‘g’);
    var title = document.title.replace(re, “”);
    if (typeof tinyMCELang[title] != “undefined”) {
    var divElm = document.createElement(”div”);
    divElm.innerHTML = tinyMCELang[title];
    document.title = divElm.innerHTML;

    if (tinyMCE.setWindowTitle != null)
    tinyMCE.setWindowTitle(window, divElm.innerHTML);
    }

    // Output Popup CSS class
    document.write(”);

    tinyMCE.addEvent(window, “load”, this.onLoad);
    };

    TinyMCEPopup.prototype.onLoad = function() {
    var body = document.body;

    body.onkeydown = function (e) {
    e = e ? e : window.event;
    if ( e.keyCode == 27 && !e.shiftKey && !e.controlKey && !e.altKey ) {
    tinyMCEPopup.close();
    }
    }

    if (tinyMCE.getWindowArg(’mce_replacevariables’, true))
    body.innerHTML = tinyMCE.applyTemplate(body.innerHTML, tinyMCE.windowArgs);

    var dir = tinyMCE.selectedInstance.settings['directionality'];
    if (dir == “rtl”) {
    var elms = document.forms[0].elements;
    for (var i=0; i=0; i–) {
    if (wrapper.hasChildNodes())
    wrapper.insertBefore(nodes[i].cloneNode(true), wrapper.firstChild);
    else
    wrapper.appendChild(nodes[i].cloneNode(true));

    nodes[i].parentNode.removeChild(nodes[i]);
    }

    // Add wrapper
    doc.body.appendChild(wrapper);

    // Create iframe
    iframe = document.createElement(”iframe”);
    iframe.id = “mcWinIframe”;
    iframe.src = document.location.href.toLowerCase().indexOf(’https’) == -1 ? “about:blank” : tinyMCE.settings['default_document'];
    iframe.width = “100%”;
    iframe.height = “100%”;
    iframe.style.margin = ‘0px’;

    // Add iframe
    doc.body.appendChild(iframe);

    // Measure iframe
    iframe = document.getElementById(’mcWinIframe’);
    dx = tinyMCE.getWindowArg(’mce_width’) - iframe.clientWidth;
    dy = tinyMCE.getWindowArg(’mce_height’) - iframe.clientHeight;

    // Resize window
    // tinyMCE.debug(tinyMCE.getWindowArg(’mce_width’) + “,” + tinyMCE.getWindowArg(’mce_height’) + ” - ” + dx + “,” + dy);
    window.resizeBy(dx, dy);

    // Hide iframe and show wrapper
    body.style.margin = oldMargin;
    iframe.style.display = ‘none’;
    wrapper.style.display = ‘block’;
    }
    };

    TinyMCEPopup.prototype.resizeToContent = function() {
    var isMSIE = (navigator.appName == “Microsoft Internet Explorer”);
    var isOpera = (navigator.userAgent.indexOf(”Opera”) != -1);

    if (isOpera)
    return;

    if (isMSIE) {
    try { window.resizeTo(10, 10); } catch (e) {}

    var elm = document.body;
    var width = elm.offsetWidth;
    var height = elm.offsetHeight;
    var dx = (elm.scrollWidth - width) + 4;
    var dy = elm.scrollHeight - height;

    try { window.resizeBy(dx, dy); } catch (e) {}
    } else {
    window.scrollBy(1000, 1000);
    if (window.scrollX > 0 || window.scrollY > 0) {
    window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
    window.sizeToContent();
    window.scrollTo(0, 0);
    var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);

  11. Gerard Says:

    When I press Upload…select a file (via browse) from my own pc (remote) and press upload again I get an error message: “The document contains no data” How can I sove this? I use php-thttpd/mysql/wordpress.

    Thanks in advance

    Gerard

  12. Andreas Says:

    Great work! Photopress is exactly what I was looking for… :-)

    Please contact me so I can send you a german translation for photopress.
    thx
    Andreas

  13. Saiajin Says:

    Hi …Thank U so much I love this Plug..however with WP2.0 it doesn’t play well with the already existing image uploader as far as being able to include all uploaded images in the photo album…this is a pain for my clients and I had to stop using the photopress plugin because of the confusion….however now all I hear is that there is no Random image and photalbum in the sidebar anymore…. is there a way to disable the Wp2.0 uploader? or just get photpress to coperate with the WP2.0 uploader?
    thanx for the help!

  14. Nerovik Says:

    Hi …Thank you so much I love this plugin too. I am using Wordpress 2.0. However, could you have a look to my blog site? Each time i click on the thumbnail, the image is not automatically loaded into a popup as I was thinking but in a kind of temporary page. As if my main page was “exploded”.

  15. Nerovik Says:

    Hi,

    Thank you for you super plugin. Can you help me? Each time i click on the thumbnail, the page loaded is “altered”. I thought the image should be loaded in bigger popup?
    I do not know how to solve it ?
    My theme is WP-Connect All (http://alanthefrog.free.fr/) /Wordpress 2.0
    Thank you in advance.
    Nerovik

  16. Saiajin Says:

    It’s cool thhat u can turn off the uploader in Photopress..but the problem, I guess is the photo album location…since the WP2.0 uploader seeems to store stuff in multiple folders by ….uplodads/year/month/… I love Photopress but to maintain it separately just confuses and is double the work if say the Pic that was in a post is not in the album…it needs to copied and re-uploaded to the correct folder.. ( I suppose the other option is to repoint Photopress every first of the month and have a monthly album! LOL)

    Good Luck w/development on this…this is Still the best photo album and random image slideshow plugin!!

    Thanx again!

    8 )

  17. quest Says:

    i think protopress v0.9.1 not support in 2 bites languages.

    is there anything that solve this problem?

  18. Stahn Says:

    Nerovik, try disabling your plugins one by one, I believe it’s a strange javascript behavior.

    Saiajin, you can change the location of the images in a php file, there are a lot of “hacks” for that. Here is a quick one: http://wordpress.org/support/topic/53285/page/2#post-292857

  19. kat Says:

    I am curious if any ‘comments for images’ is planned in the future? I’m working on using wordpress and photopress together as a full site CMS with a gallery, but i’d love the option to leave comments on images, perhaps in the full-view popup. I have searched trying to find a plugin already made for this but it seems there isn’t one. I’d love it if you could drop me an email with a response ;) Otherwise i’ll check back here to see =)

  20. kding Says:

    Hi, thanks for the great plugin. My initial use seems no problem at all except the import photos function won’t work. I have a whole load of photos in the fold, but clicking import photos button returns a 0 images imported message. does anyone can help? thank you! and happy photopress.

  21. Wizard Says:

    Slick plugin, works great, but looking to see if I can change a couple of things.

    When a thumbnail is clicked on, instead of going to the album I would like it to go directing
    to full size image.

    Can that be done?

Leave a Reply