random banner rotation?

Author Message

Dan Zembrosky

Tuesday 11 March 2003 12:35:02 pm

Anyone know how to do have ez 3 call an item within a folder to be displayed inline at random?

Tony Wood

Wednesday 12 March 2003 12:29:58 am

> > Anyone know how to do have ez 3 call an item within a
> folder
> > to be displayed inline at random?
>
> If you want a random banner EACH refresh, you'll need to run
> a scripts everytime index.php is loaded. Create a random
> banner script with an output of the of the banner or the
> complete link (whatever).
> Put the output in a variable and echo the variable in the
> templates.!
>
> See http://ezwiki.blanko.info/index.php/3XHT_UsePHP

Hans, Did you find that worked with cache enabled?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Paul Forsyth

Wednesday 12 March 2003 3:50:59 pm

> > > Anyone know how to do have ez 3 call an item within a
> > folder
> > > to be displayed inline at random?
> >
> > If you want a random banner EACH refresh, you'll need to
> run
> > a scripts everytime index.php is loaded. Create a random
> > banner script with an output of the of the banner or the
> > complete link (whatever).
> > Put the output in a variable and echo the variable in
> the
> > templates.!
> >
> > See http://ezwiki.blanko.info/index.php/3XHT_UsePHP
>
> Hans, Did you find that worked with cache enabled?

We have a very simple patch to the ez3 kernel to create a random number that you would use within templates. This doesnt quite address what you want but if you were using choosing images from within the design folder it may help.

The patch adds an operator, eg {rand(1,5)} picks a random integer between 1 and 5. Note that this will type of use will be seperate from cached images.

If this helps anyone Ill put it on the ezwiki site.

Paul

Paul Forsyth

Wednesday 12 March 2003 3:57:10 pm

> > > Anyone know how to do have ez 3 call an item within a
> > folder
> > > to be displayed inline at random?
> >
> > If you want a random banner EACH refresh, you'll need to
> run
> > a scripts everytime index.php is loaded. Create a random
> > banner script with an output of the of the banner or the
> > complete link (whatever).
> > Put the output in a variable and echo the variable in
> the
> > templates.!
> >
> > See http://ezwiki.blanko.info/index.php/3XHT_UsePHP
>
> Hans, Did you find that worked with cache enabled?

We have a very simple patch to the ez3 kernel to create a random number that you would use within templates. This doesnt quite address what you want but if you were using choosing images from within the design folder it may help.

The patch adds an operator, eg {rand(1,5)} picks a random integer between 1 and 5. Note that this will type of use will be seperate from cached images.

If this helps anyone Ill put it on the ezwiki site.

Paul

Dan Zembrosky

Wednesday 12 March 2003 7:34:33 pm

> > > > Anyone know how to do have ez 3 call an item
> within a
> > > folder
> > > > to be displayed inline at random?
> > >
> > > If you want a random banner EACH refresh, you'll
> need to
> > run
> > > a scripts everytime index.php is loaded. Create a
> random
> > > banner script with an output of the of the banner
> or the
> > > complete link (whatever).
> > > Put the output in a variable and echo the variable
> in
> > the
> > > templates.!
> > >
> > > See
> http://ezwiki.blanko.info/index.php/3XHT_UsePHP
> >
> > Hans, Did you find that worked with cache enabled?
>
> We have a very simple patch to the ez3 kernel to create a
> random number that you would use within templates. This
> doesnt quite address what you want but if you were using
> choosing images from within the design folder it may help.
>
>
> The patch adds an operator, eg {rand(1,5)} picks a random
> integer between 1 and 5. Note that this will type of use
> will be seperate from cached images.
>
> If this helps anyone Ill put it on the ezwiki site.
>
> Paul

Tat would be very useful. Please do, thank you.

Dan Zembrosky

Wednesday 12 March 2003 7:55:22 pm

> > > > Anyone know how to do have ez 3 call an item
> within a
> > > folder
> > > > to be displayed inline at random?
> > >
> > > If you want a random banner EACH refresh, you'll
> need to
> > run
> > > a scripts everytime index.php is loaded. Create a
> random
> > > banner script with an output of the of the banner
> or the
> > > complete link (whatever).
> > > Put the output in a variable and echo the variable
> in
> > the
> > > templates.!
> > >
> > > See
> http://ezwiki.blanko.info/index.php/3XHT_UsePHP
> >
> > Hans, Did you find that worked with cache enabled?
>
> We have a very simple patch to the ez3 kernel to create a
> random number that you would use within templates. This
> doesnt quite address what you want but if you were using
> choosing images from within the design folder it may help.
>
>
> The patch adds an operator, eg {rand(1,5)} picks a random
> integer between 1 and 5. Note that this will type of use
> will be seperate from cached images.
>
> If this helps anyone Ill put it on the ezwiki site.
>
> Paul

That would be very helpful, thanks!

Paul Forsyth

Thursday 13 March 2003 1:15:05 am

> > > > > Anyone know how to do have ez 3 call an item
> > within a
> > > > folder
> > > > > to be displayed inline at random?
> > > >
> > > > If you want a random banner EACH refresh, you'll
> > need to
> > > run
> > > > a scripts everytime index.php is loaded. Create a
> > random
> > > > banner script with an output of the of the banner
> > or the
> > > > complete link (whatever).
> > > > Put the output in a variable and echo the variable
> > in
> > > the
> > > > templates.!
> > > >
> > > > See
> > http://ezwiki.blanko.info/index.php/3XHT_UsePHP
> > >
> > > Hans, Did you find that worked with cache enabled?
> >
> > We have a very simple patch to the ez3 kernel to create
> a
> > random number that you would use within templates. This
> > doesnt quite address what you want but if you were using
> > choosing images from within the design folder it may
> help.
> >
> >
> > The patch adds an operator, eg {rand(1,5)} picks a
> random
> > integer between 1 and 5. Note that this will type of use
> > will be seperate from cached images.
> >
> > If this helps anyone Ill put it on the ezwiki site.
> >
> > Paul
>
> That would be very helpful, thanks!

Ok its referenced from ezwiki:

http://ezwiki.blanko.info/index.php/eZp%203.x%20-%20User%20modifications

I had to submit it as a bug report to get the file onto a page i could reference :) Let me know how you get on.

btw, ive now realised that the bug report i submitted is slightly wrong. it should have said 'greater than or equal to 0'... doh. wish we could edit or add to bug reports.

Paul

Paul Forsyth

Thursday 13 March 2003 1:32:27 am

> > > > > Anyone know how to do have ez 3 call an item
> > within a
> > > > folder
> > > > > to be displayed inline at random?
> > > >
> > > > If you want a random banner EACH refresh, you'll
> > need to
> > > run
> > > > a scripts everytime index.php is loaded. Create a
> > random
> > > > banner script with an output of the of the banner
> > or the
> > > > complete link (whatever).
> > > > Put the output in a variable and echo the variable
> > in
> > > the
> > > > templates.!
> > > >
> > > > See
> > http://ezwiki.blanko.info/index.php/3XHT_UsePHP
> > >
> > > Hans, Did you find that worked with cache enabled?
> >
> > We have a very simple patch to the ez3 kernel to create
> a
> > random number that you would use within templates. This
> > doesnt quite address what you want but if you were using
> > choosing images from within the design folder it may
> help.
> >
> >
> > The patch adds an operator, eg {rand(1,5)} picks a
> random
> > integer between 1 and 5. Note that this will type of use
> > will be seperate from cached images.
> >
> > If this helps anyone Ill put it on the ezwiki site.
> >
> > Paul
>
> That would be very helpful, thanks!

Ok its referenced from ezwiki:

http://ezwiki.blanko.info/index.php/eZp%203.x%20-%20User%20modifications

I had to submit it as a bug report to get the file onto a page i could reference :) Let me know how you get on.

btw, ive now realised that the bug report i submitted is slightly wrong. it should have said 'greater than or equal to 0'... doh. wish we could edit or add to bug reports.

Paul

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.