Setting Up Slideshow for Auto Start and Looping

207 views
Skip to first unread message

jeffy61

unread,
Jun 21, 2011, 5:44:38 PM6/21/11
to PHPSlideShow by zinkwazi.com
Hello All,

I have had some programming experience but am totally new to php and
trying to integrate it into a html web page. But I was wonder if
someone out there might be able to help me with two "small" php
projects? (if this becomes a project I can pay you something for your
time too)

Anyway, I have a friend who has a restaurant. She and her family work
really hard and I am trying to help them get a web site going, the
time has come to get that done. Here is the site I am doing for her,
it is not done yet, but you can get an idea of what I am trying to
do:
http://carolsplaceandtheeatery.com/

Now, I had the idea that on the main index page we could have a slide
show of some of the food they make. I took several pictures to try and
get this going, and i found the very neat phpslideshow php code Greg
did (I thought it should not be too hard to write the code myself, but
it appears more involved than I first figured…and I need to get this
working):

Here is a sample of what I, with the help of my friend Zac, got
working...
http://carolsplaceandtheeatery.com/fd/phpslideshow.php

But I'd like to get that working on the web page above, but also have
it "Auto Start" (maybe at a random picture) then endlessly loop (not
stop at the end). I know for some of you guys/gals getting it to do
that is a five minute job. For me, not so easy yet :(

Anyone want to help me? And if if becomes too much of your time I can
compensate you….


Also, I do our motorcycle club web site (for free hehe), and I am
looking for a way to show the "Sponsor Banners" on this page in random
order, so as not to show favoritism to any one sponsor:
http://www.statelineriders.org/sponsors.htm

I would also like to write some php code to randomly pick 4 or 6
Sponsor Banners and mix them into the clubs main index page and our
"Motorcycle News Page" (random 2 banners side by side in 2 or 3
locations, between sections on the pages)
http://www.statelineriders.org/motorcyclenews.htm

….Sponsors pay $10 a month for a Banner so the more people can see it,
the more value it has to the sponsor (and the club). I'd like to
eventually have 20 to 30 sponsor banners, all of which goes to help
out "land fund" so the club can hopefully buy land someday. Land for
the club to ride on is probably going to cost $250k to $300k, so every
little bit towards that, or a mortgage payment, helps :)

In you could (and want) to help me with either of these please let me
know. Any help very much appreciated.

Thanks,
Jeff

BandonRandon

unread,
Jun 23, 2011, 2:16:11 AM6/23/11
to PHPSlideShow by zinkwazi.com
Jeff,

You have a few options here. As far as the template goes (getting the
image on the main page to be the slideshow) here are two ways go to
about it

1) Set up template.html to look like the current homepage. You could
either rename index.html to template.html and add the slideshow code.
or copy the home page code over.

2) Use an iframe/css frame (this is a little out dated but may be the
best option here) That would also allow to you start on a random image
by setting the url to something like
http://carolsplaceandtheeatery.com/fd/phpslideshow.php?directory=.&currentPic=34
You would need to write a bit of php that counts the images (or lines
of pics.txt) then gets a random number.

As far as the auto start and endless looping both have been explained
in the group numerous times. Here is how to endless loop:
http://groups.google.com/group/phpslideshow/browse_thread/thread/f9929febbc9a6d2b/e930d552a714c21a

Here is how to auto start:
http://groups.google.com/group/phpslideshow/browse_thread/thread/2b795c26c0190ccd/e83ac2b0a7de6c10

Both of these changes where made available for download in a revision
of the code I posted on github which you should be able to download at
https://github.com/bandonrandon/phpslideshow

In all honestly thought, you probably don't need to be using the
slideshow all as it's way over kill if I understand your need
correctly. Something like the jQuery Cycle Plugin (http://
jquery.malsup.com/cycle/) I think would suite your needs better in
this case.

Hope that helps get you on the right track.

Brooke

PS. Regarding the motorcycle club web site question. This seems
outside of the scope of PHPSlideshow but if you'd like to e-mail me
privately we could discuss the project in detail.

On Jun 21, 2:44 pm, jeffy61 <jeff...@yahoo.com> wrote:
> Hello All,
>
> I have had some programming experience but am totally new to php and
> trying to integrate it into a html web page. But I was wonder if
> someone out there might be able to help me with two "small" php
> projects? (if this becomes a project I can pay you something for your
> time too)
>
> Anyway, I have a friend who has a restaurant. She and her family work
> really hard and I am trying to help them get a web site going, the
> time has come to get that done. Here is the site I am doing for her,
> it is not done yet, but you can get an idea of what I am trying to
> do:http://carolsplaceandtheeatery.com/
>
> Now, I had the idea that on the main index page we could have a slide
> show of some of the food they make. I took several pictures to try and
> get this going, and i found the very neat phpslideshow php code Greg
> did (I thought it should not be too hard to write the code myself, but
> it appears more involved than I first figured…and I need to get this
> working):
>
> Here is a sample of what I, with the help of my friend Zac, got
> working...http://carolsplaceandtheeatery.com/fd/phpslideshow.php
>
> But I'd like to get that working on the web page above, but also have
> it "Auto Start" (maybe at a random picture) then endlessly loop (not
> stop at the end). I know for some of you guys/gals getting it to do
> that is a five minute job. For me, not so easy yet :(
>
> Anyone want to help me? And if if becomes too much of your time I can
> compensate you….
>
> Also, I do our motorcycle club web site (for free hehe), and I am
> looking for a way to show the "Sponsor Banners" on this page in random
> order, so as not to show favoritism to any one sponsor:http://www.statelineriders.org/sponsors.htm
>
> I would also like to write some php code to randomly pick 4 or 6
> Sponsor Banners and mix them into the clubs main index page and our
> "Motorcycle News Page" (random 2 banners side by side in 2 or 3
> locations, between sections on the pages)http://www.statelineriders.org/motorcyclenews.htm

jeffy61

unread,
Jun 25, 2011, 10:34:34 AM6/25/11
to PHPSlideShow by zinkwazi.com
Brooke,

Thank you so much for the reply and info! Sorry for my slow response,
I got a little busy here the past couple days. I will digest what you
posted and see what I can do. I may email you if I can't figure out
how to do this :)

Thanks!
Jeff

On Jun 23, 2:16 am, BandonRandon <bandonran...@gmail.com> wrote:
> Jeff,
>
> You have a few options here. As far as the template goes (getting the
> image on the main page to be the slideshow) here are two ways go to
> about it
>
> 1) Set up template.html to look like the current homepage. You could
> either rename index.html to template.html and add the slideshow code.
> or copy the home page code over.
>
> 2) Use an iframe/css frame (this is a little out dated but may be the
> best option here) That would also allow to you start on a random image
> by setting the url to  something likehttp://carolsplaceandtheeatery.com/fd/phpslideshow.php?directory=.&cu...
> You would need to write a bit of php that counts the images (or lines
> of pics.txt) then gets a random number.
>
> As far as the auto start and endless looping both have been explained
> in the group numerous times. Here is how to endless loop:http://groups.google.com/group/phpslideshow/browse_thread/thread/f992...
>
> Here is how to auto start:http://groups.google.com/group/phpslideshow/browse_thread/thread/2b79...
>
> Both of these changes where made available for download in a revision
> of the code I posted on github which you should be able to download athttps://github.com/bandonrandon/phpslideshow

jeffy61

unread,
Jun 25, 2011, 10:42:17 AM6/25/11
to PHPSlideShow by zinkwazi.com
BTW I did try to edit the template.html file (some things, the
controls, actually appear to need to be edited in the php file) but
when I tried to change the background color to black the pictures
would not display....but I am sure it was me doing the editing
wrong...

Thanks,
Jeff

BandonRandon

unread,
Jun 26, 2011, 3:07:32 AM6/26/11
to PHPSlideShow by zinkwazi.com
on your test link and a dom editor all i did was change the css for
body by UPDATING the first line to be

body {
background: none repeat scroll 0 0 #000000;
}

and poof black background so it must be some CSS on your end.

jeffy61

unread,
Jun 26, 2011, 11:23:28 AM6/26/11
to PHPSlideShow by zinkwazi.com
Brooke,

Thanks....

I was playing with the JQuery Cycle Plugin late last night....and
using the chainsaw approach to programming got this working... hehe
http://carolsplaceandtheeatery.com/JQuery.html

There is more I can edit out, I am only using the shuffle effect, but
I need more time to figure out what else I can safely remove. Then if
I get the picture centered I think I can copy and paste that html code/
text into my web page...

I did lose the white picture frame around the pictures when I made the
pictures bigger (600x480) than the example on the demo page. Need to
read more about this...

The other thing I would try to get working at some point is have it
automatically use all the pictures in the http://carolsplaceandtheeatery.com/fd/
folder (so I don't have to manually code the link to each picture into
the web page....so adding or changing pictures in the slide show is
just a matter of adding or deleting pictures to that directory). That
might be a bit of challenge for me....??

But I think I am close to getting some kind of slideshow at least
working on the main web page...

Thanks,
Jeff

BandonRandon

unread,
Jun 27, 2011, 2:31:16 AM6/27/11
to PHPSlideShow by zinkwazi.com
jeff,

this is now moving away from a php slideshow question and more into a
jquery/php question. Therefore this thread is becoming off topic. With
that being said I'll give you my thoughts an if you want to take the
convo to stackoverflow or the jquery forms post a link and i may be
able to help you over there.

What you would want to do to auto add images is to set up a php count
that finds all the images (or uses a pix.txt type file) you could
probably find this code or a start in phpslideshow (yay open source).
Then set up a loop that adds the javascript <li> for each item.

again, hope that helps.

On Jun 26, 8:23 am, jeffy61 <jeff...@yahoo.com> wrote:
> Brooke,
>
> Thanks....
>
> I was playing with the JQuery Cycle Plugin late last night....and
> using the chainsaw approach to programming got this working... hehehttp://carolsplaceandtheeatery.com/JQuery.html
>
> There is more I can edit out, I am only using the shuffle effect, but
> I need more time to figure out what else I can safely remove. Then if
> I get the picture centered I think I can copy and paste that html code/
> text into my web page...
>
> I did lose the white picture frame around the pictures when I made the
> pictures bigger (600x480) than the example on the demo page. Need to
> read more about this...
>
> The other thing I would try to get working at some point is have it
> automatically use all the pictures in thehttp://carolsplaceandtheeatery.com/fd/

jeffy61

unread,
Jun 28, 2011, 5:43:16 PM6/28/11
to PHPSlideShow by zinkwazi.com
>>this is now moving away from a php slideshow question and more into a
jquery/php question. Therefore this thread is becoming off topic.<<

I agree :) But thanks for the help. I got a slide show working.

I have another problem though, I am using SeaMonkey (and KompoZer to a
much lesser degree) as my html editors. I, by and larger, like
SeaMonkey. But there is a (known) bug/problem with SeaMonkey, and that
is it strips out PHP code (even when using the Include function) when
you save your page! Discovered this by trying to use PHP with
SeaMonkey. And it appears SeaMonkey will not be updated to fix this
(really dumb) "bug". Then there is KompoZer, the supposed successor to
SeaMonkey. I understand the main person behind KompoZer has a new job,
and development has stopped. KompoZer fixed a few of the problems that
SeaMonkey had, including leaving PHP code alone, but has a number of
issues that keep me using it daily.

So, can anyone suggest a SeaMonkey-like html editor, that is easy to
use, yet modern and leave PHP code alone? And maybe makes it easy to
drop in a YouTube video as easy as adding a picture? I looked at
RapidWeaver, it gets a lot of good reviews, but even that seems to do
"more than I want it to" (making me learn to things its' way)...

Any suggestions for a modern, easy to use html editor?

Thanks,
Jeff

BandonRandon

unread,
Jun 29, 2011, 3:08:25 AM6/29/11
to PHPSlideShow by zinkwazi.com
Now this is moving away from a jQuery question and moving into a
software question ;)

I had never really heard of SeaMonkey as an editor only as a browser.I
did look it up and unfortantally don't know any good suggestions. I
just jEdit for all my editing needs these days but it has no WYSIWYG
support which looks to be what you're asking for. You might still
check it out as it dose a pretty good job with php.
Reply all
Reply to author
Forward
0 new messages