#1 (permalink)  
Alt 17.10.2005, 13:18
Benutzerbild von Buggyboy
Erfahrener Benutzer
 
Registriert seit: 06.09.2003
Beiträge: 353
Böse

Moin!

Bei OSC gibt es eine Constribution, welche das Headerbild bei jedem Aufruf auswechselt.

Ich hatte das schon soweit hinbekommen, nur leider wurde es beim Template "Cubus" immer oberhalb der Tabelle eingef?gt, anstatt in der Tabelle.

Vielleicht hat ja jemand Zeit und Lust sich das mal anzusehen und gegebenenfalls f?r XTC abzu ?ndern.

Hier der Code der random_image.php:
Code:
<?php


// Change this to the total number of images in the folder
$total = "7";

// Change to the type of files to use eg. .jpg or .gif
$file_type = ".jpg";

// Location of the folder containing the images should have been completed in step 3 of readme.txt
$image_folder = "./images/random/";

// You do not need to edit below this line

$start = "1";

$random = mt_rand($start, $total);

$image_name = $random . $file_type;

echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";

?>
Und hier die Installanweisung:

Code:
---------------------------------------------------------------
Random Header Image V1.0

Author: Tammy OHagan webmaster@ohaganassociates.com
Date: 03-11-2004
License: GPL 

I am available for limited free help, if needed. You can reach me at
tammy@ohaganassociates.com. Please be specific in your questions.

Donations can be made to sales@ohaganassociates.com via Paypal, if you find this contribution useful.
I am currently working from home, so I am available for hire to install this contribution for you, CHEAP! 

The OFFICIAL Support Forum for this contribution will be here:

http://forums.oscommerce.com/index.php?showtopic=83132
----------------------------------------------------------------



IMPORTANT: This contribution was developed for, and tested on OSC v2.2MS2. I haven't tested it on previous OSC releases, so please take care when you install it in pre-MS2 OSC versions. In any case, please BACKUP your programs!!!



INSTALLATION
------------

Step 1) BACK UP - BACK UP - BACK UP! I'm not kidding!
Step 2) Name your images 1.jpg, 2.jpg etc. (Of course if your images are .gif files you would name them 1.gif, 2.gif, etc)
Step 3) With your favorite FTP program, make a new folder in catalog->images called "random".
Step 4) FTP your images into catalog->images->random
Step 5) Open the random_image.php file in this package and make the noted changes (instruction are in the file!)
Step 6) FTP the files listed in the "file additions" section to their respective directories.
Step 7) Make changes in the files listed in the "file modifications" section. 
Step 8) Ftp the random_image.php file and the newly modified header.php file up to your site.


----------------------------------------------------------------
FILE ADDITIONS - Needs Edited
----------------------------------------------------------------

- catalog/random_image.php







----------------------------------------------------------------
FILE MODIFICATIONS
----------------------------------------------------------------

-------------------------------
- catalog/includes/header.php
-------------------------------
Find this line---> (around line 57)

  <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

Replace with this line --->

  <td valign="middle"><?php include "random_image.php"; ?></td>
W?re nett, wenn sich das mal jemand ansehen k?nnte...
Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 17.10.2005, 14:17
 
Registriert seit: 12.04.2004
Beiträge: 775
Standard

Warum so kompliziert ?

Nimm nen JAVA Bannerwechsel Modul und da packste die Bilder rein gibst den JAVA da aus wo er angezigt werden soll fertig.


In die Header.php rein. Pfade so anpassen das die Bilder angezeigt werden.

Code:
<script language=JavaScript>



var z= 4; // die anzahl der Banner

ME_Banner = new Array(z);

ME_Banner[0] = '<img src="bild1.jpg">';

ME_Banner[1] = '<img src="bild2.jpg">';

ME_Banner[2] = '<img src="bild3.jpg">';

ME_Banner[3] = '<img src="bild4.jpg">';

var jetzt=new Date();

var y=(jetzt.getSeconds())%z;

//-->

</SCRIPT>
Dahin wo es angezeigt werden soll.

Code:
<script language=JavaScript><!--

document.write(ME_Banner[y]);

//-->

     </SCRIPT>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 17.10.2005, 14:36
Benutzerbild von Buggyboy
Erfahrener Benutzer
 
Registriert seit: 06.09.2003
Beiträge: 353
Standard

Cool!

Danke... hat super geklappt...

Peter
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 17.10.2005, 14:37
 
Registriert seit: 12.04.2004
Beiträge: 775
Standard

Yo Bidde Bidde !!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
changer, header, image

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 18:46 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand