rejetto forum
May 24, 2012, 10:14:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: bug or not bug topic to rejetto  (Read 1435 times)
0 Members and 1 Guest are viewing this topic.
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« on: October 01, 2007, 04:43:27 PM »

By consulting the documentation on wiki I found this

Embedding pages inside a template
If you put a whole HTML page under [a_name_you_choose] section, then it will be available at

http://YOUR_ADDRESS/~a_name_you_choose


Having tested, this is functional but not recursive in subfolders as it is possible with ~login: little bug

The risk is to have access for a user to a section [mysection] which we would like to keep  hidden. To by-pass the problem my solution is to create in the root a named virtual file "~mysection" and to put it hidden

Exepté for sections predefined in hfs, it would be possible that are effectively visible only sections such as [~mysection] and in all subfolders as with ~login?
If a name of section begins by ~, then it will be visible by the url only on this condition.

Modification possible in main.pas

 // provide access to any [section] in the tpl, included [progress]
  if (f = rootFile) and (urlCmd > '') then
    begin
    s:='~' +copy(urlCmd,2,MAXINT);
    if tpl.sectionExist(s) then
      begin
      getPage(s, data);
      exit;
      end;
    end;

thanks.

Logged
bacter
Operator
Insane poster
*****
Offline Offline

Spain Spain

Posts: 679


View Profile
« Reply #1 on: October 01, 2007, 06:31:11 PM »

perhaps when rejetto will implement the third form to define diff-templates as in todo list and treated in http://www.rejetto.com/forum/index.php?topic=3681.0 , you could have different templates in a hidden folder and you don't need to blow up your main template with many [sym-..]'s.
Logged

your computer has no brain - use your own !
Foggy
Insane poster
*****
Offline Offline

Australia Australia

Posts: 806


View Profile
« Reply #2 on: October 01, 2007, 09:40:19 PM »

by memory you cannot show files in the ~ sections because they are not a folder and have no files to display, so what is the point of this ~mysection?

And also I would like the user created sections to be recursive, if possible
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #3 on: October 02, 2007, 12:47:57 AM »

Having tested, this is functional but not recursive in subfolders as it is possible with ~login: little bug

it is not recursive by design. it works exactly as documented. thus it is not a bug.

Quote
The risk is to have access for a user to a section [mysection] which we would like to keep  hidden. To by-pass the problem my solution is to create in the root a named virtual file "~mysection" and to put it hidden

nice workaround.
but if anyone has such need, i could make [sections] optionally invisible, this way
[section|hidden]
but only if it is really useful.

Quote
Exepté for sections predefined in hfs, it would be possible that are effectively visible only sections such as [~mysection] and in all subfolders as with ~login?
If a name of section begins by ~, then it will be visible by the url only on this condition.

i guess this would break compatibility with most recent templates.
anyway, if such thing is needed, i could introduce an option like
[section|visible]
and all those who don't have it, are not accessible.

but what to do it depends on what people wants.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #4 on: October 02, 2007, 04:55:56 AM »

Sorry dear Rejetto
It seems to me simpler to identify a section as visible by preceding its name of one ~ ([~section]) that by a VISIBLE option, this in agreement with the fact that every visible section  can be already called by URL  http://........./~section

Among all the templates which I was able to study I did not find track of the use of this type of URL for sections others than those predefined in hfs, thus no risk of disrupting templates existing by my proposition

The usage of ~ seems to me a reference way for the special VISIBLE said use of sections, and simpler to understand for a greenhorn who discovers the usage of templates

**********************************************
Another remark concerning sections:

 If the one of her is in several copies
.
.
[test]
test1
.
.
[test]
test2
.
.

And what I use the url:  http://..../~test the shown resultat is: test2 on the web page
Only the last section of the same name is recognized the others are simply ignored (trymade with 6 TEST sections, only the last one appeared)
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11829


View Profile
« Reply #5 on: October 02, 2007, 05:10:09 AM »

It seems to me simpler to identify a section as visible by preceding its name of one ~ ([~section]) that by a VISIBLE option,

yes, it's simpler

Quote
Among all the templates which I was able to study I did not find track of the use of this type of URL for sections others than those predefined in hfs, thus no risk of disrupting templates existing by my proposition

i know there are users using this feature.
they would be pissed off by a change.
such a change is not very important, so why bother people.


Quote
Only the last section of the same name is recognized the others are simply ignored (trymade with 6 TEST sections, only the last one appeared)

yes i know.
that's the way it has to be.
Logged
rejetto forum
« Reply #5 on: October 02, 2007, 05:10:09 AM »

Do you like this software? Consider even $2
 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 17, 2012, 09:24:58 PM
anything