Recent Topics

1 Apr 26, 2006 06:37    

Our blog is accessed via both HTTP and HTTPS. Included in our linkblog is two other blogs on the same server. So that both URIs work I'd like to specify a link location of /?blog=6 or /index.php/blog=6 but whenever I do it complains the URI isn't allowed.

Is there a configuration option hidden somewhere I'm missing? I searched the forums and found conf/_formatting.php, but not being a PHP guy I'm uncertain if that's the problem or if URIs are simply required and there's no way around it.

2 Apr 26, 2006 10:02

Here's what I do, I have a simple str_replace for http://site which gets translated into $baseurl. This allows me to post relative links and get past the checker ;)

¥

3 Apr 26, 2006 14:16

But the $baseurl must be one or the other, too. No? If I'm going to modify the code I may make it so either a special URI like REMOVEME: gets removed so a relative URL can work, or get rid of URI checking.

It's important to figure out how often the URI is validated. Only when it's changed or whenever anything on its page changes. Hmm.

5 Apr 26, 2006 16:14

It could be replaced with nothing, but it'll end-up in the database with nothing (correctly). If I ever edit the post again and change something /other/ than the link, it will complain about the URI again, requiring me to add http:/site again before saving.

I'm curious why I should really care about a malformed URI. Nothing breaks if the URI is goofed up. In fact, insisting on a URI (valid or not) prohibits relative URLs as well as URIs that weren't anticipated when the software was written.

True, adding new URIs is as simple as editing conf/_formatting.php, but wouldn't it be better to not worry about them at all?

6 Apr 26, 2006 16:29

I'm sorry, you misunderstood me, the post goes into the db as http://site (and stays like that in edit etc), it just gets changed before it's rendered to the screen.

¥

7 Apr 26, 2006 18:42

OK. If it's only changed before rendering then it would be cool. Where did you make that change?

8 Apr 26, 2006 23:29

ok, this is untested (I use a renderer plugin), but, in your skin find this bit and add the red bit :-

$Item->content = str_replace( 'http://site', '', $Item->content);
$Item->content();

ish :p

¥


Form is loading...