Pretty URLs

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

Previous topic - Next topic

shaitanfr

#2280
Quote from: Dannii on August 28, 2008, 10:07:28 PM
Hmm, ok. I'll try and look into that to see if something can be done.
Hello Dannii, don't lost your time, it's not a compatibility problem with Pretty Url but a bug in Embed Video/Audio

http://www.simplemachines.org/community/index.php?topic=200401.msg1668031#msg1668031
http://www.simplemachines.org/community/index.php?topic=200401.msg1669221#msg1669221
Last night in my test forum I have tried fresh install forum and only Embed Video/Audio, the bug was présent.


Dannii

Rawpaleoforum, excellent.

shaitanfr, ok sure.
"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."

grevan

#2282
Hello, i installed the MOD, but the configuration link is not showing up. I´m using the pn-pn template. Do i have to edit something?
Thanks a lot.

Dannii

Probably not.. it should work in all themes. Are you using English? Does it work if you go to index.php?action=admin;area=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."

grevan

Yes Dannii, it works.
I just don´t see the link.
It seems that the menu on the left created a blank line where the link was supposed to be. Have any idea?
Thank you.

viulian

Hello,

I have an issue with sitemap.xml file which is not parsable because an ' (apostrophe) character from the topic's subject is kept as ^R (or some weird char) in pretty_url column of the ${dbprefix}_pretty_topic_urls table.
However, URL in browser is generated correctly somehow (with the ' in the name, and the ^R character is not seen).

I tracked it down to this line of code from Subs-PrettyUrls.php (version 0.8):

chr(18) =>      array ("'", '"', '<EF><BA><80>', '<D8><B9>'),

(please ignore the <> stuff, my putty / less doesn't play nice with UTF-8).

Anyway, I've also tried the latest Subs-PrettyUrls.php line from SVN (version 0.9 - rev 78)

"\x12"  =>      array ("'", '"'),

The sitemap.xml generation plugin, I wrote it myself. Because Google does not want to follow redirects if the URLs in the sitemap return a 301, I am using the ${dbprefix}_pretty_topic_urls table, pretty_url column to generate this final URL.

So far so good. The issue is that the value in the column looks like:

o-mare-cleapsa-vine-ca-tractoru-(jam-session-rudy-and-sabinutza)

The strange character, vi sees it as ^R . Mozilla shows it as a square with 00/12 written inside.
Accessing the sitemap.xml gives me a parsing error (both from google and directly from FF) as the char is not allowed.

Now, as that strange char is there, somewhere else it must be reconverted back to ' - as said, in browser everything behaves properly - hence, I'm afraid to modify the code to store that ' in the pretty_url column - I do not know what will happen afterward :)

Danii, can you give me a hint ?

Thanks,

Dannii

Quote from: grevan on August 31, 2008, 01:06:05 PMYes Dannii, it works.
I just don´t see the link.
It seems that the menu on the left created a blank line where the link was supposed to be. Have any idea?
Thank you.
Check that all the language entries were added to Modifications.english.php

Quote from: viulian on August 31, 2008, 04:22:46 PMHello,

I have an issue with sitemap.xml file which is not parsable because an ' (apostrophe) character from the topic's subject is kept as ^R (or some weird char) in pretty_url column of the ${dbprefix}_pretty_topic_urls table.
However, URL in browser is generated correctly somehow (with the ' in the name, and the ^R character is not seen).

I tracked it down to this line of code from Subs-PrettyUrls.php (version 0. 8) :

chr(18) =>      array ("'", '"', '<EF><BA><80>', '<D8><B9>'),

(please ignore the <> stuff, my putty / less doesn't play nice with UTF-8).

Anyway, I've also tried the latest Subs-PrettyUrls.php line from SVN (version 0.9 - rev 78)

""  =>      array ("'", '"'),

The sitemap.xml generation plugin, I wrote it myself. Because Google does not want to follow redirects if the URLs in the sitemap return a 301, I am using the ${dbprefix}_pretty_topic_urls table, pretty_url column to generate this final URL.

So far so good. The issue is that the value in the column looks like:

o-mare-cleapsa-vine-ca-tractoru-(jam-session-rudy-and-sabinutza)

The strange character, vi sees it as ^R . Mozilla shows it as a square with 00/12 written inside.
Accessing the sitemap.xml gives me a parsing error (both from google and directly from FF) as the char is not allowed.

Now, as that strange char is there, somewhere else it must be reconverted back to ' - as said, in browser everything behaves properly - hence, I'm afraid to modify the code to store that ' in the pretty_url column - I do not know what will happen afterward :)

Danii, can you give me a hint ?

Thanks,
I would recommend changing your sitemap code to produce just the normal SMF URLs, then let the mod rewrite them, by running the ob_rewrite() function (you may need to add extra search patterns too...)

But isn't there already a working sitemap mod?
"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."

viulian

Hmm, interesting. Thanks!

I never bother to check the other google sitemap plugins. Mine worked on for the past 2 years or so, and it already has automatic priority and frequency detection [I mean I do use other software beside SMF, such as website baker or gallery2 - and I saw that their sitemap plugins have prefixed frequency and priority values - google complains about that].

So far I'm going to manually fix the sitemap :) and see how the ob_rewrite thingy works even if I have no idea right now on how to trigger the ob_rewrite and why the extra search patters are needed.

Dannii

http://prettyurls.googlecode.com/svn/trunk/Base/SMF1-1/Sources.xml
Look at the changes made to News.php.

Oh.. this is assuming you're using SSI.php?
"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."

Low

Hey,

I've tested brand new install of 1.1.5 with perfect NOINDEX meta tags showing on the print pages but they don't show after the mod is installed?

I know you said your mod doesn't alter anything to do with the meta tag but I can't see how they don't show after installing the mod?

Dannii

Are you sure it's a problem with this mod?
"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."

Low

I wouldn't call it a problem as this mod provides such sep quality to a forum but I think it's changing something the NoIndex meta tag needs to be called.. like part of the print/ next page title?

I'm not sure. What rules make the NoIndex tag show, part of the url/ content?

Whatever it is I think that is being changed along the lines.

Dannii

#2292
I could have a look at it... it's possible SMF's code is buggy.

Edit: SMF 1.1 doesn't have the meta tag for print pages ever, and in SMF 2.0 enabling the mod doesn't remove it. So I don't know how you're getting those results.
"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."

grevan

QuoteCheck that all the language entries were added to Modifications.english.php
What do you mean Dannii?
Actually i´m using brazilian language.
I´ve noticed another thing, the brazilian accents and characters are not recognized and the urls are created with these letters missing. How do i fix that?
Thank a lot.

Dannii

Then add the $txts from Modifications.english.php to Modifications.brazilian.php (or Portuguese or whatever it is...)

Are you using UTF-8? Other encodings will work unreliably, so UTF-8 is recommended.
"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."

grevan

Hi Dannii,
i renamed Modifications.english.php to Modifications.brazilian.php, is that it? I had done it already, but still not showing the link.

Dannii

You shouldn't do that, you still need a Modifications.english.php. Is there anything in your error log?
"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."

grevan

#2297
OK Dannii, so i make a copy of Modifications.english.php and rename it Modifications.brazilian.php ?

And by the way i see the error logs:
Quote8: Undefined index: pretty_admin_menu
Arquivo: /home/..................../Sources/Subs.php
Linha: 2752

Thanks

Dannii

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

tomate

hello,

I am full of this errors in the SMF error log journal :
Undefined index: pretty
File: .../MessageIndex.php
Line: 52

I found nothing usefull whith google, any idea ?

Thanx

Advertisement: