Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 2-Nov-2011 10:20:06

ozario
Member
Registered: 2-Nov-2011
Posts: 1

How to save project for web without ftp?

Hi,
Im very new to Openspace3d. It would be great if you guys could tell me how to save my project as a web site locally without using ftp.

Thank you,
Rithesh

Offline

#2 2-Nov-2011 11:15:19

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: How to save project for web without ftp?

Hi and welcome,

You need a local HTTP server (Apache2, Lamp, ...) and save all files with your file manager or other software.

Offline

#3 2-Nov-2011 19:37:46

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

Hi !

If you want to execute you project on local system but integrated in the web page, you can create an html page like this :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Example</title>
  <link rel="stylesheet" href="style.css" type="text/css" />
  <script type="text/javascript" src="scol.js"></script>
  <script type="text/javascript">
    function scolMessageCallback(msg)
    {
      // manage call formated with "keyword param"
      // get first word
      // Warning IE doesn't return the same result as others
      var reg = /^([A-Z0-9]*) ([?]*)/im;
      var word = msg.match(reg);
      
      var param ="";
      if (word)
      {
        //IE !!
        var keyword = word[0];
        //IE force trimm !!
        keyword = keyword.replace(/^\s+|\s+$/g,"");
        
        //Get param value
        param = msg.slice(keyword.length);
        switch (keyword)
        {
        case "OS3DPlayerLoading":
          //document.getElementById("info").innerHTML = document.getElementById("info").innerHTML + param + "<br/>";
          break;
        case "OS3DPlayerError":
          document.getElementById("scoldiv").innerHTML = "<div style=\"background-color:#ffffff; text-align:center; color:#000000;\">" + param + "</div>";
          break;
        //try to execute msg as JS code
        default:
          eval(msg);
        }
      }
      //try to execute msg as JS code
      else eval(msg);
    }
    
    function scolEndCallback()
    {
      //Your code here
      //window.location = "http://mysite.com/end.html"
    }
    
    function scolErrorCallback(div, dlurl, error)
    {
      var n=document.getElementById(div);
      n.innerHTML="<div style=\"background-color:#ffffff; text-align:center; color:#000000;\">The Scol Voyager plugin is not detected, please download it and install from <a href=\"" + dlurl + "\" style=\"color:#0000ff;\">" + dlurl + "</a></div>";
    }
    
  </script>
</head>

<body style="background-color:#$BGCOLOR;">
  <div align="center" id="scoldiv">
    <script type="text/javascript">
      var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22SAMPLEDIRECTORY%2FSAMPLE.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 1, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");
      scolObj.write("scoldiv");
      scolObj.launch();
    </script>
  </div>
  
  <p align="center"><img src="logo_os3d.png" width="150" height="114"></p>
</body>

</html>

you must have the scol.js in the same directory of you html page.
the scol.js is in your program files\scol voyager\Partition_LockedApp\tools\os3dlib\res\web\scol.js

Offline

#4 2-Nov-2011 19:51:19

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

then after. i put that code of html and my javascript at my xampp/htdocs..... it's only appear scol navigator plugin........ how to open the file that i have exported?
or i should call the xos file???

Offline

#5 2-Nov-2011 19:53:39

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

I forgot to explain smile

replace SAMPLEDIRECTORY%2FSAMPLE.xos
by :
yourprojectfolder(in scol partition)%2fyourprojectfile.xos

you don't need http serveur for this

Offline

#6 2-Nov-2011 19:59:16

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: How to save project for web without ftp?

arkeon wrote:

you don't need http serveur for this

In this case, no access from internet (only addriangembel)

Offline

#7 2-Nov-2011 20:01:15

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

yes... it's like a localhost server right.... i have replace that.. it should be like this right??

var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 1, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");

Offline

#8 2-Nov-2011 20:04:13

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

without the C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\
%2f correspond to / ans %20 to the space for example, but in your case you only need :
%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0

Offline

#9 2-Nov-2011 20:10:21

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

if i change like that then it doesn't appears anything... just a white page and a text like thi "scol navigator plugin" there is nothing there.... just a white screen

here if i put the xos file at the same folder with the HTML file... how should i change the code???? i was bad at web

Offline

#10 2-Nov-2011 20:16:28

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

The xos file must be in your scol partition (here C:\Documents and Settings\addrian\My Documents\Scol Voyager\Partition_LocalUsr\) for example
In the html params you only need the xos file relativ to the scol partition (not the full path)

var scolObj = new SCOLObject ("scol", "%5fload+%22tools%2Fos3dplayer%2Fos3dload%2Epkg%22%0amain+%22last.xos%22+%22SAMPLEAPP%22+%22800%22+%22600%22+0", "", "", "100%", "100%", 2, "scolMessageCallback", "scolErrorCallback", "scolEndCallback");

sorry my mistake ^^ the next param must be 2 not 1 for local script

Offline

#11 2-Nov-2011 20:20:39

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

yeahhh i ce then... it finally works.. thanks mr arkeons..... verry2 helping..... and you are a quick respons guy i have ever seen from a forum.... in another forum i must wait about an hours to get the answer.... thanks very much

Offline

#12 2-Nov-2011 20:21:24

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

you're welcome smile

Offline

#13 2-Nov-2011 20:24:26

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

ah one more thins... i tried to change the height of the frame to 200% but it doesn't work... why it is???

Offline

#14 2-Nov-2011 20:25:51

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

200% means 2x your page height
for pixels use 800 600 for example without the %

Offline

#15 2-Nov-2011 20:31:04

addriangembel
Member
Registered: 1-Oct-2011
Posts: 46

Re: How to save project for web without ftp?

ahahahha i didn't look at the %..... lol.....overall my project was at the finishing touch.... some guide... i'll write it at my thread

Offline

#16 28-Feb-2012 16:58:20

appomattox
Member
Registered: 28-Feb-2012
Posts: 2

Re: How to save project for web without ftp?

hi there! it's my first time here big_smile

how can i fix this? i mean, change sizes to 800 x 600
File


thank you!!

Offline

#17 28-Feb-2012 17:02:08

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 4,821
Website

Re: How to save project for web without ftp?

You can just edit the html file to correct the size.

Offline

#18 28-Feb-2012 22:54:48

appomattox
Member
Registered: 28-Feb-2012
Posts: 2

Re: How to save project for web without ftp?

yep thank you... works perfecty big_smile

Offline

Board footer

Powered by FluxBB