[TYPO3-ttnews] plugin.tt_news.displaySingle.image.noImage_stdWrap

HocomAdvies (Wiechert Hooghwinkel) info at hocom-advies.nl
Mon Jan 25 13:32:45 CET 2010


Lukas,

I tried that as well but that did not work either.

Wiechert.
  ----- Original Message ----- 
  From: Lukas Stancik 
  Newsgroups: typo3.projects.tt-news
  To: typo3-project-tt-news at lists.typo3.org 
  Sent: Monday, January 25, 2010 1:15 PM
  Subject: Re: [TYPO3-ttnews]plugin.tt_news.displaySingle.image.noImage_stdWrap


  HocomAdvies (Wiechert Hooghwinkel) napsal(a):
  > Hi,
  > 
  > To have a default image created when no image is inserted with a tt_news item, in List and Single view, I used the code showed below. This is working great for List view, but when I try the same trick for Single view it's not working. Any Idea how to get this working? As an alternative I tried to create a code inserting a gif instead, but can't get that working as well. 
  > I am using tt_news latest version (3.0) with typo3 4.3.
  > 
  > Thanks a lot,
  > HocomAdvies
  > 
  > Wiechert Hooghwinkel
  > 
  > www.hocom-advies.nl
  > 
  > 
  > 
  > The code which is working fine for List view:
  > #-----------------------------------
  > # Generate a tt_news image automatically when no image is available.
  > # In this snippet: List mode
  > #-----------------------------------
  > 
  > plugin.tt_news.displayList.image.noImage_stdWrap {
  >   cObject = IMAGE
  >   cObject {
  >     # Wrap the image with a div tag
  >     wrap = <div>|</div>
  >     # Use GIFBUILDER to create an image
  >     file = GIFBUILDER
  >     file {
  >       # Define the width and height of the image.
  >       XY = 120,120
  >       # Define the background color of the image.
  >       backColor = #FFFFFF
  > 
  >       # First object in the image: TEXT
  >       10 = TEXT
  >       10 {
  >         # The actual text which is displayed in the image
  >         text = No image available
  >         # The fontsize
  >         fontSize = 16
  >         # niceText to make the text more natural. This can be good or bad depending on your server configuration.
  >         niceText = 1
  >         # Color of the text
  >         fontColor = #000000
  >         # Coordinates where your text should appear in the image. Width / Height
  >         offset = 125/2-32,125/2+4
  >       }
  >     }
  >   }
  > }
  > 
  > Than I thought using the same code for an image in Single mode, with just a slight change here:
  > plugin.tt_news.displayList.image.noImage_stdWrap {
  > 
  > Unfortunately its not working!
  > 
  > 
  > This is what I also tried as an alternative for this:
  > 
  > plugin.tt_news.display_Single.image.noImage_stdWrap {
  >   cObject = IMAGE
  >   cObject {
  >     # Wrap the image with a div tag
  >     wrap = <div>|</div>
  >    #file source
  >   file = IMAGE
  >     file {
  >       = fileadmin/templates/no_news.gif
  >       width = 320
  >       height = 220
  > 
  >         }
  > }
  > }
  > 
  > 
  > ## tried this as well:
  > plugin.tt_news {
  > 
  > 
  > display_Single.image {
  > file.maxW = 108
  > file.maxH =
  > noImage_stdWrap {
  > cObject = IMAGE
  > cObject {
  > file = fileadmin/templates/img/Dummy.gif
  > wrap = <div>|</div>
  > }
  > }
  > }
  > }

  Hi,

  I think the problem might be the underscore between "display" and "Single" in 
  the name of your object. Shouldn't be there displaySingle instead?

  Regards, Lukas
  _______________________________________________
  TYPO3-project-tt-news mailing list
  TYPO3-project-tt-news at lists.typo3.org
  http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-tt-news


More information about the TYPO3-project-tt-news mailing list