Pretty URLs

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

Previous topic - Next topic

Carlos Gandra

Hi,

Quote from: eldʌkaː on March 02, 2007, 12:58:20 AM
Hm... actually I think I got that backwards. It looks like it only accepts UTF-8 :S weird. Which encoding do you use?

I'm using ISO_8859-1.

In Subs-PrettyUrls.php, I was convicted that if we add the characters missing, it works, but unfortunately not :(

That's what I've done, for example:
'c'   =>   array ('ç', 'c', 'C', 'ç', 'Ç', 'ć', 'Ć'),

But all the names with ç became the number off the topic.

I'm sorry I don't have the knowledge enough of code to be able to help, me and consequently all the ones that have the same problem.
Carlos Gandra
Mundo dos Animais

Dannii

eladio, it will work with Apache on Windows, and would also work in IIS if there is a mod_rewrite for it too. I know nothing about IIS though.

ac99, in your copy of Subs-PrettyUrls.php, make this change:
Code (find) Select
preg_match_all("~.~su", $text, $characters);
Code (replace) Select
preg_match_all("~.~su", utf8_encode($text), $characters);
"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."

Carlos Gandra

Doesn't work... well, it works of course, but as the same as before ;)

I'm thinking if "we" aren't on the wrong way... instead trying convert to utf-8, trying a method that will accept any encoding, even if some file has to be manually changed to setup the correct encoding that the forum admin want.

Only suppositions ;)  
Carlos Gandra
Mundo dos Animais

Carlos Gandra

#123
Wow please forgot my last post, cause I think I've seen a very positive signal :D

Look, all my Boards, Sub-Boards and Topics with one of them: áàâãéèíóòúç continue appearing with numbers and not names, but, I've created a test post named "Novo teste: áàâãéèíóòúç" and the URLs retrieve: "novo-teste-aaaaeeioouc/0/" :D :D

So, a cache problem? What it could be? How all my titles became the names of them? :D I've also cleaned my browser cache (I don't know if it had someting relation with this) but not works. What I know is that, this topic title as retrieved characters as we want :D that only could be positive, right?
Carlos Gandra
Mundo dos Animais

bluegray

Quote from: eldʌkaː on March 02, 2007, 09:48:14 PM
ac99, in your copy of Subs-PrettyUrls.php, make this change:
Code (find) Select
preg_match_all("~.~su", $text, $characters);
Code (replace) Select
preg_match_all("~.~su", utf8_encode($text), $characters);
Yup, that seems to work for new topics. I think old topics will keep the wrong name though - its in the database right?

Carlos Gandra

Yeah, all the topics created by my members after the change in Subs-PrettyUrls, appears as we want.  
Carlos Gandra
Mundo dos Animais

Dannii

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.
"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."

NEMINI

would truncating the tables accomplish the same thing with less work eldakai?
signatures are boring.

Dannii

You could truncate the pretty_topic_urls table, but I think you will still need to delete the pretty_url column from the topics table, unless you can remove all those values quickly while still leaving the column.
"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."

haltoyou

I recently launched a Website that was just a fourm based site with SMF. The forum root is SMF, so it was important the site would be able to get indexed properly in search engines.

As it turns out, I wasn't able to use the search engine friendly URLs built-in SMF, which meant I was stuck with the core URLs generated by SMF.

In short, that meant I would not get forum content indexed in Google or other search engines.

I've looked at dozens of sites running SMF with the core URLs and in every case, the forum content doesn't get indexed. Some pages will get indexed, but not the threads and content in the threads.

I tried Pretty URLs and I ran into a conflict with another mod. I was unable to find the conflict, so I set up a test board with a fresh install and tried installing Pretty URLs. It worked great.

Because my forums site was new, I dumped it and did a fresh install and the first mod I added was Pretty URLs and it worked fine.

Here's the good news -

I run Google ads on the forums and now the ads really do match the content. My forum without Pretty URLs was hit and miss with Google ads and most of the time the ads did not match content.

And now I know the forum content will get indexed by Google and othe search engines.

Here's the proof:

A cached copy of a page using Pretty URLs from Google:
hxxp:72.14.209.104/search?sourceid=navclient-ff&ie=UTF-8&q=cache:http%3A%2F%2Feldacar.com%2Fcuriouser-and-curiouser%2Finternet-debates%2F0%2F [nonactive]

Here's what you get from Google's cache of this thread:
hxxp:72.14.209.104/search?sourceid=navclient-ff&ie=UTF-8&q=cache:http%3A%2F%2Fwww.simplemachines.org%2Fcommunity%2Findex.php%3Ftopic%3D146969.0 [nonactive]

Nothing!

Dannii

I'm glad it's working for you, and that the ads are more context sensitive now too! :)
I'll work on making it more compatible with other mods, but it won't be possible to make it completely compatible with all.
"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."

bluegray

Quote from: haltoyou on March 03, 2007, 11:53:49 PM
Here's the proof:

A cached copy of a page using Pretty URLs from Google:
http://72.14.209.104/search?sourceid=navclient-ff&ie=UTF-8&q=cache:http%3A%2F%2Feldacar.com%2Fcuriouser-and-curiouser%2Finternet-debates%2F0%2F

Here's what you get from Google's cache of this thread:
http://72.14.209.104/search?sourceid=navclient-ff&ie=UTF-8&q=cache:http%3A%2F%2Fwww.simplemachines.org%2Fcommunity%2Findex.php%3Ftopic%3D146969.0

Nothing!
That's not really true.
http://72.14.209.104/search?hl=en&q=pretty+urls+site%3Awww.simplemachines.org&btnG=Search
http://66.102.9.104/search?q=cache:UBq9WesUeCUJ:www.simplemachines.org/community/index.php%3Ftopic%3D146969.30+pretty+urls+site:www.simplemachines.org&hl=en&ct=clnk&cd=4&hl=en

I have done similar tests. Prettyurls or the built in SEF links is not necessary for Google to index your site. There could be a number of other reasons why your site was not indexed right away. And as you can see, Google indexed this thread just fine. There are a few things you can do however to improve your site and make it more SEF.

Dannii

#132
SSI.php should be fixed, and it will automatically try to convert encodings now in r24. That might not work on all servers though...

Arabic is now being romanised: http://dev.eldacar.com/prettyurls/general-discussion/'rby-tjrb-ll'rby/0/
I don't know how good a romanisation that is though... any comments?
"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."

Carlos Gandra

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.

It works, and now all topics appears well ;)

Just one more question... and how about the board names?

Thanks a lot,
Carlos
Carlos Gandra
Mundo dos Animais

Dannii

You want to reset the board names too? Uninstall, and then delete the pretty_board_urls row from the settings table, and reinstall.
"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."

Carlos Gandra

Quote from: eldʌkaː on March 05, 2007, 06:53:08 PM
You want to reset the board names too? Uninstall, and then delete the pretty_board_urls row from the settings table, and reinstall.

Perfect! Really perfect! :D

I hope that this roll of doubts and now the solutions helps the development of this GREAT mod ;)

Thanks for all
Carlos Gandra
Mundo dos Animais

Kristoffer Lindqvist

Quote from: CyberOto on February 21, 2007, 07:22:46 AM
Hi,

I have just tried to install the Pretty URLs mod on a clean installation of SMF 1.1.2 and got this

QuoteInstallations actions for "Pretty URLs - Extention: none":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    -    Modification parse error
2.    Execute Modification    ./Sources/Stats.php    Test successful

when trying to install the extension. I have ignored the error and installed the mod, but alas.

The .htaccess file is renamed and the host have mod_rewrite working on it.

Any ideas ?

Thanks in advance.

You are likely bumping into an issue with PHP5. The major.xml file in the Extention package is simply too heavy and splitting it into several files solves the issue. I needed three files for it to work. Am attaching a modified package that should make you golden.

eldʌkaː, thanks for an awesome package! Very useful.  8)

Dannii

Too big? Interesting.. I'll look into that. If it is too big I'll break it up.
"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."

Kristoffer Lindqvist

#138
Apparently, PHP5 has some issues with too much data being pushed at once. Makes me wonder whether I should roll back to PHP4 for now...

Here's the reference that led me to the solution:
hxxp:galleryproject.oldiesmann.us/index.php?topic=284.msg3009#msg3009 [nonactive]

Edit: FWIW, increasing resource limits in php.ini does not solve the issue, tried that as well. If anyone knows anything further about the extent of this PHP bug, I'm all ears.  :D

Dannii

#139
I've released 0.4 now. No major changes, but I felt there had been enough time that I should get it into testing.
I split up the files, so hopefully it will install more reliably now.
Note that the TP package is gone, instead the ext-none package will modify TP if it is installed.
I'd be interested to hear someone's opinion about how well it now romanises Arabic.

changelog.txt
"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."

Advertisement: