I've been working on a prototype of the Inkscape news using WordPress, but am having trouble as URIs for archives come out like "/archives/2005/01/". Due to the relative paths used on the website, the browser then can't locate the stylesheets, and links point to the wrong place on those pages.
So... does it matter if I change to absolute paths? (Which, IMHO, are better anyway)
On Thu, 2005-03-10 at 20:02 +0000, Jonathan Leighton wrote:
I've been working on a prototype of the Inkscape news using WordPress, but am having trouble as URIs for archives come out like "/archives/2005/01/". Due to the relative paths used on the website, the browser then can't locate the stylesheets, and links point to the wrong place on those pages.
So... does it matter if I change to absolute paths? (Which, IMHO, are better anyway)
Well, before you do any changes, why don't you show us all what you have done so far. Absolute paths make testing the site difficult on other peoples machines. Also, then the site is not very portable. One of the reasons I'm not totally sold on CMS' or blog management systems is that aforementioned do these types of hard-path/absolute path which then won't allow developers to test wherever they like on their own machine, and then have dependency-laden code break without installing X, Y, and Z. However, maybe your work will prove me wrong ;)
Jon
Isn't it possible to substitute the relevent relative path as part of the template?
-mental
mental@...3... wrote:
Isn't it possible to substitute the relevent relative path as part of the template?
There is a settings value in WordPress that is called like this: <?php echo get_settings("siteurl"); ?>. That returns the URI of the site's base directory (you can also get the template's URI if you're using that). So I *could* use that in conjunction with the current relative paths to form an absolute URI for everything. But that would mean making *every* link on included pages (the header, footer, sidebar etc.) into an absolute URI (not to be confused with an absolute path -- absolute URIs start with the protocol like "http://"), and making *every* page depend on WordPress. Given that Bryce is already sceptical about using WordPress I don't think it would be the best thing to do (although I'd be happy to if people want me to).
That said, we could make a settings constant for the Inkscape website containing the base URI. However, it would still cause problems for people testing locally as they'd need to change it to suit themselves.
From the docs, it looks like it rather takes care of itself. I had no problem installing it as http://server/blog/etc....
http://codex.wordpress.org/Installing_WordPress#In_a_Subdirectory
Jonathan Leighton wrote:
mental@...3... wrote:
Isn't it possible to substitute the relevent relative path as part of the template?
There is a settings value in WordPress that is called like this: <?php echo get_settings("siteurl"); ?>. That returns the URI of the site's base directory (you can also get the template's URI if you're using that). So I *could* use that in conjunction with the current relative paths to form an absolute URI for everything. But that would mean making *every* link on included pages (the header, footer, sidebar etc.) into an absolute URI (not to be confused with an absolute path -- absolute URIs start with the protocol like "http://"), and making *every* page depend on WordPress. Given that Bryce is already sceptical about using WordPress I don't think it would be the best thing to do (although I'd be happy to if people want me to).
That said, we could make a settings constant for the Inkscape website containing the base URI. However, it would still cause problems for people testing locally as they'd need to change it to suit themselves.
Yeah, I know it's possible using either <?php echo get_settings("siteurl"); ?> or absolute paths, but we don't want the *whole* site to be dependent on WordPress, and absolute paths cause problems for people testing locally, that's the problem.
Anyway, what I will do is set the site up just using querystrings for now. Then, if and when people like WordPress, we can review using either absolute paths or WordPress-depending the whole site. It isn't a life-or-death matter, so I probably shouldn't have brought it up really -- I was just bouncing ideas ;-).
Bob Jamison wrote:
From the docs, it looks like it rather takes care of itself. I had no problem installing it as http://server/blog/etc....
http://codex.wordpress.org/Installing_WordPress#In_a_Subdirectory
Jonathan Leighton wrote:
mental@...3... wrote:
Isn't it possible to substitute the relevent relative path as part of the template?
There is a settings value in WordPress that is called like this:
<?php echo get_settings("siteurl"); ?>. That returns the URI of the
site's base directory (you can also get the template's URI if you're using that). So I *could* use that in conjunction with the current relative paths to form an absolute URI for everything. But that would mean making *every* link on included pages (the header, footer, sidebar etc.) into an absolute URI (not to be confused with an absolute path -- absolute URIs start with the protocol like "http://"), and making *every* page depend on WordPress. Given that Bryce is already sceptical about using WordPress I don't think it would be the best thing to do (although I'd be happy to if people want me to).
That said, we could make a settings constant for the Inkscape website containing the base URI. However, it would still cause problems for people testing locally as they'd need to change it to suit themselves.
Another possibility is to use a .htaccess file in the dir, with an entry or two for mod_rewrite, to translate to--> and from--> the wordpress subdirectory.
Jonathan Leighton wrote:
Yeah, I know it's possible using either <?php echo get_settings("siteurl"); ?> or absolute paths, but we don't want the *whole* site to be dependent on WordPress, and absolute paths cause problems for people testing locally, that's the problem.
Anyway, what I will do is set the site up just using querystrings for now. Then, if and when people like WordPress, we can review using either absolute paths or WordPress-depending the whole site. It isn't a life-or-death matter, so I probably shouldn't have brought it up really -- I was just bouncing ideas ;-).
Bob Jamison wrote:
From the docs, it looks like it rather takes care of itself. I had no problem installing it as http://server/blog/etc....
http://codex.wordpress.org/Installing_WordPress#In_a_Subdirectory
Jonathan Leighton wrote:
mental@...3... wrote:
Isn't it possible to substitute the relevent relative path as part of the template?
There is a settings value in WordPress that is called like this:
<?php echo get_settings("siteurl"); ?>. That returns the URI of the
site's base directory (you can also get the template's URI if you're using that). So I *could* use that in conjunction with the current relative paths to form an absolute URI for everything. But that would mean making *every* link on included pages (the header, footer, sidebar etc.) into an absolute URI (not to be confused with an absolute path -- absolute URIs start with the protocol like "http://"), and making *every* page depend on WordPress. Given that Bryce is already sceptical about using WordPress I don't think it would be the best thing to do (although I'd be happy to if people want me to).
That said, we could make a settings constant for the Inkscape website containing the base URI. However, it would still cause problems for people testing locally as they'd need to change it to suit themselves.
Firstly, WordPress isn't going in a subdirectory (at the moment it isn't at least), the reason I asked was for pretty archive links like "http://inkscape.org/archives/05/03" instead of "http://inkscape.org/?m=200503".
I thought about using mod_rewrite to detect the referrer and redirect minus the subdirectories -- I successfully managed it once before. But it's a total hack, and wouldn't work if someone copied the link location and then pasted it in a new window (as there'd be no referrer), so I don't think it's really a good solution.
Bob Jamison wrote:
Another possibility is to use a .htaccess file in the dir, with an entry or two for mod_rewrite, to translate to--> and from--> the wordpress subdirectory.
Jonathan Leighton wrote:
Yeah, I know it's possible using either <?php echo get_settings("siteurl"); ?> or absolute paths, but we don't want the *whole* site to be dependent on WordPress, and absolute paths cause problems for people testing locally, that's the problem.
Anyway, what I will do is set the site up just using querystrings for now. Then, if and when people like WordPress, we can review using either absolute paths or WordPress-depending the whole site. It isn't a life-or-death matter, so I probably shouldn't have brought it up really -- I was just bouncing ideas ;-).
Bob Jamison wrote:
From the docs, it looks like it rather takes care of itself. I had no problem installing it as http://server/blog/etc....
http://codex.wordpress.org/Installing_WordPress#In_a_Subdirectory
Jonathan Leighton wrote:
mental@...3... wrote:
Isn't it possible to substitute the relevent relative path as part of the template?
There is a settings value in WordPress that is called like this:
<?php echo get_settings("siteurl"); ?>. That returns the URI of the
site's base directory (you can also get the template's URI if you're using that). So I *could* use that in conjunction with the current relative paths to form an absolute URI for everything. But that would mean making *every* link on included pages (the header, footer, sidebar etc.) into an absolute URI (not to be confused with an absolute path -- absolute URIs start with the protocol like "http://"), and making *every* page depend on WordPress. Given that Bryce is already sceptical about using WordPress I don't think it would be the best thing to do (although I'd be happy to if people want me to).
That said, we could make a settings constant for the Inkscape website containing the base URI. However, it would still cause problems for people testing locally as they'd need to change it to suit themselves.
SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Thu, 2005-03-10 at 20:02 +0000, Jonathan Leighton wrote:
I've been working on a prototype of the Inkscape news using
WordPress,
but am having trouble as URIs for archives come out like "/archives/2005/01/". Due to the relative paths used on the website,
the
browser then can't locate the stylesheets, and links point to the
wrong
place on those pages.
So... does it matter if I change to absolute paths? (Which, IMHO,
are
better anyway)
Well, before you do any changes, why don't you show us all what you
have
done so far. Absolute paths make testing the site difficult on other peoples machines. Also, then the site is not very portable. One of the reasons I'm not totally sold on CMS' or blog management systems is
that
aforementioned do these types of hard-path/absolute path which then won't allow developers to test wherever they like on their own
machine,
and then have dependency-laden code break without installing X, Y, and Z. However, maybe your work will prove me wrong ;)
Is this really going to be an issue? I ask because if Wordpress is only going to be used for the news, it doesn't affect things too much if it is an absolute path. I think it's not a problem specifically because if you want to add news, it's done on the site where you can preview it... it doesn't really require testing/previewing on anyone's system since it'll be done on the server.
Jonathan, you have removed all commenting stuff and renamed the "post" file, correct? The only issue with Wordpress tends to be spam... and with those two things taken care of it will usually eliminate it.
-Josh
Joshua A. Andler wrote:
On Thu, 2005-03-10 at 20:02 +0000, Jonathan Leighton wrote:
I've been working on a prototype of the Inkscape news using
WordPress,
but am having trouble as URIs for archives come out like "/archives/2005/01/". Due to the relative paths used on the website,
the
browser then can't locate the stylesheets, and links point to the
wrong
place on those pages.
So... does it matter if I change to absolute paths? (Which, IMHO,
are
better anyway)
Well, before you do any changes, why don't you show us all what you
have
done so far. Absolute paths make testing the site difficult on other peoples machines. Also, then the site is not very portable. One of the reasons I'm not totally sold on CMS' or blog management systems is
that
aforementioned do these types of hard-path/absolute path which then won't allow developers to test wherever they like on their own
machine,
and then have dependency-laden code break without installing X, Y, and Z. However, maybe your work will prove me wrong ;)
Is this really going to be an issue? I ask because if Wordpress is only going to be used for the news, it doesn't affect things too much if it is an absolute path. I think it's not a problem specifically because if you want to add news, it's done on the site where you can preview it... it doesn't really require testing/previewing on anyone's system since it'll be done on the server.
Yes, it's an issue because it would mean making all the link that are common throughout the site (header, footer, sidebar) into absolute paths.
Jonathan, you have removed all commenting stuff and renamed the "post" file, correct? The only issue with Wordpress tends to be spam... and with those two things taken care of it will usually eliminate it.
Yeah, I deleted the files we don't need (comments, trackbacks, pingbacks etc). We can also set WordPress not to ping any sites when new posts are made (this isn't really needed). That said, I guess there may be a few persistent spammers trying to get us anyway, so maybe it'd be better to just have blank comment/trackback/pingback files to prevent 404s. I'll do that.
Even if, by some act of God, some spammer *did* manage to get some spam into the database, it wouldn't display because I haven't put the code in the template.
Jon Phillips wrote:
On Thu, 2005-03-10 at 20:02 +0000, Jonathan Leighton wrote:
I've been working on a prototype of the Inkscape news using WordPress, but am having trouble as URIs for archives come out like "/archives/2005/01/". Due to the relative paths used on the website, the browser then can't locate the stylesheets, and links point to the wrong place on those pages.
So... does it matter if I change to absolute paths? (Which, IMHO, are better anyway)
Well, before you do any changes, why don't you show us all what you have done so far.
Ok, will do. Give me a few hours to smooth the edges and I'll upload it to my server.
Absolute paths make testing the site difficult on other peoples machines. Also, then the site is not very portable.
Yes, that's the reason I asked. Personally I set up a new name-based Virtual Host for every site I do, but I guess not everyone can be bothered or knows how.
One of the reasons I'm not totally sold on CMS' or blog management systems is that aforementioned do these types of hard-path/absolute path which then won't allow developers to test wherever they like on their own machine, and then have dependency-laden code break without installing X, Y, and Z. However, maybe your work will prove me wrong ;)
Yeah, I will ;-). WordPress doesn't use absolute paths at all -- I'm not sure whether I like or hate that, but I guess if they ever brought them in then they'd have to make it an option otherwise it would cause some people a lot of trouble.
participants (5)
-
unknown@example.com
-
Bob Jamison
-
Jon Phillips
-
Jonathan Leighton
-
Joshua A. Andler