rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: Colonia on May 05, 2010, 09:45:31 PM
-
Hello dear community - ciao Rejetto!
first of all thanks for this very-very good peace of software.
I have been looking through the forum, FAQs and manuals but I can not find answer to the folowing:
- Is there a variable for the server-root?
I think this would be a huge help to customize the templates. I had a look into the customized templates and everyone is referencing to images and icons somewhere, but not in the server root.
I was expecting to have something like an image folder on the same level as the HFS.exe to feed the template by using something like:
<img src="%server-root%/image/smile.png">
Or maybe I just missed something....
-
Welcome Colonia :)
For the example you give, this is sufficient:
<img src="/image/smile.png">
/ = root
... and for variables:
http://www.rejetto.com/wiki/index.php/HFS:_Template
-
HI SilentPliz, this is for the document root ok yes. And if I like to create an individual page it is THE solution.
What I am looking for is a place to put common images into.
If I change the virtual or real folder I need to copy all the images into that folder again, right?
-
Dear all.
OK - I tried the following:
- bind root to: /images (a folder in the server root)
- added an image (test.gif) to that folder
- added a line to the template: <img src="/test.gif">
- tested it: image was there - but also the file in the listing.... :-(
- right mouse button on image file: hidden
- tested it: NO image :-((
Edit:
Found that one just a minute ago. That's exactly what I have done. But hiding the file ends in not showing.
http://www.rejetto.com/forum/index.php/topic,6660.0.html
Background info:
HFS: 2.3 beta (build 260)
Windows 7 64bit (running HFS as user only)
-
- right mouse button on image file: hidden
try: right mouse button on images folder: hidden
You don't log directly into your image folder for your tests, otherwise you'll see the list again. ;)
-
puhhh, yes this works.... not ideal - but a solution.
Here in detail for all:
create two folders where you put your pictures in....
- (path to HFS.EXE server folder)/http_sources/images/mypicture.png
- in Windows make both folders (http_sources and images) hidden
- sources like the example mypicture.png must be NOT-hidden
- right mouse click on root in HFS server Virtual File System: "Bind root to real folder" and select "http_sources"
Now you can add and reference pictures and other includes in the tpl-template like this example:
- /images/mypicture.png
-
to me, it seems you are doing it the hard way.
try just adding the "images" folder on your hard disk to HFS, as "real folder".
then you can hide "images" in HFS directly.
if you will ever move this folder to a different place, you will right click on the "images" folder (in HFS) and then "edit resource".
-
Ciao Rejetto,
I do not agree, sorry.
Yes it would be great as I could work from the server alone, without messing with Windows (hidden files...).
But I do not like the idea of having absolute path' relativ to Windows in the .tpl.
Moving the place of the server would mean I need also need to adjust the tpl, while if I do not need to do anything if done as mentioned above.
Zip the folder and extract where ever I like it is all I have to do.
And this way it is easier to exchange new templates with the HFS community - as all images are included in the package.
-
Hi,
It seems there is some misunderstanding in this exchange, perhaps they are due to various translations.
Yes it would be great as I could work from the server alone, without messing with Windows (hidden files...).
When we speak of "hidden files" or "hidden folders", it's a setting flags in HFS, nothing to do with Windows.
VFS > selected file(s) or folder(s) > right click > Properties... > Flags > checkbox hidden
But I do not like the idea of having absolute path' relativ to Windows in the .tpl.
All the examples in this thread are relative paths to the root of the server ... here again, nobody spoke of absolute paths relative to Windows.
.....
Zip the folder and extract where ever I like it is all I have to do.
And this way it is easier to exchange new templates with the HFS community - as all images are included in the package.
The rejetto's suggestion is the solution normal (logic) ... it allows you to get exactly what you wrote above.
...and the link is the same in your template no need to change it:
/images/mypicture.png
-------------------------
For example, you can test this:
- create a folder named images in the folder of hfs.exe
- add this in the section [special:import] (create this section if it does not exist in your template):
[special:import]
{.add folder|real|images.}
{.set item|/images|hide=1.}
{.set item|/images|no log=1.}
This will automatically add the folder images in the VFS root.
This is useful to distribute packages of templates, among other things
-
But I do not like the idea of having absolute path' relativ to Windows in the .tpl.
the only place you would have the absolute path is the .vfs file, not the .tpl
The tpl will always use URL to refer to files, and all your images will be in /images. No change.
And this way it is easier to exchange new templates with the HFS community - as all images are included in the package.
if the point is to share your template, then follow SP's advices.
-
For example, you can test this:
- create a folder named images in the folder of hfs.exe
- add this in the section [special:import] (create this section if it does not exist in your template):
[special:import]
{.add folder|real|images.}
{.set item|/images|hide=1.}
{.set item|/images|no log=1.}
This will automatically add the folder images in the VFS root.
This is useful to distribute packages of templates, among other things
Read wiki on add folder but can't get this to work here?
Found nothing on wiki about [special:import]??
-
special:import from rawr template , take model on it
[special:import]
{.copy|%folder-resource%\RAWR-Template-0.1.2.tpl|..}
{.add folder|real|template.}
{.set item|/template|hide=1.}
{.set item|/template|no log=1.}
{.dialog|
Thank you for choosing the RAWR-Template!
Remember to check for updates and visit us at:
http://www.RAWR-Designs.com
.}
;)
-
Read wiki on add folder but can't get this to work here?
Once you've made the changes, reload your template:
Menu > HTML template > Change file...
It's probably the problem.
-----------------------------------------------------------
Check if you don't have two sections [special:import] in your template. ;)
Do a search on the forum, there are some hits about [special:import]
-
Once you've made the changes, reload your template:
Menu > HTML template > Change file...
It's probably the problem.
-----------------------------------------------------------
Check if you don't have two sections [special:import] in your template.
Do a search on the forum, there are some hits on [special:import]
While I didn't reload tpl I did close hfs, then restart (also cleared browser). I'd think the result would be the same?
I'm sure I didn't have 2 [special:import] in tpl. Now I have none :)
Mars,
Thanks for the example.
-
While I didn't reload tpl I did close hfs, then restart (also cleared browser). I'd think the result would be the same?
If this does not work that way, probably it's not the good way. :-\ ???
rejetto heeeelpp ! :D
-
[special:import] is executed only when you CHANGE the current template to another which has not the same name, the best way is to retore the default and reload your template every time you change the section import.
-
OK
Didn't know that Mars.
It might be helpful to others if this info were added to the wiki?
I'll try it again later. Work time soon.
Thanks
-
It might be helpful to others if this info were added to the wiki?
It is very likely that in a rather close future, we add an option in start/exit of the genre: 'force special:import at start'
with the default template the section special:import has a bug and i am seaching a solution about.
the solution is done here: http://www.rejetto.com/forum/index.php/topic,8564.0.html
-
As you said, when I changed tpl, special:import folder appeared in vfs
as if by magic ;D
Thanks Mars and SilentPliz