Pretty URLs

Started by SMFHacks.com Team, January 31, 2007, 10:56:43 AM

Previous topic - Next topic

nitio

Excellent! I had installed earlier and had the problem with new topics but then I've read the bug fixes posts and now works perfect.

Just a question though, I have a topic (not to mention boards) that use special characters (e.g., tópico de teste) which then becomes ".../tpico-de-teste/". I know this would probably require quite some work but wouldn't it look better as ".../topico-de-teste/" ?

Thanks for the great mod :)
Oh sure, but what's the speed of dark?

redhotmustang

Quote from: eldʌkaː on March 03, 2007, 09:43:34 PM
Uninstall the mod, delete the pretty_topic_urls table and the pretty_url column from the topics table, and then reinstall the mod. That will reset everything.

Hi,

ac99 recommended me your mod, and because my forum is in portuguese I'm having the same problem he had.

I followed what you told him, changed the Subs-PrettyUrls.php and deleted the pretty_topic_urls table and the pretty_urls rows in the settings table.

But I can't find where the pretty_url column is in the topics table. It's not there, I checked the structure, and it isn't there.

I uninstalled the mod, I deleted all those rows and tables, except for that column which I can't find. And installed it again and still it doesn't work as I wanted.

I'm using SMF 1.1.2 and your mod's version prettyurls-base_0_6.

What can I do? My forum is in portuguese, encoded ISO-8859-1. I need this mod to change the board's names and the topics names as well.

I have a board named "Anúncios e Regras" and your mod turn this to anncios-e-regras (the "u" is gone).
My forum is at hxxp:forum.redcodestudio.com/ [nonactive]

I hope you can help me.
Thanks in advance.

Dannii

QuoteJust a question though, I have a topic (not to mention boards) that use special characters (e.g., tópico de teste) which then becomes ".../tpico-de-teste/". I know this would probably require quite some work but wouldn't it look better as ".../topico-de-teste/" ?
Those characters are there, however if you're not using UTF-8 it won't work properly. Same for redhotmustang, UTF-8 will work better.

QuoteBut I can't find where the pretty_url column is in the topics table. It's not there, I checked the structure, and it isn't there.
Yep, the topics table isn't modified anymore.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

redhotmustang

#363
Thanks! I'll try later, but as I said ac99 had the same problem we did (it seems that there are more than one portuguese people in this topic ;) ) and he uses ISO-8859-1 and not utf-8, and he wasn't got this problem.

But I don't care, if this works with utf-8 I'll use it anyway.

EDIT: Nope, that's impossible. If we use the utf-8 encode in portuguese forums or pages the words with special characters become misspelled like an||ncios instead of anúncios.

Dannii

The UTF-8 conversion should take care of those characters. It it doesn't, that's a SMF bug.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Col

Hi,

I've not updated to the latest version, so maybe this has been already addressed, but if the board name contains an exclamation mark, then a link placed somewhere else on the forum referring to a thread on that board will fail. I'm unsure of this is really a problem with SMF or not, but by using this mod the board name becomes part of the URL - normally it does not, of course.

nitio

Yes, the SMF conversion to UTF-8 didn't work for me either. I've did it manually (nothing like iconv). Anyways, it works like a charm... but for new topics. How can I re-generate the pretty urls again so they look all nice?

Thanks for the reply before :)
Oh sure, but what's the speed of dark?

Dannii

Quote from: Col on May 23, 2007, 09:40:56 PMI've not updated to the latest version, so maybe this has been already addressed, but if the board name contains an exclamation mark, then a link placed somewhere else on the forum referring to a thread on that board will fail. I'm unsure of this is really a problem with SMF or not, but by using this mod the board name becomes part of the URL - normally it does not, of course.
I thought about fixing this myself, but really it's a bug with SMF. I reported it on the bugtracker, but I don't know if anyone's done anything about it yet.

nitio, uninstall the mod, and delete the tables it creates. If you want to regenerate the board urls, delete the rows in the settings table the mod makes as well. They all start with "pretty_"
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

SlammedDime

Quote from: eldʌkaː on May 23, 2007, 10:14:15 PM
Quote from: Col on May 23, 2007, 09:40:56 PMI've not updated to the latest version, so maybe this has been already addressed, but if the board name contains an exclamation mark, then a link placed somewhere else on the forum referring to a thread on that board will fail. I'm unsure of this is really a problem with SMF or not, but by using this mod the board name becomes part of the URL - normally it does not, of course.
I thought about fixing this myself, but really it's a bug with SMF. I reported it on the bugtracker, but I don't know if anyone's done anything about it yet.

nitio, uninstall the mod, and delete the tables it creates. If you want to regenerate the board urls, delete the rows in the settings table the mod makes as well. They all start with "pretty_"
Why would it be a bug in SMF?  Your code should be encoding board names and removing characters that may cause issue, such as the !, or a /, etc.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

nitio

Perfect! Of course, having to re-edit the bug fixes in version 0.6 took me some time (my ssh connection is AWFUL to the server today).

Thanks again for this great mod!
Oh sure, but what's the speed of dark?

Dannii

#370
Quote from: Matt @ ARTcom on May 23, 2007, 10:18:29 PMWhy would it be a bug in SMF?  Your code should be encoding board names and removing characters that may cause issue, such as the !, or a /, etc.
The mod follows the RFC defining URIs. It's a bug in SMF that stops quicklinking from following the standard. Note that normal links using the [url] tag work.
If lots of people complain I will reconsider making the fix myself.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Col

Hi Eldeka,

Unless I'm mistaken, in a standard SMF installation, board names never appear as part of the URL, so special characters are not an issue. If ever a standard installation did make use of boards names as part of the URL, then it certainly would be an SMF bug. If, however, this is only ever an issue when using your mod, then I'm inclined to think that it is bug with your mod.

Even if this error only ever occurs with your mod (or similar mods) installed, it might be nice if SMF did make the fix so that SMF is compatible with such modifications. There is, after all, at least one other mod that changes URLs in a similar manner. However, I'd be surprised if SMF went to the trouble of making the fix, so, I for one, would appreciate your fixing it.

Thanks Eldeka. This is still a great a mod.

redhotmustang

Quote from: eldʌkaː on May 23, 2007, 11:12:30 PM
Quote from: Matt @ ARTcom on May 23, 2007, 10:18:29 PMWhy would it be a bug in SMF?  Your code should be encoding board names and removing characters that may cause issue, such as the !, or a /, etc.
The mod follows the hxxp:www.ietf.org/rfc/rfc2396.txt [nonactive]. It's a bug in SMF that stops quicklinking from following the standard. Note that normal links using the [url] tag work.
If lots of people complain I will reconsider making the fix myself.

I'm complaining lol. Please make the fix.
Thanks.

Dannii

It's not just my mod, any url with a ! can't be quicklinked, even though they're quite valid.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Dannii

Quote from: eldʌkaː on May 22, 2007, 09:45:35 AM
I think so. I've only tested with MySQL 4 and 5 (curiously the server with MySQL 4 has PHP 5 and the server with MySQL 5 has PHP 4...) but as SMF officially supports MySQL 3.23.4+, I'm sure I can get it to work for you too.
For those with MySQL 3.23, edit your install.php as follows:
Code (find) Select
`log_time` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
Code (replace) Select
`log_time` TIMESTAMP NOT NULL,Hopefully that will work.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

maldo

Do I have to edit any files to use this with other themes, I am using the orange lt theme. If anyone know how to edit the files if its required pls let us all know, i would be helpful for evey one, thanks

Dannii

No, there are no theme changes, even to the default theme.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

maldo

Thanks eldAka for this wonderful mod, but I have installed it in http://ndoctors.com [nofollow] and use the orange lt theme and I am not able to view any board now, the urls are changed perfectly fine, but it says that they are not availbe 404 error. (pls try clicking on a borad or child board) pls have a look and let me know what i am doing wrong.

Thanks for your time.
Cheers

Dannii

Can you copy your .htaccess here please?
Did you make these changes?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

maldo

Thanks eldAka, I will try the fixes you have mentioned. Will get back to here if there is any problems. I don't have direct access to the .htaccess as the site is in a cheap hosting. I will try and move the site to my hostmonster hosting soon.

Thanks for this much needed mod. The google ads are very relevant when this mod is installed. cheers mate.

Advertisement: