Can Krpano allow to Include Folder?

  • Hi,

    that's technically not possible - krpano is 'client-side' - that means it runs on the browser-side - and there it doesn't have access to the folder contents on the server.

    Although you could write a simple php script on the server that is collecting all xml files in that folder and generates a xml file where all these files get included.

    Best regards,
    Klaus

  • Here a quick try (untested) - a simple php script that should list all xml files in the current folder:

    E.g. save it as 'include_all.php' and include it in the xml via:

    Code
    <include url="include_all.php" />

    Best regards,
    Klaus

  • *thumbsup* *thumbsup* *thumbsup*

    it's work !! wow
    nothing to add... *love*
    Thank you very much
    I think it's a good feature.
    regards

    ps: For ppl interrested you need to upload it on a server to test, because php doesn't execute on local *whistling* *attention*

  • Hi,

    Not sure if you mean this but,
    Php stuff like:
    Krpano code...
    <?php. Php stuff ?>
    More krpano code..
    Works perfect
    Just call the file blabla.php and include it like that.

    Hope it helps
    Tuur *thumbsup*

  • Hi All
    Is there anyway to test in PHP <include url="include_all.php" /> which file it has been included inside.Test if embeded in the XML file


    Thank you *confused*

  • Here a quick try (untested) - a simple php script that should list all xml files in the current folder:

    Code
    \n";
            }
        }
        closedir($handle);
    }
    ?>

    E.g. save it as 'include_all.php' and include it in the xml via:

    Code

    Best regards,
    Klaus</include>

    Hello Klaus !
    Thanks for the 1.20.9 update, and this major feature => includexml(%file.xml%); that allow to import xml dynamicly...

    I'm trying then to create the same action as this exemple but dynamicly... include all file in the folder but with a loop to check if a new one come.

    it's work the first check, it get all xml on the folder but if i put another .xml file to the folder it doesn't get it.

    here is an example:


    <action name="xml_include">
    delayedcall(3,

    <!-- every 3sec we check to the folder if new xml come -->
    includexml("%SWFPATH%/xml/include_all.php");

    <!-- loop to the action -->
    xml_include();

    );
    </action>


    !! PHP file !!


    <krpano>
    <action autorun="preinit"> // create action trace..
    trace("
    <?php
    $dir = ("xml_folder"); //
    if ($handle = opendir($dir))
    {
    while (false !== ($file = readdir($handle)))
    {
    if ($file != "." && $file != ".." && substr($file,-4) == ".xml")
    {
    echo $file."\n";
    }
    }
    closedir($handle);
    }
    ?>
    ");
    </action>

    </krpano>


    can you help me ? if i've tested to put an action name and look to this one but it's not work too it's only get the file when the first check is do.

    regards

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!