We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19036
    • 119 Posts
    Hello !

    I don’t understand how can I adapt this code to create a new snippet, actually I changed one line (the path) but it doesn’t work.

    And I already created a folder named "slideshow" in /assets/snippet/ with the content that I try to call.

    Here is the php file:

    <?php
    // Developers: Fotis Evangelou - George Chouliaras
    // ***Last update: June 10th, 2007***
    */

    /*
    PLEASE READ THESE NOTES:
    - Adjust the parameters below per your needs.
    - Make sure you choose a FPSS template and set the width/height values.
    - Some of the following parameters have a yes/no state, which is defined by 1/0 (binary style). 1 means yes and 0 means no.
    */



    // Frontpage Slideshow (FPSS) Parameter Settings - START here

    $rootfolder = [(base_path)]"assets/snippets/slideshow"; // If you’re adding FPSS on another CMS, add a relative path here to the fpss.php file, e.g. add ’wp-content/themes/mytemplate’ when using Wordpress or just ’fpss’ if you uploaded everything to a folder called ’fpss’ in the root of your site.
    $width = 490; // FPSS width in pixels
    $height = 280; // FPSS height in pixels
    $use_mootools = 1; // Use Mootools engine or not. If not, the moo.fx engine will be used.
    $fpss_template = ’tt’; // Available templates on 1.6: default, fsd, jj_obs, jj_rasper, tt, uncut
    $sidebar_width = 140; // What is the sidebar width in pixels for the templates that have one?
    $hide_nav = 0; // Hide the navigation bar?
    $delay = 6000; // Delay between slides in milliseconds. 1000 means 1 second.
    $speed = 750; // Rotation speed in milliseconds. 1000 means 1 second.
    $open_links = 0; // Should all link open to a new window?
    // Mootools specific settings
    $mtCTRloadingTime = 500; // Preloader image delay time in milliseconds. 1000 means 1 second.
    $mtCTRrotateAction = ’click’; // Slides should switch on mouse click or when mouse hovers above navigation?
    // Available options: click, mouseover
    $mtCTRtext_effect = 0; // Use text transition effect?
    $mtCTRtransitionText = 1000; // Text transition effect time in milliseconds. 1000 means 1 second.
    // Content display settings
    $hide_title = 0; // Hide the slide title?
    $hide_introtext = 0; // Hide the slide text?
    $hide_readmore = 0; // Hide the slide ’read more’ link?
    // Frontpage Slideshow (FPSS) Parameter Settings - END here



    // Include the language, CSS and JS files
    include("includes/language.php");
    include("includes/css_js.php");
    ?>
    <!-- "Frontpage Slideshow" for all CMS 1.0.x (v1.6) starts here -->
    <div id="fpss-container">
    <div id="fpss-slider">
    <div id="slide-loading"></div>
    <div id="slide-wrapper">
    <div id="slide-outer">
    <!-- FPSS slides start here -->
    <!-- FPSS slide 01 -->
    <div class="slide">
    <div class="slide-inner"> <a<?php echo $target; ?> href="#changeURLhere" class="fpss_img"> <span><span style="background:url(<?php echo $rootfolder;?>/images/img01.jpg) no-repeat;"><span> <img src="<?php echo $rootfolder;?>/images/img01.jpg" alt="FPSS slide image" /> </span></span></span> </a>
    <div class="fpss_introtext">
    <div class="slidetext">
    <h1><a<?php echo $target; ?> href="test</a></h1>
    <p> BLa bla bla bla bla bla bla </p>
    <a<?php echo $target; ?> class="readon" href="#changeURLhere">Read more...</a> </div>
    </div>
    </div>
    </div>
    <!-- FPSS slide 02 -->
    <div class="slide">
    <div class="slide-inner"> <a<?php echo $target; ?> href="#changeURLhere" class="fpss_img"> <span><span style="background:url(<?php echo $rootfolder;?>/images/img02.jpg) no-repeat;"><span> <img src="<?php echo $rootfolder;?>/images/img02.jpg" alt="FPSS slide image" /> </span></span></span> </a>
    <div class="fpss_introtext">
    <div class="slidetext">
    <h1><a<?php echo $target; ?> href="#changeURLhere">TEST here</a></h1>
    <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum at urna id sapien lacinia adipiscing. Nulla ac ligula id lacus elementum varius. Phasellus gravida ligula sed tortor. Aliquam blandit urna ut ipsum. Nulla facilisi. Donec facilisis ultricies ipsum. </p>
    <a<?php echo $target; ?> class="readon" href="#changeURLhere">Read more...</a> </div>
    </div>
    </div>
    </div>
    <!-- FPSS slide 03 -->
    <div class="slide">
    <div class="slide-inner"> <a<?php echo $target; ?> href="#changeURLhere" class="fpss_img"> <span><span style="background:url(<?php echo $rootfolder;?>/images/img03.jpg) no-repeat;"><span> <img src="<?php echo $rootfolder;?>/images/img03.jpg" alt="FPSS slide image" /> </span></span></span> </a>
    <div class="fpss_introtext">
    <div class="slidetext">
    <h1><a<?php echo $target; ?> href="#changeURLhere">Title here</a></h1>
    <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum at urna id sapien lacinia adipiscing. Nulla ac ligula id lacus elementum varius. Phasellus gravida ligula sed tortor. Aliquam blandit urna ut ipsum. Nulla facilisi. Donec facilisis ultricies ipsum. </p>
    <a<?php echo $target; ?> class="readon" href="#changeURLhere">Read more...</a> </div>
    </div>
    </div>
    </div>
    <!-- FPSS slide 04 -->
    <div class="slide">
    <div class="slide-inner"> <a<?php echo $target; ?> href="#changeURLhere" class="fpss_img"> <span><span style="background:url(<?php echo $rootfolder;?>/images/img04.jpg) no-repeat;"><span> <img src="<?php echo $rootfolder;?>/images/img04.jpg" alt="FPSS slide image" /> </span></span></span> </a>
    <div class="fpss_introtext">
    <div class="slidetext">
    <h1><a<?php echo $target; ?> href="#changeURLhere">Title here</a></h1>
    <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum at urna id sapien lacinia adipiscing. Nulla ac ligula id lacus elementum varius. Phasellus gravida ligula sed tortor. Aliquam blandit urna ut ipsum. Nulla facilisi. Donec facilisis ultricies ipsum. </p>
    <a<?php echo $target; ?> class="readon" href="#changeURLhere">Read more...</a> </div>
    </div>
    </div>
    </div>
    <!-- FPSS slides end here -->
    </div>
    </div>
    </div>
    <div id="navi-outer">
    <div class="ul_container">
    <ul>
    <?php
    include("includes/navbar01.php");
    /* Using Mootools? */
    if ($use_mootools) {
    ?>
    <!-- FPSS navigation button 01 -->
    <li><a class="button off" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">01</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img01.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 02 -->
    <li><a class="button off" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">02</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img02.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 03 -->
    <li><a class="button off" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">03</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img03.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 04 -->
    <li><a class="button off" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">04</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img04.jpg" alt="FPSS Navigation" /></a></li>
    <?php
    /* Using Moo.fx? */
    } else {
    ?>
    <!-- FPSS navigation button 01 -->
    <li><a class="navi" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">01</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img01.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 02 -->
    <li><a class="navi" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">02</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img02.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 03 -->
    <li><a class="navi" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">03</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img03.jpg" alt="FPSS Navigation" /></a></li>
    <!-- FPSS navigation button 04 -->
    <li><a class="navi" href="javascript:void(0);"<?php if ($fpss_template == ’uncut’) { echo ’ onclick="parent.location=#changeURLhere;return false;"’;}?>><span class="fpss_key">04</span><span class="fpss_keytitle">Item title</span><img src="<?php echo $rootfolder;?>/images/img04.jpg" alt="FPSS Navigation" /></a></li>
    <?php }
    include("includes/navbar02.php");
    ?>
    </ul>
    </div>
    </div>
    </div>
    <!-- "Frontpage Slideshow" static version-->
    ?>


    After that I have the following bug on my homepage:

    modx-0.9.6\manager\includes\document.parser.class.inc.php(766) : eval()’d code on line 22
    _____________________________________________________________


    Now I’m blocked and I don’t understand how to continue...

    Does anybody have an idea ?

    Thanks a lot for you help
    Mehdi
      Scuse my english...I&#39;m swiss
      • 19036
      • 119 Posts
      Thanks already... that nearly works !
      But ...now why it doesn’t find the directory for these 2 links ?

      // Include the language, CSS and JS files
      include("includes/language.php");
      include("includes/css_js.php");
      ?>


      And gimme this error:

      PHP error debug
      Error: include(includes/language.php) [function.include]: failed to open stream: No such file or directory
      Error type/ Nr.: Warning - 2
      File: C:\Documents and Settings\MEHDI\Bureau\LORDS_modx\modx-versions install\modx-0.9.6\manager\includes\document.parser.class.inc.php(766) : eval()’d code
      Line: 47

      _______________________________________________________

      If I give the path one time do I need to do the same for all the documents linked to the folder ?

      Thanks
      Mehdi

        Scuse my english...I&#39;m swiss