News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Pretty URLs

Started by Dannii, November 14, 2006, 08:42:05 AM

Previous topic - Next topic

Dannii

I don't want to have the numbers in the urls. I just suggested this to you as it might help, but if you really want those short URLs, then you'll have to look at another 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."

Tarek

well ,
if i only installed the ext without the base , i will have the links in only numbers ..
did you try it ?

Dannii

You could try that I suppose. You'll still need to set up some of the arrays (as empty) or else you'll get errors. And.. it will be making a lot more database queries than you need. If all you want is a short form, you might be better off editing the mod by sacx, because it doesn't do any extra queries.
"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."

SacmaliK


My Mods
Veoh Bbc Tag:here
Topic get Keywords:here
...

Dannii

http://dev.eldacar.com/prettyurls/test-board-1/c-o-u-turkish-character/msg19/?topicseen#msg19

(I had to fix it manually, because the topic urls aren't automatically made when you make a new topic yet)

So the Ç, Ö and Ü are working, I'll add in the Ş, Ğ and İ (and their lowercase characters). Any other Turkish 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."

SacmaliK





Ş - Ç - Ö - Ü - Ğ - İ : Turkish  Big character
ş - ç - ö - ü - ğ - ı : Turkish  small character

The all of the character these
You interested for thanks

My Mods
Veoh Bbc Tag:here
Topic get Keywords:here
...

nediam

Hello.
I have some problem with pretty URLs after installation i have beautiful pretty URLs like "hxxp:somehost.com/forum/some-board/some-topic/0/ [nonactive]" but when i add new post it have URL like "hxxp:somehost.com/forum/some-board/1/0/ [nonactive]" what's wrong ?

Dannii

The last release (0.2) of the mod doesn't automatically add the pretty urls for new topics to the database. It should still work perfectly fine though, and then when I release 0.3, it will do it automatically for you (as well as adding all the old topics).
"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."

Stüldt Håjt

How much do you think this will increase the page load?

Dannii

I'm not sure.. it adds one new query per page and then makes several of the other queries a little larger. I haven't noticed any big load increase though.
"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."

Sindorf

Hi,

This is really a good project. I appreciate your efforts and I want to thank you for your work and time.

I have created a test topic in your forum. This is what I have posted

http://dev.eldacar.com/prettyurls/test-board-1/ss-gg-ii-uu-cc-oo-dollar-percent-and/0/

and

http://dev.eldacar.com/prettyurls/test-board-1/g-u-i-s-c-o-u-g-i-s-c-o-plus-dollar-percent-and/0/

You can see that characters like " ' # { are not working.

I know this project is in an early stage but I wanted to inform you about these.

Thanks :)

Dannii

Yeah.. I'm not entirely sure what to put for them though. "doublequote" for example is obviously too long..
Any suggestions?
"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."

Stüldt Håjt

I think you shoud just delete all ?=)(/&%¤¤#"! etc because the longer the url less search engines likes it.

Sindorf

Hi Eldakar,

I am totally with Stüldt Håjt's idea. You can remove these from the link. Nobody will write a topic like "][" or "$$%%%&&&" in an active forum. (At least, when people start to post like these, I will start to ban them :))

Generally, the URL rewrite of some other systems (like WordPress) works like this (they remove that "'!^#+%body%quot; charactersin URLs)

A second option is that you can add only the first letters of the marks, for example ? is quotation mark, the "pretty url"ed of this can be "qm" => But that's a bad idea :)

webmistress

Quote from: eldʌkaː on December 29, 2006, 08:28:55 AM
All, I've found a small bug. If you make a new board, you'll get an error, because I didn't include the source file needed. If you get the error, you can fix it by searching for this:
// Update the pretty board URLsAdd after:require_once($sourcedir . '/Subs-PrettyUrls.php');

Okay, it works and it worked fast! I'm about to faint. Thank you.

I do have a question about the above. In which file do I look for this to make the change? It may be obvious. Is it in install.php? I've looked for it but don't see the "//Update the pretty board URLs" it right off the bat. Thanks.

webmistress

Okay, I've now done an exhaustive search for these words "Update the pretty urls" and don't see them, the ones above. The new board has a number and not the pretty urls, so I think I need to modify something in one of the files.

Dannii

QuoteOkay, I've now done an exhaustive search for these words "Update the pretty urls" and don't see them, the ones above. The new board has a number and not the pretty urls, so I think I need to modify something in one of the fil
I should be in Sub-Boards.php

QuoteI think you shoud just delete all ?=)(/&%¤¤#"! etc because the longer the url less search engines likes it.
Some of them can't be used because they do stuff in urls, like ? = & and #
However some of them make sense in a topic and should be preserved. Your topic might be something like "50% sale on now!", and so that should be converted to "50percent-sale-on-now". And "you & me" should be converted to "you-and-me". The others won't work like that though.
"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."

Stüldt Håjt

If someone makes a thread like I love you!1111oneleven<3"#¤%&/ It should definitely shorted like i-love-you.

I think it looks stupid if you have a topic like "do-you-like-me-questionmark-questionmark-questionmark-questionmark-questionmark-questionmark-questionmark-questionmark-questionmark-questionmark etc..."

Dannii

True, I don't think I'll have questionmark..
I'll also add in a later version a way to change the url of a topic/board, so if there is something you don't like you can fix it.
"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."

webmistress

Quote from: eldʌkaː on January 19, 2007, 10:25:07 PM
True, I don't think I'll have questionmark..
I'll also add in a later version a way to change the url of a topic/board, so if there is something you don't like you can fix it.
I think we all might have to be in love with you if you do that.

Would this

//Update the arrays

be the same as this?

// Update the pretty board URLs


Because I'm not finding those exact words. And this seems the closest as update database doesn't seem right. I'm not a programmer (obviously). I sure that is not a complete surprise to you given how intelligent my and in-depth my questions are.

And I notice I can't write on the file in the admin window. I have permissions set right, but it's still in a zip file. So I'm guessing I'd have to unzip it locally and upload the file? I've not done that before so sorry for asking you to hand hold.

I am already hooked, addicted to the pretty urls. Now that I am addicted my new boards have to have them, too. I absolutely cannot live without it. So if you don't have directions you're going to have to reccommend a 12-step program to wean me off the pretty urls.

I guess I could uninstall and install about once a week. That might do the trick as well.

Advertisement: