26

Re: Feedback wanted on URL rewriting thing

Being totally ignorant about any of this, could somebody tell me if there are any negative effects where PunBB is deployed on an internal network rather than the internet?

Re: Feedback wanted on URL rewriting thing

Justin: That's what I started with. Looking at the .htaccess from WP. However, I won't be making this completely configurable via the admin interface.  If people want anything fancy that isn't already in the "default" .htaccess, they'll have to edit it themselves.

Regarding the feeds. Personally, I think having two ways of doing something is a bad idea. I think I'll settle for /rss/, /atom/ etc.

Bert: Thanks. I'll have a look at it tomorrow.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

28

Re: Feedback wanted on URL rewriting thing

Paul wrote:

Being totally ignorant about any of this, could somebody tell me if there are any negative effects where PunBB is deployed on an internal network rather than the internet?

PunBB should run just fine internally, there is no difference.

I run various internal sites on my network, they never see the light of day outside my firewall.

It comes down to configuring Apache virtual hosts and using a local hosts file per machine to point to whatever name you want to give your internal site.

29

Re: Feedback wanted on URL rewriting thing

Rickard: While I normally feel it's important to provide basic customization options, I understand the desire for expedience. In the absence of customization options in the admin interface, it would probably be wise to at least provide customization instructions in the documentation somewhere.

Do you know when you might have something committed to Subversion? If you haven't guessed, I'm eager to help out with testing... wink

Re: Feedback wanted on URL rewriting thing

Justin: I really can't say. I don't want to commit stuff until I'm somewhat sure I'm on the right track.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

Question: What seems like reasonable SEF URLs for these ugly URLs:

post.php?fid=5

post.php?tid=50

post.php?tid=50&qid=40

/post/ID is already tied up (viewtopic.php?pid=ID). Maybe one shouldn't attempt to add SEF URLs to stuff like this? I mean, is it important or even desirable that the URL to the post form is SEF?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

32

Re: Feedback wanted on URL rewriting thing

Could you provide a bit of explanation as to the semantic purpose of these links? I gather than "tid" is for the topic ID, but I'm not sure what the "fid" and "qid" are for.

33

Re: Feedback wanted on URL rewriting thing

Rickard wrote:

/post/ID is already tied up (viewtopic.php?pid=ID). Maybe one shouldn't attempt to add SEF URLs to stuff like this? I mean, is it important or even desirable that the URL to the post form is SEF?

I would add the following to robots.txt:

Disallow: post.php?

Robots don't need to post, that's how I feel.

Re: Feedback wanted on URL rewriting thing

Justin: fid is forum ID (when posting a new topic), tid is topic ID (when posting a reply) and qid is quote ID (which message to quote).

hcgtv: True, but that is already taken care of by the META tag in post.php (noindex, follow).

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

This is what I've done for the time being:

/new/topic/5/ -> post.php?fid=5
/new/reply/50/ => post.php?tid=50
/new/reply/50/quote/60/ => post.php?tid=50&qid=60

Does that make sense?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

BTW, after careful consideration, I've decided to go with ShawnBrown's suggestion. Now that I've had some time to think about it and to play with the code, I've realized it's much better than what I had in mind smile A nice "side-effect" of his method is that the URL rewriting template can be placed in the language pack.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

37 (edited by spider8 2005-02-28 22:34)

Re: Feedback wanted on URL rewriting thing

What about something like:

New Topic: /forum/forum-ID/new
New Post: /topic/topic-ID/new

although my favorite would be URIs like

/forum/punbb_discussions/2             for page 2 of forum punbb_discussions
/forum/punbb_discussions/new           for a new topic in forum punbb_discussions
/forum/punbb_discussions/t6254         for topic 6254
/forum/punbb_discussions/t6254/2       for page 2 of topic 6254
/forum/punbb_discussions/t6254/new     for a reply to topic 6254
/forum/punbb_discussions/t6254/p36091  for post 36091 on topic 6254

38

Re: Feedback wanted on URL rewriting thing

Rickard: Your ideas for the new post/topic URIs look pretty good to me.

Re: Feedback wanted on URL rewriting thing

spider8: It gets confusing when you consider we need an URL for new posts in a topic. Right now, I've got /topic/ID/new/posts/ for that. I can't think of a better way.

While talking to Connorhd on IRC, I realized that the internationalization plans I mentioned earlier will be difficult. I forgot that people can use different languages within the same forum. That would mean one set of rewrite rules for each language. Also, it would get confusing if a French guy copy/pasted the URL to a topic and displayed it to en English guy. You see the problem? Oh well, if someone wants to translate the rewrite rules, they'll have to edit one script plus the .htaccess. It shouldn't be too difficult.

I've made some progress today. Hopefully, I will have some more time to work on this tomorrow. Maybe even far enough so that I will be able to commit it to svn. Then you guys can download and test it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

Can't use the lang folder? lang/english for exemple to translate the URL?

Sorry for my french english.
GT4 Club driver France & Forum - Lingerie.

Re: Feedback wanted on URL rewriting thing

but then different people would get different urls and only one language would be in the .htaccess which is why it won't work

Re: Feedback wanted on URL rewriting thing

Rickard wrote:

I realized that the internationalization plans I mentioned earlier will be difficult. I forgot that people can use different languages within the same forum. That would mean one set of rewrite rules for each language. Also, it would get confusing if a French guy copy/pasted the URL to a topic and displayed it to en English guy.

That's not really an issue I think. The admin could choose a main localization for its URL, and that will be the one used over all the forums.

By the way, I don't remember that each forum can have a specific language in PunBB.

Oh well, if someone wants to translate the rewrite rules, they'll have to edit one script plus the .htaccess. It shouldn't be too difficult.

If the "script" you are talking about is not overwritten when updating, that should do it nicely smile

Re: Feedback wanted on URL rewriting thing

Jérémie wrote:

That's not really an issue I think. The admin could choose a main localization for its URL, and that will be the one used over all the forums.

True, but such solutions often need a lot of "fallback code". I.e., what would happen if someone deleted that language pack?

Jérémie wrote:

By the way, I don't remember that each forum can have a specific language in PunBB.

Not each forum, but each user.

Jérémie wrote:

If the "script" you are talking about is not overwritten when updating, that should do it nicely smile

It will not be overwritten unless it needs to be updated. That will be the case regardless of whether it's placed in the language pack or not, so it doesn't really matter.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

Rickard wrote:

True, but such solutions often need a lot of "fallback code". I.e., what would happen if someone deleted that language pack?

In that case they don't use it, and if they do they don't complain tongue

Not each forum, but each user.

OK we didn't talk about the same thing. Matter of persepective I believe, I was thinking that a ressource should be declared as a certain language and the tools of that ressource should be in the same language. And because you don't handle language metadata, that's not possible right know.

You take it the other way around, each user choose his own favored language and all tools are served to him in his language. Tricky (very) to add metadata to it, but more easier and intuitive for the non geek client.

It will not be overwritten unless it needs to be updated. That will be the case regardless of whether it's placed in the language pack or not, so it doesn't really matter.

Good smile .

Re: Feedback wanted on URL rewriting thing

Just wanted to inform you guys that I've made a lot of progress. Apart from a few minor tweaks (mainly making confirm_referrer() work even with rewrites enabled), there's not a lot left to do. I will probably commit the changes to the 1.3 branch tonight. I'll let you know when I do.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

46

Re: Feedback wanted on URL rewriting thing

That's excellent news, Rickard! I look forward to testing this over the weekend. If all goes well, I'll soon be able to launch the three sites that are currently waiting for this feature! big_smile

Re: Feedback wanted on URL rewriting thing

Sorry. Won't be today.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

48

Re: Feedback wanted on URL rewriting thing

How about today? wink I would love to utilize the weekend to give it a thorough test drive...

Re: Feedback wanted on URL rewriting thing

I'll do my best.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Feedback wanted on URL rewriting thing

Done. I encourage interested parties to download and give it a good test. The only thing I know I've got to sort out is the referrer check. For now, the referrer check is simply disabled when SEF URLs are enabled. As you can see in the .htaccess, quite a few rewrites have been added smile

http://dev.punbb.org/timeline/

Please note that these changes apply to the 1.3 branch and not the trunk. This is the folder you want to export/checkout.

"Programming is like sex: one mistake and you have to support it for the rest of your life."