[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] Absolute / relative paths problem
From:       Břrge_Holen <borge () arivene ! net>
Date:       2007-03-17 19:48:41
Message-ID: 200703172048.42087.borge () arivene ! net
[Download RAW message or body]

On Friday 16 March 2007 17:39, Eric Laffoon wrote:
> On Friday 16 March 2007 2:51 am, Břrge Holen wrote:
> > On Friday 16 March 2007 10:05, Oliver König wrote:
> > > On Friday 16 March 2007 09:14:38 Eric Laffoon wrote:
> > > > On Thursday 15 March 2007 11:51 pm, Oliver König wrote:
> > > > > On Friday 16 March 2007 01:49:18 Eric Laffoon wrote:
> > > > > > On Thursday 15 March 2007 1:30 pm, Oliver König wrote:
> > > > > > > Hello,
> > > > > > > I have got a website on a remote server. All files on the
> > > > > > > website use absolute paths to other files and images:
> > > > > > >
> > > > > > > Document root (in Apache is):
> > > > > > > /www/htdocs/
> > > > > > >
> > > > > > > For example the file index.html in /www/htdocs/ has an image:
> > > > > > > <img src="/images/img.png">
> > > > > > > and a link to another page:
> > > > > > > <a href="/folder/page.html">page</a>
> > > > > > > Apache then looks at /www/htdocs/images/img.png for the image
> > > > > > > and at /www/htdocs/folder/page.html for the file.
> > > > > > >
> > > > > > > I downloaded all files to /www/htdocs/ on my Notebook. I opened
> > > > > > > Quanta 3.5.6. I created a new Quanta project and in "Directory
> > > > > > > Settings" I defined /www/htdocs/ as the main directory and
> > > > > > > inserted all files from /www/htdocs/ into the project.
> > > > > > >
> > > > > > > Problem:
> > > > > > > When I open a html file in Quanta with the VPL editor or the
> > > > > > > preview the images do not display and the hyperlinks do not. It
> > > > > > > looks like Quanta cannot handle absolute links. How can fix
> > > > > > > this problem without changing all references from absolute to
> > > > > > > relative?
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > Oliver
> > > > > >
> > > > > > This is funny. First I thought you were dealing with temp files,
> > > > > > then I re-read it. Quanta does handle absolute links. The problem
> > > > > > is you not differentiating between the file tree and the server
> > > > > > tree. You have absolute document root links - "/images/img.png"
> > > > > > and absolute file linkes -  /www/htdocs/folder/page.html. So the
> > > > > > question is, what does "absolute" men to you?
> > > > >
> > > > > I mean absolute document root links.
> > > >
> > > > I know, but you used both as if interchangeable.
> > >
> > > Sorry.
> > >
> > > > > > Quanta is inherently in your file system, not
> > > > > > your web server and interprets absolute in reference to your file
> > > > > > system as it is not privileged to know you intend to mirror a
> > > > > > server system...
> > > > >
> > > > > Does that mean Quanta does not handle absolute document root links.
> > > >
> > > > No of course not! It means you haven't told it to use this.
> > >
> > > Good!
> > >
> > > > > In
> > > > > Dreamweaver I never had a problem with the absolute document root
> > > > > links.
> > > >
> > > > We're not Dreamweaver, which is why a lot of people will never go
> > > > back. We don't really care what they do, like use the site as a
> > > > repository, eschew version control and use proprietary hacks to make
> > > > HTML do what should have been done with PHP. However we do have to
> > > > accommodate people who got locked into their approach.
> > >
> > > I did not say that to insult you. I just wanted to say that in
> > > Dreamweaver this feature is available and was easy to use.
>
> It's easy enough to use in Quanta too.
>
> > It not as much a feature as a way of setting up links, witch is userbased
> > and not something a program should ever try to take care of. That would
> > put you off whenever you actually IS going to use both in a site.
>
> Which is typical of solutions in the Windows world. Out of date thinking
> based on old technology designed to create user dependency on buying their
> software. Conversely we strive to be interoperable and to help people to be
> more enabled in their design decisions.
>
> > > Apart from that I believe that Dreamweaver has some very good strengths
> > > (like the WYSIWYG mode which works very well and produces good code)
>
> Their WYSIWYG only recently started producing reasonably good HTML and like
> all WYSIWYG it munches your whole page and doesn't work well with server
> side scripting. And it doesn't render accurately. Our visual design is not
> mature and we have had trouble getting users to support it's development.
> However it still does things Dreamweaver and others absolutely cannot.
> 1) Conforms strictly to your DTD when tagging
> 2) Alters only the nodes you edit
> 3) renders much better
>
> Unfortunately visually drawing pages ends up far less efficient than
> programatically building then with server side scripting and invariably
> really good design always requires manual tweaking.

Only thing DW is useful for is inserting position tags.
Designers should take more care of accurate image measure, witch would exclude 
my previous statement.

That should infact be one of Q first resolved issues, nah maby not, but it 
would be far up my list over things to do.

Anyway, the point of dynamic pages can't use visual rendering, since you 
probaly want to redraw only parts of the particular page

>
> > I'm sorry, just got to comment and example this one.
> > Do these simple steps:
> > * make three layers on a blank page ( blank for your case, not the
> > example) * delete layer nr 2
> > * now take a look on your code and tell me its still good.
> >
> > That was the easiest example of code f*up I could comeup with.
> > For easy layouts and html, just for getting the code parts, its perfekt.
> > If you ever try to actually use DW with PHP, it will will soon show some
> > rather defective cracks.
> >
> > > and it
> > > has some weaknesses like support for PNG
> >
> > didn't know
> >
> > > , no support of sdtp/fish
> >
> > witch in fact is spectacular, and one of the reasons that none of the
> > webdesigners I know use it...
> >
> > > and that
> > > it is not available for Linux. But I don't want to compare Quanta with
> > > DW here.
> >
> > You did that quite much on the previous mails.
>
> LOL
>
> > > > > > First of all it is recommended not to use absolute references in
> > > > > > your site for this very reason.
> > > > >
> > > > > It would take years to change all the links in my website to
> > > > > relative document root. the advantage of the absolute document root
> > > > > links is that I can move any html file to any directory or
> > > > > subdirectory below document root and all links and refenrences will
> > > > > always work.
> > > >
> > > > You could change them in minutes with KFilereplace if you wanted to.
> > > > You can also use the base tag in HTML to accomplish this. I
> > > > personally set up a per directory addressing file using PHP and give
> > > > it the same name in all directories, then include it in all files.
> > > > That way I can also manage included files and files across
> > > > subdirectories.
> > >
> > > You are rgith that I would not take much time but I don't see a good
> > > reason for changing from absolut doc root to relative doc root (yet).
> >
> > Why are you asking these questions again?
> >
> > > To be honest
> > > I don't know what you mean by "You can also use the base tag in HTML to
> > > accomplish this". Sorry for that but would you explain? Thanks!
> >
> > Wuut? I can go for an explenation too
>
> Click on the document icon on the right dock in quanta. Now right click
> where you can download documentation and grab the HTML docs. Once it's
> installed look in the document head are for the <base> tag. Using <base
> href="mysite.com"> in a file means that even if you are viewing it locally
> on your file system or from another domain all relative links will start at
> the href.

Jup found it, and at the same time can tell that debian/testing is currently 
broken in that area... 

>
> So using relative links with a base tag means you could insure even if
> people save the page locally it jumps back to your site and by replacing
> across your site you can move the reference easily. You can also use PHP
> and do something like this...
>
> <?php
> if ($_SERVER['HTTP_HOST'] == "mydomain.com")
> 	print "<base href=\"mydomain.com\">";
> else
> 	print "<base href=\"$localpath\">";
> ?>
>

Got it.

> > > > > > Quanta can also deal with projects setting a project
> > > > > > preview which is typically used to see PHP through a local
> > > > > > server. Provided you have Apache running this works, and it
> > > > > > should work without it for HTML as it is just setting a
> > > > > > reference. Alternately you could set a <base> tag too, but then
> > > > > > that's just another way of making things interesting with what
> > > > > > you're doing.
> > > > >
> > > > > I don't have Apache running on my notebook (but I could do that if
> > > > > needed). So, what should I do now?
> > > >
> > > > I am not sure if you need it. I always do for PHP, but if you are
> > > > just pointing there in a file tree address it should work assuming
> > > > the address is accepted.
> > > > If not then using Apache will certainly work and as a bonus
> > > > you can integrate server side scripting at any time and live test it.
> > > > Just look at the project preview address in the project dialog and
> > > > put your document root in there. If it doesn't accept a file:/
> > > > address set up Apache and use http://localhost/.
> > >
> > > Actually, you are right that it would be best to run Apache. then I
> > > could test the PERL scripts and SSI locally.
> > >
> > > Thanks for your feedback.
>
> sure np

-- 
---
Břrge
Kennel Arivene 
http://www.arivene.net
---
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic