Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Handle url with blanks
Hello all,
I’m very new to this and I’m not a English native speaker. Please correct me if I’m wrong and bear with my poor English. I’m trying my best anyway.
I have a site for acdemics to post their research articles and to find useful references, therefore, I have to display the author’s ‘real name’ like ‘Firstname Lastname’ and can link to all the artciles this author has written. However, I found that URL doesn’t work too well with blanks, but I can’t put either ‘-’ or ‘_’ because it’s not acceptable for an academic site.
Maybe this can be done already. But I can’t find it documented. Please help!
Thanks!
Offline
Re: Handle url with blanks
Not acceptable? I’ve done academic sites before and there was no problem with using underscores or hyphens in URLs. Show them that when you enter a URL with a raw space in it they’ll end up with “Firstname%20Lastname” and see if they still find a hyphen of underscore “unacceptable”.
You cooin’ with my bird?
Offline
#3 2005-09-27 17:41:30
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Handle url with blanks
Well, the URL is going to have to have an underscore or a hyphen, period. But I think liyuyu is getting at, based on an earlier discussion we had, is having the author’s real name be the link text (that is, the text that the user clicks on). It won’t solve the issue of the URL itself, but it will ameliorate the apearance of the link a bit.
See here: http://forum.textpattern.com/viewtopic.php?pid=78502#p78502
-Kurt
kurt@kurtraschke.com
Offline
Re: Handle url with blanks
Thanks for helping explaining, Kurt.
It’s ok to have ‘-’ or ‘_’ in the url but it’s not ok to have the author’s name displays at the site (for user to click) like ‘Firstname-Lastname’, ‘Firstname_Lastname’ or ‘FirstnameLastname’.
Last edited by liyuyu (2005-09-27 20:06:47)
Offline
Re: Handle url with blanks
No one can help? Or is actually sth already solved or if there’s any trick that I do on this? Well, I really didn’t expect that textpattern can’t handel this kind of basic feature…How do other people do this? Do you all have author name appears without a blank between the first name and the last name?
Offline
Re: Handle url with blanks
The same problem happened when I have an author name in Chinese.. the Chinese name appeared in the url, then couldn’t display the article. How did other people do this? Not everybody use only English for your site, right? How did you do this? Any other Chinese users??
Offline
Re: Handle url with blanks
Are you manually typing out those urls?
I have tested auto-generated author links (in an article-form <code><txp:author link=“1” /></code>) and they work in different languages and with names containing all sorts of unicode characters. Of course they need to be encoded properly, as the RFCs only allow a limited set of characters to appear in urls, which may be what you are doing wrong…
Offline
Re: Handle url with blanks
No, I didn’t manually type out those urls.
I don’t know why, I just write the author’s name in Chinese, and then it appears as Chinese on the page. Then click it, the article doesnt appear.
Another one, the author’s name in Firstname Lastname, then the url appears like firstname+lastname, also, click it the article doesn’t appear. Where did I go wrong? What shall I do?
Last edited by liyuyu (2005-09-30 19:01:02)
Offline
#9 2005-09-30 19:06:36
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Handle url with blanks
liyuyu,
If you can give me a day or two, I can put together a plugin to show the author’s real name and link to the author’s username. I think that’s what you’re looking for, am I right?
-Kurt
kurt@kurtraschke.com
Offline
Re: Handle url with blanks
Yes yes yes. Thank Goodness that you are so kind! I’m almost devastated…
Thank you very much. I look forward to hearing from you then!
Offline
Re: Handle url with blanks
Hi Kurt,
How is it going?
Offline
#12 2005-10-04 20:42:59
- KurtRaschke
- Plugin Author
- Registered: 2004-05-16
- Posts: 275
Re: Handle url with blanks
Sorry, but unfortunately I’ve been very busy at school (midterms are coming up and I’ve been studying a lot), and I have not yet had any time to write the plugin. I might be able to do it this weekend, but I can’t make any guarantees. It’s not a very complicated plugin; once I can actually find the time it shouldn’t take me long to put together.
Sorry the news isn’t better.
-Kurt
kurt@kurtraschke.com
Offline