|
Posted by phill.luckhurst@googlemail.com on 11/18/07 23:03
On 18 Nov, 22:44, "Shelly" <sheldonlg.n...@asap-consult.com> wrote:
> phill.luckhu...@googlemail.com wrote:
> > I haven't a clue with PHP so please spoon feed me.
>
> > In the middle of a script that I have been looking at there is this
> > code which I have extracted to run on it's own
>
> > <?php
> > include "flashthumb.php";
>
> > <script type="text/javascript" src="mootools.js"></script>
> > <script type="text/javascript" src="slideshow.js"></script>
>
> > <div id="my_slideshow" class="slideshow">
> > <img src="images/vote.jpg" alt="A picture" width="400" height="300" /
>
> > </div>
> > ...
> > <script type="text/javascript">
> > myShow = new Slideshow('my_slideshow', {hu: 'images/', images:
> > ['vote.jpg','thumb_rar.jpg','thumb_wav.jpg']});
> > </script>
> > <?
>
> > Now flashthumb.php generates a list of filenames in the variable
> > $url[1], $url[2], $url[3] etc
>
> > how would I use those in the myshow line instead of
> > 'vote.jpg','thumb_rar.jpg','thumb_wav.jpg'
>
> > or am I totally barking mad and getting it wrong?
>
> Suppose the value of $url[1] is the one that corresponds to 'my_slideshow'
> and holds that value. Then you would use
>
> <?php echo $url[1]; ?>
>
> instead of 'my_Slideshow'.
>
> It allows you, for example, to initialize fields in the middle of html text.
>
> --
> Shelly- Hide quoted text -
>
> - Show quoted text -
I don't think I explained myself properly or I don't quite understand
what you mean.
The code above generates a slideshow from the images listed.
$url is an exploded array generated by flashthumb.pbp of filenames
picked from a directory
so $url[1] would be vote.jpg
$url[2] would be rar.jpg
$url[3] would be wav.jpg
etc
except flashthumb selects random jpegs.
The line
myShow = new Slideshow('my_slideshow', {hu: 'images/', images:
['vote.jpg','thumb_rar.jpg','thumb_wav.jpg']});
inserts those images into a slideshow script
so what is needed is something along the lines of
myShow = new Slideshow('my_slideshow', {hu: 'images/', images:
['$url[1]','$url[2]','$url[3]']});
but that obviously is not the correct syntax to insert those values
I really must learn how to code.
Navigation:
[Reply to this message]
|