0

first of all happy 10/10/10 :twisted:

btw i post my problem on my wordpress site here in javascript thread because i'm having a problem a problem on javascript script.. i am hoping you can help me with my problem the images can't read or open from the image folder. here is my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">


    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>



    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />    

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->



    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />

    <link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />

    <link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />


    <?php wp_get_archives('type=monthly&format=link'); ?>

    <?php //comments_popup_script(); // off by default ?>
    
    
    
     <link rel="stylesheet" type="text/css" href="<?php get_bloginfo('template_url'); ?>/rssSlider/css/sample1.css" />
     <link rel="stylesheet" type="text/css" href="<?php get_bloginfo('template_url'); ?>/rssSlider/css/slimbox.css" />
     
<style type="text/css"> 

/*this is the dynamic width of the sliding container | width: number-of-thumbnails x 65px;    50px for d thumbnail width + 10px for the margin-left*/
#inner, #inner2{
    width: <?
            $d = opendir(get_bloginfo('template_directory') . '/rssSlider/images3/');
            $count = 0;
            while(($f = readdir($d)) !== false)
            if(ereg('-thumb.jpg$', $f))
            ++$count;
            closedir($d);
            $width=$count*65;
            print "$width";
            ?>px;
    border: 0 dotted #f00;
    position: absolute; 
    left: 0; 
}

</style>
    
    
    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/rssSlider/js/core.js"></script>
    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/rssSlider/js/more.js"></script> 
    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/rssSlider/js/sliding.js"></script>
    <script language="javascript" type="text/javascript" src="<?php bloginfo('template_url'); ?>/rssSlider/js/slimbox.js"></script>
    
<script type="text/javascript" src="<?php get_bloginfo('template_url'); ?>/rssSlider/highslide/highslide-with-gallery.js"></script>
<link rel="stylesheet" type="text/css" href="<?php get_bloginfo('template_url'); ?>/rssSlider/highslide/highslide.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="./highslide/highslide-ie6.css" />
<![endif]-->



<!--
    2) Optionally override the settings defined at the top
    of the highslide.js file. The parameter hs.graphicsDir is important!
-->

<script type="text/javascript">
hs.graphicsDir = '<?php get_bloginfo('template_url'); ?>/rssSlider/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.numberPosition = 'caption';
hs.dimmingOpacity = 0.75;

// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
    //slideshowGroup: 'group1',
    interval: 100,
    repeat: true,
    useControls: true,
    fixedControls: 'fit',
    overlayOptions: {
        opacity: .75,
        position: 'bottom center',
        hideOnMouseOut: true
    }
});
</script>
    <?php wp_head(); ?>
</head>

<body>
<div id="wrap">
    <div id="container">
        <div id="header">
            <div class="logo">
                <div id="breadcrumbs">
                    <ul>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Kontakt</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Gastebuch</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Anreise</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Presse</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Verein</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Museum</a></li>
                        <li><a href="#"><img src="images/infonav.gif" border="0" />&nbsp;Partner & Links</a></li>
                    </ul>
                </div><!--end of breadcrumbs-->
            </div><!--end of logo-->
            <div id="navmenu">
                <ul>
                    <li><a href="#" class="active">SCHLOSS</a></li>
                    <li><a href="#">KONZERTE</a></li>
                    <li><a href="#">RITTER-FEST</a></li>
                    <li><a href="#">HOTEL</a></li>
                    <li><a href="#">VERMIETUNG</a></li>
                    <li><a href="#">PRE-Gestüt</a></li>
                </ul>
                <div id="slider"></div><!--end of slider-->
            </div><!--end of navmenu-->
        </div><!--end of header-->
        <div id="sidebar">
            <ul>
                <li><a href="#">SCHLOSS AMERANG</a></li>
                <li><a href="#">GESCHICHTE</a></li>
                <li><a href="#">MUSEUM</a></li>
                <li><a href="#">KURZBESCHREIBUNG</a></li>
                <li><a href="#">FOTOALBUM</a></li>
                <li><a href="#">VEREIN</a></li>
                <li><a href="#">MEINE TICKETS</a></li>
                <li><a href="#">NEWSLETTER</a></li>
            </ul>
        </div><!--end of sidebar-->
        <div id="content">
            <h2>Konzerte auf Schloss Amerang</h2>
                <p>Verehrter Gast und Freund von Schloss Amerang,<br /><br />wir heißen Sie mit unserem Jahresprogramm 2010 herzlich auf Schloss Amerang willkommen. Für uns bedeutet Schloss Amerang familiäre Tradition, der wir uns sehr stark verpflichtet fühlen. Ob Sie auf der Suche nach einem Ort für ein unvergessliches Fest oder Ihre Hochzeit sind, eines unserer über 40 Konzerte von April bis November, Großveranstaltungen wie das Ritter-Fest besuchen, bei uns Ihren Urlaub verbringen, ein Pferd aus unserer Zucht kaufen möchten oder in unserer neu gebauten Gestütsanlage einstellen möchten, sie sollen stets spüren, dass alles aus einer Hand kommt.

<br />Dabei können Sie den Abend vor und nach jedem Konzert stets stimmungsvoll auskosten, entweder im romantischen Schlosspark oder in unseren Gewölberestaurants. Schließlich werden Essen und Genießen bei uns großgeschrieben. Sie können sich hierzu bereits beim Vorverkauf Ihren Tisch exklusiv reservieren.

Erfahren Sie hier alles über unser bisherigen Veranstaltungen und freuen Sie sich schon auf die kommenden Herbstnächte und Novemberkonzerte.

Wir freuen uns auf ein Wiedersehen mit Ihnen!

 

<br /><br />Herzlichst Ihre Familie

<br />Ortholf und Giulia Frhr. und Frfr. v. Crailsheim </p>
        </div><!--end of content-->
        
        
        
        
        
        <div id="imgslider">        
            <div id="outer">
            <div id="inner">
            
            
            <?php
        
        /* settings */
        $image_dir =wp_enqueue_script('jquery');

        
        
        
        /* step one:  read directory, make array of files */
        if ($handle = opendir($image_dir)) {
            while ($file = readdir($handle)) 
            {
                if ($file != '.' && $file != '..') 
                {
                    if(strstr($file,'-thumb'))
                    {
                        $files[] = $file;
                    }
                }
            }
            closedir($handle);
        }
        
        
        /* step two: loop through, format gallery */
        if(count($files))
        {
            foreach($files as $file)
            {
                $count++;
                echo '<div class="slide"><a href=\"',$image_dir,str_replace('-thumb','',$file),'\"  class=\"highslide\" onclick=\"return hs.expand(this)\"><img src=\"',$image_dir,$file,'\" width=\"50\" height=\"50\" border=\"0\" /></a></div>';
                if($count == 0) { echo '<div class="clear"></div>'; }
            }
        }
        else
        {
            echo '<p>There are no images in this gallery.</p>';
        }
        
    ?>
    
            
            </div>
            <div id="leftarr" ></div>
            <div id="rightarr"></div>
        </div>
 
<script type="text/javascript">var moover = new milkyMoove({
                                                divname1: "inner",
                                                divname2: "inner2",
                                                divleftarr: "leftarr",
                                                divrightarr: "rightarr",
                                                milkyMoove_move_step: 2
                                            })
</script></div>
        
        
        
        
        
        
        
        <div id="footer">
        <hr />
            <div class="left">
                <p>Copyright 2009 Schloss Amerang<br />Impressum, AGB & Haftung</p>
            </div><!--end of left-->
            <div id="right">
                <div align="right"><a href="http://www.bios-pro.de/"><img src='http://img88.imageshack.us/img88/4128/biospro.jpg' border='0'/></a>&nbsp;&nbsp;<a href="http://www.bueffelsoft.com/"><img src='http://img692.imageshack.us/img692/7694/bueffelsoft.jpg' border='0'/></a>&nbsp;&nbsp;<a href="http://www.graphicfactory.de/"><img src='http://img692.imageshack.us/img692/93/graphicfactory.jpg' border='0'/></a></div>
            </div>
        </div><!--end of footer-->
    </div><!--end of container-->
</div><!--end of wrap-->
</body>
</html>
3
Contributors
10
Replies
11
Views
6 Years
Discussion Span
Last Post by Airshow
0

Aizel,

How is this line served ("view source" in the browser)?

hs.graphicsDir = '<?php get_bloginfo('template_url'); ?>/rssSlider/highslide/graphics/';

Does it give the correct path to your graphics?

Airshow

0

yes Airshow..actually that script is working fine when i remove it in wordpress i mean not in wordpress. i just embed it to wordpress so i put a wordpress tags for the links then the problem occured..

0

Aizel,

The page loads with various errors. To see them, load the page in Firefox, then look at Tools > Error Console.

Something odd is happening. Some included .css and all .js files are not being served. Another copy of the main page is served instead. Hence the errors. It appears to affect only those files in the path http://www.outsourcewebdevelopers.com/wp-content/themes/schloss/rssSlider/ .

The problem is probably caused by some MOD_Rewrite (server) rule invoked/installed by WordPress.

I haven't seen this before but it may be fixed by putting all the included files in a different path.

For a more informed opinion, I'm sure this type of problem will be discussed somewhere in the WordPress documentation or WordPress forums.

Good luck

Airshow

Edited by Airshow: n/a

0

i am having a hard time on this problem :( i tried WP Super Cache plugins and still not work..the solution is to change the image slider any suggestion Airshow?

0

Looking at your code (using the suggestion Airshow made with Firefox and the Error Console) - there was one error stating that "hs is not defined" from your main html page.

Looking at the page - I was wondering about this piece of code

<!--
    2) Optionally override the settings defined at the top
    of the highslide.js file. The parameter hs.graphicsDir is important!
-->

<script type="text/javascript">
hs.graphicsDir = '/rssSlider/highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.outlineType = 'rounded-white';
hs.fadeInOut = true;
hs.numberPosition = 'caption';
hs.dimmingOpacity = 0.75;

// Add the controlbar
if (hs.addSlideshow) hs.addSlideshow({
	//slideshowGroup: 'group1',
	interval: 100,
	repeat: true,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		opacity: .75,
		position: 'bottom center',
		hideOnMouseOut: true
	}
});
</script>

I didn't see a link or any reference to a file named highslide.js in the header. Could this possibly contain some of the functions you need to view the gallery?

0

i am having a hard time on this problem :( i tried WP Super Cache plugins and still not work..the solution is to change the image slider any suggestion Airshow?

I'm pretty sure you will have the same problem with other image sliders because external .js files are not being loaded.

Have you tried my idea to move .js and .css files out of the /wp-content/themes/schloss/rssSlider/ path (and to change the urls in <script> and <link> tags accordingly)?

Either that or try working without WordPress.

Airshow

0

@macgurl70
i tried your suggestion and still no changes..

Airshow
i also tried your idea to put the .js and .css to other folder and still no changes.. i tried to put not in wordpress the and works but i need to convert this project to wordpress.. http://siteone.biz/schloss/

i think the problem is the opendir on wordpress and i search how to fix this one and the solution is to complicated for me..edit MOD_write etc. :(

0

Aizel,

After a quick search for "Wordpress CSS Javascript", I found this.

It is possible that wp_enqueue_script and wp_enqueue_style might be worth trying.

Airshow
(Not a WordPress expert)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.