Publishing on website instructions?

Everything else that doesn't fall into one of the other categories.
Greippi
Posts: 2
Joined: Thu Sep 19, 2024 7:09 am

Publishing on website instructions?

Post by Greippi »

Hi,

Over the years, my internet development skills have deprecated almost entirely. I do remember HTML existed. Also, the internet files need to be available for the browser on a web server, which is a requirement. Oh yes, the main file is usually named "index.html". But what if I do a rather complex program on SpiderBasic and want to publish it on my website?

Is there a good and clear and simple instruction page for publishing a web app which has been made with Spider Basic?

I'd love to have more detailed information about "Creating an App" page.

For instance, where should the files go? And what should the permissions be to keep the site safe?

Back to school... I guess.
Any help would be awesome!


Cheers,
Greippi
plouf
Posts: 295
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Publishing on website instructions?

Post by plouf »

hi and welcome

1. when "create app" also check "copy spiderbasic libraries"
2. copy all files and folder inside "created app folder" anywhere to a webserver
3. (optionally) rename createdap.html to index.html

then open it in your browser
if you copy it with a ftp client for example at www/greipi.com/html/ xxxx (possible example of your server)
you open it via www.greipi.com/ (index.html is omited)

this is the most generic and most probably enought, your hosting company may have have some diffirences but minor
Christos
User avatar
skywalk
Posts: 55
Joined: Tue Feb 25, 2014 2:13 am
Location: Boston, MA

Re: Publishing on website instructions?

Post by skywalk »

I was hoping to show an QR code image on a web page and use Google Authenticator to read the image.
Google Authenticator will not scan the image if I load it into a simple html page and view in a chrome tab.
It only fires up with a web server page, so I thought to try it in SpiderBasic.

But now after a time away from Spiderbasic, I have errors getting example code to run from the IDE.
Do I have to Create web app for the example code to run?
I get loading error when running directly from the IDE with default compiler settings.

Code: Select all

Procedure Loaded(Type, Filename$, ObjectId)
  ; Display image in a new window
  OpenWindow(#PB_Any, 10, 10, ImageWidth(ObjectId), ImageHeight(ObjectId), "Image")
  ImageGadget(#PB_Any, 0, 0, ImageWidth(ObjectId), ImageHeight(ObjectId), ImageID(ObjectId))
EndProcedure
Procedure LoadingError(Type, Filename$, ObjectId)
  Debug Filename$ + ": loading error"
EndProcedure

; Register the loading event before calling any resource load command
BindEvent(#PB_Event_Loading, @Loaded())
BindEvent(#PB_Event_LoadingError, @LoadingError())
;;OpenFileRequester("*.png",
LoadImage(0, "C:\ProgramData\SpiderBasic\Examples\Data\Spider.png");, #PB_LocalFile)
;LoadImage(0, "C:\dev-try\Authenticator\WIN_20250325_11_47_42_Pro.jpg", #PB_LocalFile)
When working toward the solution of a problem, it always helps if you know the answer. ~ ?
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing. ~ Weber
plouf
Posts: 295
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Publishing on website instructions?

Post by plouf »

you cant direct access local drive files in a webbrowser (like a purebasic program can)
you can only use filerequest to let user to specifically use and open first ! (security shit)
Christos
User avatar
skywalk
Posts: 55
Joined: Tue Feb 25, 2014 2:13 am
Location: Boston, MA

Re: Publishing on website instructions?

Post by skywalk »

Yeah, I get that, but I thought SpiderBasic would compile the image into the safe browser space?
Do I have to put the image in a DataSection and CatchImage?
When working toward the solution of a problem, it always helps if you know the answer. ~ ?
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing. ~ Weber
Mindphazer
Posts: 4
Joined: Mon Mar 17, 2025 9:20 am

Re: Publishing on website instructions?

Post by Mindphazer »

skywalk wrote: Thu Mar 27, 2025 8:31 pm Yeah, I get that, but I thought SpiderBasic would compile the image into the safe browser space?
Do I have to put the image in a DataSection and CatchImage?
CatchImage doesn't exist in SB...
User avatar
skywalk
Posts: 55
Joined: Tue Feb 25, 2014 2:13 am
Location: Boston, MA

Re: Publishing on website instructions?

Post by skywalk »

Ha! Didn't know that?
So, if I can store the bytes of an image in my DataSection, I forget how to retrieve that into an image.
Would that be blocked in browser?
When working toward the solution of a problem, it always helps if you know the answer. ~ ?
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing. ~ Weber
User avatar
skywalk
Posts: 55
Joined: Tue Feb 25, 2014 2:13 am
Location: Boston, MA

Re: Publishing on website instructions?

Post by skywalk »

I looked through some historical posts, and it is not clear how to store binary images for later use in SpiderBasic.
Is the DataSection the right place to store images?
When working toward the solution of a problem, it always helps if you know the answer. ~ ?
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing. ~ Weber
User avatar
Paul
Posts: 210
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Publishing on website instructions?

Post by Paul »

Is there a reason you can't load your images from a resource folder?

(See "Examples" folder "Waponez Web")
Post Reply