rejetto forum

server-root

Colonia · 19 · 12641

0 Members and 1 Guest are viewing this topic.

Offline Colonia

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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....
Background info:
HFS: 2.3 beta  (build 260)
Windows 7 64bit (running HFS as user only)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
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


Offline Colonia

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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?
Background info:
HFS: 2.3 beta  (build 260)
Windows 7 64bit (running HFS as user only)


Offline Colonia

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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)
« Last Edit: May 06, 2010, 05:43:18 AM by Colonia »
Background info:
HFS: 2.3 beta  (build 260)
Windows 7 64bit (running HFS as user only)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Quote
- 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. ;)
« Last Edit: May 06, 2010, 12:16:23 PM by SilentPliz »


Offline Colonia

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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
Background info:
HFS: 2.3 beta  (build 260)
Windows 7 64bit (running HFS as user only)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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".


Offline Colonia

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
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.
Background info:
HFS: 2.3 beta  (build 260)
Windows 7 64bit (running HFS as user only)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
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
« Last Edit: May 09, 2010, 02:21:21 AM by SilentPliz »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
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.

Quote
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.


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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]??


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2068
    • View Profile
special:import from rawr template , take model on it

Quote
[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
.}

 ;)


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
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]
« Last Edit: May 11, 2010, 02:08:21 PM by SilentPliz »


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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.


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Quote
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
« Last Edit: May 11, 2010, 02:42:14 PM by SilentPliz »