SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Random Image in a Random Image

    Hi guys,

    I need some help, I have sombody wanting a website,using joomla. This is all gd, and it works, but the hard part, for me anyway, is what he wants on the site now.

    For the header of the site, he wants a random header everytime the page loads, I have this working using $header= rand(1,11);

    and then the code to the src file being header$header.jpg which then brings on every load either header1.jpg or header6.jpg, that part works fine.

    The deeper part of this is the following, on each header, on exactly the same spot, is an area located for something to happen, so like he has a picture of a hand holding a photo, but the photo edited out, and now this is where I need to get something working.

    In this 'empty' photo, I need to have a live slideshow of photos from the photo gallery joomla has, so all his members who have uploaded pictures, this will now be random photos displaying in the header. How do I do this?

    Thanks.

  2. #2
    SitePoint Evangelist nsj's Avatar
    Join Date
    Oct 2005
    Location
    Jamaica (W.I)
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can read up on GD to manipulate and write on images.

  3. #3
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you would best create a flash file for each of those headers.
    ie. header1.swf

    you can then run the slideshow in each one for the images you want to be displayed. however you might need to hardcode the images you want in the slideshow within the action script.
    (this will depend on how Joomla names the images when they are uploaded)

    If done this way in your Joomla site you will only have to change the image code to SWF code.

  4. #4
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another solution would be using JS and CSS.
    Set an absolutely positioned image on the page and make the slideshow with JS.

  5. #5
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply guys, I will look into all of this, so far I have succeeded in making the headers work as the tables background, and then am able to put stuff on top of it much easier that way, I tried working with a layer but that messed up my header, and suddenly my header became the size of my layer, I havent worked too much with layers, so I obviously missed something.

  6. #6
    SitePoint Wizard simplecode's Avatar
    Join Date
    Jun 2006
    Posts
    1,129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is header file is common in this case?
    if Yes then designed a header fram work something like this>>
    in header use frame tag .... and call some Javascript function to show slide show from perticular folder , in this case u dont need to hardcode the images.
    better solutions are still there try for them also....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •