tag,
ich habe folgendes problem ;( ich möchte ein js script mit einstellungsmöglichkeiten über mein cms verwalten daher hab ich den js code in eine php eingebettet.
wie gesagt es liegt nur an der js einbettung der resst funktioniert.
wäre super wenn mir jemand sagt woran es liegt und was ich beim einbinden beachten muss.
ps die datei wird im template wie folgt geladen:
<script src="/projekte - area51/trunk-4555/mods/clansphere/js/jquery.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/ajax/js/ajax.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/nivo/js/nivo.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/nivo/js/nivo-settings.php" type="text/javascript"></script>
ich habe folgendes problem ;( ich möchte ein js script mit einstellungsmöglichkeiten über mein cms verwalten daher hab ich den js code in eine php eingebettet.
PHP-Code:
<?php
header('Content-type: application/javascript'); // head-string für js
$op_nivo = cs_sql_option(__FILE__,'nivo'); // funktion fuer die tabelle option -> mod nivo
echo '
'$(window).load(function() {' .
'$('#slider').nivoSlider({' .
'effect:'.'$op_nivo['nivo_effect']'.',' .
'slices:$op_nivo['nivo_slices'],' .
'animSpeed:$op_nivo['nivo_animSpeed'],' .
'pauseTime:$op_nivo['nivo_pauseTime'],' .
'startSlide:$op_nivo['nivo_startSlide'],' .
'directionNav:$op_nivo['nivo_directionNav'],' .
'directionNavHide:$op_nivo['nivo_directionNavHide'],' .
'controlNav:$op_nivo['nivo_controlNav'],' .
'controlNavThumbs:$op_nivo['nivo_controlNavThumbs'],' .
'controlNavThumbsFromRel:$op_nivo['nivo_controlNavThumbsFromRel'],' .
'controlNavThumbsSearch: '.'$op_nivo['nivo_controlNavThumbsSearch']'.',' .
'controlNavThumbsReplace: '.'$op_nivo['nivo_controlNavThumbsReplace']'.',' .
'keyboardNav:$op_nivo['nivo_keyboardNav'],' .
'pauseOnHover:$op_nivo['nivo_pauseOnHover'],' .
'manualAdvance:$op_nivo['nivo_manualAdvance'],' .
'captionOpacity:$op_nivo['nivo_captionOpacity'],' .
'beforeChange: function(){},' .
'afterChange: function(){},' .
'slideshowEnd: function(){}' .
'});' .
'});' .
';
wäre super wenn mir jemand sagt woran es liegt und was ich beim einbinden beachten muss.
ps die datei wird im template wie folgt geladen:
<script src="/projekte - area51/trunk-4555/mods/clansphere/js/jquery.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/ajax/js/ajax.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/nivo/js/nivo.js" type="text/javascript"></script>
<script src="/projekte - area51/trunk-4555/mods/nivo/js/nivo-settings.php" type="text/javascript"></script>
Kommentar