NetTalk Central

Author Topic: Banner Images  (Read 4129 times)

Gordon Holfelder

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Banner Images
« on: February 11, 2011, 09:14:14 AM »
Hi There All-

I'm planning on implementing a personal website using NT5. Part of this is to allow me to get more familiar with building web apps (I really like this environment). Something I've seen in the XOOPS environment and I'm sure others have it as well is the ability to display an image in the header and then on a timer replace the image with a different image. Try http://xoops.org to see what I'm talking about.

I'm sure this can be done with NT5. Any suggestions as to where to start?

Thanks,
Gordon

nevy

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Banner Images
« Reply #1 on: February 12, 2011, 04:10:35 AM »
Uh....Cut and Paste...
Only joking, I would also like to know ???????

Rene Simons

  • Hero Member
  • *****
  • Posts: 649
    • View Profile
Re: Banner Images
« Reply #2 on: February 12, 2011, 08:54:59 AM »
Hi,

I checked out the XOOPS site it has a lot of text and more of it.
I think it is very important that you can read once you get there
IMHO there is a lot to read about XOOPS before you can do anything with it.
There is a lot of time to waste there. And getting very little results in the end.
If I were you I would spend my energy to learn a lot about NTWS by working the examples and think of creative solutionsto solve your _problems_. There's no such thing a s a free cigar.
Invest your time usefull and knock everybody's sock off by using NTWS.

Rene
Rene Simons
NT14.14

nevy

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Banner Images
« Reply #3 on: February 13, 2011, 11:50:38 AM »

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Banner Images
« Reply #4 on: February 13, 2011, 04:17:45 PM »
Hi Gordon,

At a guess this is what I would do and it might be wrong or a better way may be available as I have actually never done it!

We know we can do timers on a browse and this is probably a good place to add a list of images if you want dynamic content or target the banner content to user or group of users. So I would say the header image is a 1 row browse with a SSV to keep track of the record number and increment when the timer fires. Replicating the next and previous buttons may be a bit tricker but I'm sure it can be done with CSS.

Now for the header. Looking at one of my apps this is a netwebsource. I think we can add the NTW tag for a browse to the XTHML tab for a netweb source to display it and wrap it in some CSS to position it. So I think that is all that is needed. If not it may get you started.

If you had just 5 static images there is probably some easier way to do this via Javascript.

Cheers,

Kevin

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: Banner Images
« Reply #5 on: February 14, 2011, 12:13:58 AM »
Hi Gordon,

Kevin is on the right track.
Browses can do timers, but NetWebSource's can also do timers.

So here's the really-simple approach;

a) create a netwebsource
b) turn on the Div wrapper (you'll see an option for it there).
c) turn on the timer.
d) inside the source procedure, hand-code some html containing a "random" <img /> tag

Now that'll work, and every time the timer goes off you'll get another image.

question is, do you _want_ a timer in your app? If the user opens your page, and then goes home for the weekend, that timer keeps fetching files, all weekend. If you have 100 users with your page open, and the timer is set on say 60 seconds, that's 100 requests each minute.
What if you have 1000 users? or 10000 users?

So, perhaps you don't have an infinite number of images, in which case it's a lot better to send all 5 images to the browser in one go, and let javascript rotate them for you on a timer. That's fairly simple javascript - but it is, well, javascript, not clarion.

cheers
Bruce


Gordon Holfelder

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • Email
Re: Banner Images
« Reply #6 on: February 14, 2011, 08:45:06 AM »
Hi All-

Thanks all for your ideas. I will probably try the netwebsource & timer suggestion. I also like the idea of sending all the images and having a java script handle the image change. I guess I'll have to spend more time learning java script for that one. Sounds like fun!

As far as XOOP is concerned, I was just investigating the technology. I've blown quite a bit of time with it. I like the concept of modules that can add functionality to your web site.

Regards,
Gordon