[TYPO3] Wondering how to have a random image on my front page

Scotty C superscotty19 at yahoo.com
Mon Dec 26 18:22:14 CET 2005


Hi Patrick,

As requested, here's a quick tutorial for using
ck_fortune (I'll be using www.pegslegs.ca as an
example, and assume you're using an HTML template with
subpart labelled <!-- FOODPIC --> ):


SET UP IMAGE REPOSITORY PAGE
-----------------------------

- In your page tree view, create a page (you should
hide it also). This will be the storage repository for
the images. Makea note of the page ID - you'll need it
later (in this case, the ID is 103)
- Go to List view of that page, and click "Create New
Record"
- Click on "Fortune" from the list of new record types
- The next step is pretty self-explanatory - just
populate the section with the image name, caption,
etc.
- Click "Save & Close"


TYPOSCRIPT CONFIGURATION
--------------------------

- In the "Setup" section of your template, use the
following TypoScript:

# include the php-script for rotating images
includeLibs.ts_ckfortune =
EXT:ck_fortune/pi1/class.tx_ckfortune_pi1.php

page.19 = TEMPLATE
page.19 {
     template = FILE
     template.file = fileadmin/pegslegs/template.html
     # just load the section labelled ###DOCUMENT###
     workOnSubpart = DOCUMENT

     ### ROTATING IMAGES ###
     subparts.FOODPIC = USER_INT
     subparts.FOODPIC {
          userFunc = tx_ckfortune_pi1->main
          # random rotating
          20.time = rand
          # page id containing data
          20.datapid = 103
          # display image field
          20.10.field = image
          # type function: display an image
          20.10.type = IMAGE
       
     # end of foodpic
     }

# end of template
}



That's all there is to it! I hope you find this
extension to be as useful as it was for me. As always,
if you need clarification or more help, just let me
know.

Take care!
-Scott.


--- Patrick O'Hara <pdohara at gmail.com> wrote:

> Thanks this seems to be exactly what I was looking
> for.  A little help
> with the typoscript would be appreciated.  I have
> done some stuff with
> typoscript, but I am not comfortable with it.  I
> suspect the examples
> have too much script, that is they seems to be
> setting up a whole
> page.  I guess I am looking for what I need to do to
> setup just the
> fortune plugin.  Also what type of database records
> should I be
> adding?
> 
> Thanks in advance.
> Pat O
> 
> On 12/25/05, Scotty C <superscotty19 at yahoo.com>
> wrote:
> > Hi Pat!
> >
> > The extension you need is called "ck_fortune"
> (check
> > spelling) and it is AWESOME. I've used on numerous
> > sites including www.pegslegs.ca and www.stormat.ca
> >
> > It's really easy to get running, but if you need
> any
> > help getting going, just let me know.
> >
> > Season's Greetings!
> > -Scott.
> >
> >
> > --- Patrick O'Hara <pdohara at gmail.com> wrote:
> >
> > > I would like to have a set of pictures with
> > > associated caption
> > > displayed on my home page.  They would display
> one
> > > image at a time,
> > > either randomly or by day.  In a way that the
> image
> > > would change,
> > > along with it's caption, automatically.  Is
> there an
> > > extention or some
> > > such that will do this?
> > >
> > >
> > > --
> > > Tanks for your Support
> > > Pat O'Hara
> > >   _      _      _
> > >  /*\==  /*\==  /*\==
> > > <ooo>  <ooo>  <ooo>
> > > _______________________________________________
> > > TYPO3-english mailing list
> > > TYPO3-english at lists.netfielders.de
> > >
> >
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> > >
> >
> >
> >
> >
> > __________________________________________
> > Yahoo! DSL – Something to write home about.
> > Just $16.99/mo. or less.
> > dsl.yahoo.com
> >
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.netfielders.de
> >
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
> 
> 
> --
> Tanks for your Support
> Pat O'Hara
>   _      _      _
>  /*\==  /*\==  /*\==
> <ooo>  <ooo>  <ooo>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
>
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 



		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 




More information about the TYPO3-english mailing list