Search

Oooops, it didn't work for me (using latest Symphony integration code from GitHub) until I changed the delegate subscription context to

'page' => '/backend/',

Furthermore, it's not playing nicely with the S3 Upload extension, but that can probably wait until we know if my changes to JIT will be pulled or not.

Image Index Preview updated to version 1.2.1 on 14th of June 2011

  • Changed delegate from /administration/ to /backend/ (code name "Michael")

Hallo Nils,

entschuldige wenn ich in deutsch schreibe aber mein englisch reicht dafür nicht aus.

Bei mir wird das Vorschaubild nur angezeigt wenn das Uploadfeld nicht der erste Eintrag in der Tabellen Zeile ist.

Zusätzlich ändert sich die Link URL, es öffnet sich die original Bilddatei und nicht mehr der Eintag.

Ist das so gewollt von dir ?

As a note for everyone else: quma says that his English is not good enough to explain his question in English. The question is about using the preview on primary fields in a section, similar to Adam's comment on the other page.

@quma: Ich dachte eigentlich, dass dies funktionieren sollte. Wenn ich Zeit finde, schaue ich mir das Problem an.

Pardon me but where exactly is this "Image Index Preview"?

Based on your description, I was under the impression that thumbnails would be generated in place of the filenames (or as an addendum to) but I don't see it happening. What might I be doing wrong?

(screenshot attached)

Attachments:
content-img-screen.png

I think it's because the upload field is the first visible field in the table. The JS to add the thumbnails in the list view only looks for links to images. Because the content int the first table cell always links to the entry edit page, it's not replaced with the thumbnail. So change the order of your fields so that the upload field is not the first and you should see the preview image.

that's correct. when the upload field is the first in a section, the path to the image isn't exposed by the markup, so displaying a thumbnail would be quite difficult.

Oh cool. Thanks! Now it's attempting to show the thumbnails - but oh the thumbnails won't show up!

In fact, so far I haven't been able to get any of those JIT resizer to process my images. Nor could I get the Media Resolvr to work. I checked my Apache's RewriteLog and confirms that the rewrite mod is doing its thing.

Somehow I am under the impression that if I type in something like this:

<img alt="background">
    <xsl:attribute name="src"><xsl:value-of
        select="concat(
            'http://smluniverse.com/image/2/80/80/5',
            '/workspace',
            random-uploaded-background-image/entry/image/@path,
            '/',
            random-uploaded-background-image/entry/image/filename/text()
        )" />
    </xsl:attribute>
</img>

then the resulting URL http://smluniverse.com/image/2/80/80/5/workspace/images/background/3872672394a9576192e8b.jpg would link to an image that's properly resized?

But nada. Doesn't work for me. And I'm not sure what's wrong. Oh... and please excuse the rather long-winded node names :)

Attachments:
content-img-screen-nothumb.png

You mustn't include /workspace in the JIT URL, see the Parameters part in the JIT documentation. But the Image Index Preview extension should create correct URLs. Do they contain /workspace? You should also check if the .htaccess contains the JIT rules.

And you can make your XSLT life a bit easier. In attributes you can use the curly braces syntax, like <img alt="background" src="{$root}/image/2/80/80/5{image/@path}/{image/filename}"/>.

  1. The extension shouldn't have a name, it should be part of the symphony core !
  2. Why doesn't my directory show the images? The entry detail pages do work.

@klaftertief Thanks for the tip.

I have restructured the path per your suggestion but I still am not getting any result. Here's a link to an image that that I would like to resize:

http://smluniverse.com/workspace/images/photobg.jpg

Based on the documentation, I constructed this URL:

http://smluniverse.com/image/1/200/0/images/photobg.jpg

But as you can see, it doesn't return anything. Why is that???

Also of interest, I tried to trigger the 'default: direct display' mode using this URL: http://smluniverse.com/image/1/images/photobg.jpg and very strangely I received an error: "Error: Connecting to that external site is not permitted." But this is the same site...

Could we please keep this thread focussed on the image preview extension only? Thanks!

Do you know why doesn't my directory show the images? The entry detail pages do work.

Could be an incompatibility with the Order Entries extension, it looks like the "drag to reorder" is being appended incorrectly for a start. Are you seeing any JavaScript errors?

Removed oredr entries to no avail http://see.weareinto.com/8YGN

Are you seeing any JavaScript errors

Also check the HTML source, is the JS file being written into the page? What if you throw an occasional alert() or console.log() throughout the extension's JavaScript?

Nope, no errors, console is clear
Here's the source https://gist.github.com/1090348

on july 15th, i said

that's correct. when the upload field is the first in a section, the path to the image isn't exposed by the markup, so displaying a thumbnail would be quite difficult.

Oh! perfect, maybe that tidbit can land in the README, thnx @fawx

Oh! perfect, maybe that tidbit can land in the README, thnx @fawx

What about sending a pull request with this addition? Thanks!

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details