Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    47
    Plugin Contributions
    0

    Default Random Logo in Header..

    Hi There! I found a thread in the archives that had a quick fix for having your logo randomize on a page refresh.

    I tried what they did, and it works but not fully. Can anyone take a look at it and see if it would work with the newer version on zc or if a change needs to be made to the site I am working on??

    Here is the thread : http://www.zen-cart.com/forum/showth...ht=random+logo

    Here is the site I am working on... see the error!
    http://kilobytecouture.com/shop/

    It also changed the font that is defined on the stylesheet.

    Thanks so much!

  2. #2
    Join Date
    Nov 2005
    Posts
    47
    Plugin Contributions
    0

    Default Re: Random Logo in Header..

    bump? anyone have any ideas for me?

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Random Logo in Header..

    Have you changed the name of header.php to header.php:1 ??
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Nov 2005
    Posts
    47
    Plugin Contributions
    0

    Default Re: Random Logo in Header..

    No, I had not changed it. I managed to fix it though... somehow I had a random letter before the php at the beginning of the file!

    I do have another question... in the original post it says if you have more than 2 files make it (1,nnn) what does that mean? She wants to have maybe 4 or 5 different files. They are all named 1.jpg 2.jpg etc...
    How should I code that?

    I tried
    srand((double)microtime()*1000000);
    define('HEADER_LOGO_IMAGE', 'logo' . rand(1,2,3,4) . '.jpg');

    but that doesn't work.

  5. #5
    Join Date
    Nov 2005
    Posts
    47
    Plugin Contributions
    0

    Default Re: Random Logo in Header..

    Ignore my last post, worked that one out too. It has to be the min and max numbers inside the bracket.



    This works quite easily if people want a quick way to have a random logo!

 

 

Similar Threads

  1. Can't reszie the logo header in my template to fit logo image
    By signify in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 1 May 2011, 06:57 PM
  2. Random Icons around my Logo!!!
    By NBordeau in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Jul 2010, 06:42 PM
  3. 1.3.8 random pictures in header
    By sieg01 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Mar 2009, 07:37 PM
  4. Random header image in CSS
    By gengo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Oct 2006, 07:43 PM

Posting Permissions

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