Check alle échte Black Friday-deals Ook zo moe van nepaanbiedingen? Wij laten alleen échte deals zien
Toon posts:

Slideshow in .TPL files

Pagina: 1
Acties:
  • 172 views

Verwijderd

Topicstarter
Ik heb een webshop waarop ik een slideshow wil zetten. Helaas gebeurt er niet wat ik graag wil. Dit is mijn
home.tpl:
code:
1
2
3
4
5
6
7
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<center><div id="slider">

<div id="fadeshow1"></div>

</div><br /></center>
<?php echo $footer; ?>


In de HEAD section moet ik de javascript voor de slideshow neerzetten, dus dat komt in header.tpl en in
deze zelfde map heb ik het bestand fadeslideshow.js staan. Als ik alles in één standaard HTML bestand
zet werkt het prima, maar deze verdeling met TPL bestanden wil niet werken, iemand een idee? Hier
de code van het header.tpl bestand.

Alvast bedankt!!

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php if (!strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>



<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript" src="fadeslideshow.js">

/***********************************************
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<script type="text/javascript">

var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
        ["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
        ["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
        ["http://i30.tinypic.com/531q3n.jpg"],
        ["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
    ],
    displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
})


</script>




<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<base href="<?php echo $base; ?>" />
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo str_replace('&', '&amp;', $link['href']); ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>

<link rel="stylesheet" type="text/css" href="catalog/view/theme/<?php echo $template; ?>/stylesheet/stylesheet.css" />

EN DE REST VAN DE HEADER.....

  • Aganim
  • Registratie: Oktober 2006
  • Laatst online: 15:55

Aganim

I have a cunning plan..

Een browser ziet alleen dat "fadeslideshow.js" geladen moet worden en zal deze dan ook proberen te vinden in de hoofdmap van je site. Dus je zal de link naar je .js bestand moeten aanpassen, of het bestand moeten verplaatsen naar de hoofdmap, lijkt mij.

  • OkkE
  • Registratie: Oktober 2000
  • Laatst online: 10-11 15:46

OkkE

CSS influencer :+

Kijk inderdaad eens of "fadeslideshow.js" wel ingeladen wordt. Dit kan eenvoudig met "Netwerk" tab in bijv Chrome (na "Element inspecteren"), of door een alert(); in je *.js op te nemen.

“The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer.”
QA Engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 999999999 beers. Orders a lizard. Orders -1 beers.


  • MueR
  • Registratie: Januari 2004
  • Laatst online: 14:48

MueR

Admin Devschuur® & Discord

is niet lief

Devschuur® Beleid - Help, mijn script werkt niet (goed). Oftewel, ga debuggen. We zitten hier niet om support te leveren op code van derden. Lees ook de Quickstart eens door.

Anyone who gets in between me and my morning coffee should be insecure.


Dit topic is gesloten.