|
Post by kokenge on Aug 19, 2008 18:40:17 GMT -5
I have a html document in my project "aaa" with the following: <IMG SRC="media/resized/137-3705_IMG.JPG"> the image shows as it should.
However when I code do this in RunBasic with: html "<IMG SRC=""media/resized/137-3705_IMG.JPG"">" it does not show the image.
The path to the image is: C:/rbp101b2/projects/aaa/media/resized
What path should I be using in RunBasic. I tried several ways and not sure what is considered standard. Thanks for the help..
|
|
|
Post by mackrackit on Aug 19, 2008 21:17:21 GMT -5
Try a / in front of media and ' single quotes.
|
|
|
Post by kokenge on Aug 19, 2008 22:26:16 GMT -5
thanks mackrackit. Actually I tried that before and this don't work. html "<IMG SRC='/media/resized/137-3705_IMG.JPG'>"
|
|
|
Post by mackrackit on Aug 20, 2008 2:29:37 GMT -5
I did not read your post correctly. Images and other things like that have to be in the public directory. So if the directory media is a sub of public and resized is a sub of media, then
html "<IMG SRC='/media/resized/137-3705_IMG.JPG'>"
will work.
|
|
|
Post by kokenge on Aug 20, 2008 5:35:11 GMT -5
I do not want it in the public directory. This has always worked in all other versions of RB except the latest v2.
So I need to know what the path is to a sub directory in the project I'm working in. It would be a lot of work to change all my systems I already have working to a sub in the public directory.
|
|
|
Post by carlgundel on Aug 20, 2008 7:46:11 GMT -5
Files served up by the web server must be in the public folder. If you've been able to trick RB to do anything else this represents a very real security problem. Anyone would be able to look at files where they please. If you know how to reproduce this it would be helpful as a bug report.
-Carl
|
|
|
Post by kokenge on Aug 20, 2008 8:49:00 GMT -5
Basically I standardized on a structure that looks like this. 1- projects. The standard 'projects' directory in RB-2 2-- Project Name such as "album_project" 3--- data. This is where the SQLite DB is such as album.db and the schema layout, dumped data, CSV files. Basically anything to do with the SQL and any other data. 3--- images. This is where I hold images such as logo's, bullets, Up Down arrows, .. anything I use as images in the system. 4-- docs. This is where I keep documentation.
Are you saying I should put everything in the "public" directory.
My system worked very well, because everything was self contained. When I developed applications for download it was very simple for them to download everything into the RunBasic directory they decided to name it. Even if it was different than the package name I used. If I have to pick a name in the "public" directory, then it would be what I named it, not the project name they decide to call it.
I guess I'll have to figure out some way to make the "public" names follow the name they decide on when they download a package. Not sure how to do this yet??
If what you are saying is true, I have a lot of re-write to do!!
I might mention that, there is some confusion in directory names. For some reason RB seems to prefer the back slash (\) and html code prefers the forward slash (/). So basically I made a distinction for RB and HTML. I always named my directory names for RB ending in "dir" and those used in HTML ending in "path". So abcDir$ = "a/b/c" I use for RB and abdPath$ = "a/b/c" for HTML. Personally I don't like back slashes because the back slash is confusing with the lead in for special characters. Would be nice to use a single slash.
Have a great day.. Dan
|
|
|
Post by kokenge on Aug 21, 2008 5:18:49 GMT -5
Ok.. My stuff still works. For some reason, because of the new "projects" directory in RB-2, I thought I had to add it to my path in my album_project as in:
projectDir$ = "album_project" thumbPath$ = "../projects/";projectDir$;"/media/resized/"
But for some reason you do not have to add it to the path. So to get to directories within your projects, simply use: projectDir$ = "album_project" thumbPath$ = "../";projectDir$;"/media/resized/"
Then this works: html "<IMG SRC='";thumbPath$;"a2.jpg'>"
Thanks for the help..
|
|