Search

Is there a new way of displaying images through the entry system?

What I did in S1.7 no longer works in S2.

I also noticed that the xml is different.

New XML

 <image size="24 kb" path="/images" type="image/jpeg">
    <filename>tcss250.jpg</filename>
    <meta creation="2008-04-29T14:33:50+00:00" width="250" height="250" />
  </image>

Old XML

 <photo>                    
       <item>
       <path>workspace/upload/Pixelmator_logo.png</path>    
   <type>image/png</type><size>45 kb</size>
       </item>
  </photo>

This is the XSLT I am using with the new XML

 <xsl:template match="image/filename">
 <xsl:param name="path" select="substring-after(path,'workspace/')"/>
<img src="{$root}/image/200/0/1/fff/{$path}" alt="Image Associated to {../../title}"/>
 </xsl:template>

It may be because its the end of the day and I'm tired, but I can't understand it.

Update:

This is the link I assume should work:

http://test.nicktoye.co.uk/nts08/image/200/0/1/fff/tcss250.jpg

This is the error I am getting:

 Fatal error: Image /mnt/gs02/herd03/29224/domains/test.nicktoye.co.uk/html/nts08/workspace/200/0/1/fff/tcss250.jpg could not be found. in /mnt/gs02/herd03/29224/domains/test.nicktoye.co.uk/html/nts08/symphony/image.php on line 61

Is that a bug?

You need to specify the image resizing mode. See here ...

uh? That's all php isn't it?

Anyone able to help me here?

Anyone able to help me here?

Did you read through the thread that Nils posted above? The image function's implementation has changed in 2.

Also, are you trying to display several entries on a single page along with their photos? Or a single entry with X amount of photos?

I did, but it was php and it made my brain hurt. :)

Several entries with photos, like the old Symphony.

I installed the Spectrum Symphony primer again, just to see what has been done as default and I have come across a section called images, and I have noticed that this has been hidden from the publish menu. So how are you able to add images?

I have managed it with this code:

 <xsl:template match="image">
 <img src="{$root}/image/2/133/88/2/images/{filename}" alt="Image Associated to {../../title}"/>
 </xsl:template>

images are handled as section links now, i believe (anyone correct me if i'm wrong). that's why you don't see the images section in the publish menu b/c you have to associate those images with another section. the default s2 build has the images section linked to articles and it's from there that you can add in images. it's a little confusing at first, but like anything, it just takes time to learn something new.

even when i'm creating something new and need images in a section, i still forget how they work at first.

edit. so for the default build, if you want to add images to the articles section, then you have to click publish > articles and when that screen comes up, there should be a column in the far right that says images with a linked number under it. click on the linked number and then you can add images with some meta data you input. by default it is only a description. but if you edit the images section, you can add whatever other fields you want, i believe.

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