Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-10-05 09:32:54

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: Handle url with blanks

Hi Kurt,

That’s fine, I understand. Look forward to hearing from you then. Thanks again!

Last edited by liyuyu (2005-10-05 09:33:08)

Offline

#14 2005-10-05 14:33:18

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: Handle url with blanks

Huh. I think this whole thing may have gotten very confused. I finally got around to looking at the code, and <code><txp:author /></code> already uses the “Real Name” field, and, if the name contains spaces, encodes the URL appropriately. The whole thing works just fine on my site with spaces in the “Real Name” field. I’m using the latest SVN rev. Maybe there was a bug in earlier versions?

Anyway, I don’t think there’s anything a plugin can do here; I think you may be experiencing a bug.

<code>pagelinkurl()</code> calls <code>urlencode()</code> on the ‘author’ parameter, so there shouldn’t be a problem with any UTF-8 character in the author name.

-Kurt


kurt@kurtraschke.com

Offline

#15 2005-10-05 17:49:23

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Handle url with blanks

Yeah, I wrote above that it works now. This was buggy in pre 4.0.1 versions.

Offline

#16 2005-10-05 23:50:05

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Handle url with blanks

Wouldn’t it make sense to use the ‘name’ field in the URL, and RealName for display only? name is a unique key, RealName isn’t.

Last edited by zem (2005-10-05 23:51:10)


Alex

Offline

#17 2005-10-05 23:56:31

KurtRaschke
Plugin Author
Registered: 2004-05-16
Posts: 275

Re: Handle url with blanks

That’s what I would have expected as well, but that is not the current behavior in Textpattern. For that matter, why not just use the numeric author ID and do away with all of this trouble with <code>urlencode()</code>? There’s no reason to use the real name or the login name in the link.

-Kurt

Last edited by KurtRaschke (2005-10-05 23:59:41)


kurt@kurtraschke.com

Offline

#18 2005-10-06 10:49:07

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: Handle url with blanks

I use Textpattern 4.0.1….

I feel I’m so unlucky to be the only one that experiencing this bug.

My site is here: http://www.uigarden.net/english I would very appreciate if any of you can go have a look of it and let me know what I should do with it. ..

You will see when you mouse over the author name, say, Paul Curzon, the url appears at the bottom of the browser is /author/Paul+Curzon, then click it, the article doesnt appear. Could anybody let me know what I did wrong?

Many thanks

Offline

#19 2005-10-06 11:18:43

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Handle url with blanks

Wouldn’t it make sense to use the ‘name’ field in the URL, and RealName for display only? name is a unique key, RealName isn’t.

I don’t think uniqueness is much of a problem, while it is valid in a technical sense, if you want to differentiate between authors, they would likely have different RealNames as well.

@liyuyu: Are you using <code><txp:author link=“1”></code> to link to those authors?

Offline

#20 2005-10-06 12:18:30

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: Handle url with blanks

No, I’m using < txp:author link=“y” />… you mean I should use < txp:author link=“1” />? Ok I’ll try this.

Last edited by liyuyu (2005-10-06 12:22:12)

Offline

#21 2005-10-06 12:26:08

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: Handle url with blanks

Sencer, <code><txp:author link=“1”></code> also doesnt work..

Offline

#22 2005-10-06 23:16:16

Th4rg0r
New Member
Registered: 2005-01-31
Posts: 8

Re: Handle url with blanks

> Sencer wrote:

> bq. I don’t think uniqueness is much of a problem, while it is valid in a technical sense, if you want to differentiate between authors, they would likely have different RealNames as well.

Not really true, I myself have two chinese friends with the same name. :)

Just an info.

Added: Actually more than that :D , many uses english name now, so, you can actually walk into a restaurant and shout “John Lee!!!” and headS will turn. heh heh.

Cheers

Last edited by Th4rg0r (2005-10-06 23:20:13)

Offline

#23 2005-10-06 23:31:46

liyuyu
Member
From: Slough, England
Registered: 2005-09-23
Posts: 26
Website

Re: Handle url with blanks

> Th4rg0r wrote:

> Not really true, I myself have two chinese friends with the same name. :)

> Just an info.

> Added: Actually more than that :D , many uses english name now, so, you can actually walk into a restaurant and shout “John Lee!!!” and headS will turn. heh heh.

> Cheers

This is true!

Anyway, the problem still exists! I think I probably have to delete the author name…such a shame!!

Last edited by liyuyu (2005-10-06 23:33:17)

Offline

#24 2005-10-07 11:17:59

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Handle url with blanks

Aaaah, this was fixed shortly after the 4.0.1 release. (since most of the fixing went in before 4.0.1, I was sure it worked in 4.0.1, however a little, yet crucial part was done after the release).

http://forum.textpattern.com/viewtopic.php?id=11303

There is the fix you have to do, for it to work, then all Names will work. Sorry, about the wrong assumptions I made.

Not really true, I myself have two chinese friends

Of course there are people with the same names, the point I was trying to make, was that if you want visitors to know there are two different authors, you will somehow make sure they will post under slightly different names. What would be the gain, if you had two different links, but the name beneath each post would always be the same, despite it being two different writers? Not much…
So the first step would be to make the difference for humans, in making their names distinguishable, and after that make sure, that their posts don’t get mixed up, when filtering. And incidently in TXP doing the first thing, will automatically take care of the second thing.

Offline

Board footer

Powered by FluxBB