News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Pretty URLs

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

Previous topic - Next topic

vbgamer45

It was mentioned a few pages back on the edits to be made
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Xpresskonami

Quote from: vbgamer45 on May 28, 2018, 01:31:04 PM
It was mentioned a few pages back on the edits to be made

please can I have the link to the page please and please

GigaWatt

I think this might be the one.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Xpresskonami

Quote from: Dwev on March 23, 2018, 02:59:31 PM
Quote from: vivien on September 26, 2010, 12:22:16 PM
I have a problem with apostrophe / simple quote ( ' ) in the name of Boards : Firefox can open the page.

Boards without ' => ok
Boards with ' => not ok

I had this problem with the names of topics, Pretty URLs would write single apostrophes in the URLs.
They still worked, but that's not a good thing for indexing by search bots (which I could see in Google's Webmaster Tools) and not all browsers handel them well.

So we altered Sources/Subs-PrettyUrls.php like this:


'-' => array ('-', ' ', '.', ',', "'", '"'),
'_' => array ('_'),
'!' => array ('!'),
'~' => array ('~'),
'*' => array ('*'),
//"\x12" => array ("'", '"'),


And all is well.

I would think that this works for Board URLs as well (same principle).

This is exactly issues am talking about, what how can i set up this to get ride of the characters `()[]

GigaWatt

Quote from: Xpresskonami on May 28, 2018, 10:09:19 PM
This is exactly issues am talking about, what how can i set up this to get ride of the characters `()[]

Maybe something like this ???.


'-' => array ('-', ' ', '.', ',', "'", '"','(',')','[',']'),
'_' => array ('_'),
'!' => array ('!'),
'~' => array ('~'),
'*' => array ('*'),
//"\x12" => array ("'", '"'),


Just to make things clear, I've never used this mod and I have no idea how it actually works (what's behind the hood), so I can't take responsibility if you apply these changes and something goes wrong.

Keep a backup of the original Subs-PrettyUrls.php in case you need to uninstall the mod, since it may not uninstall properly if you make these changes manually.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Xpresskonami

Quote from: vbgamer45 on May 28, 2018, 01:31:04 PM
It was mentioned a few pages back on the edits to be made

Come in here Vbgamer45 please. How can the characters be fix. ?? Many users needs this.

vbgamer45

I think you would take out '(',')',
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Xpresskonami

Quote from: vbgamer45 on May 29, 2018, 01:23:37 PM
I think you would take out '(',')',

Yes.. but in what line will this be placed in the file. that's what I want to know

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

floyde

good night friends,

I installed this mod PrettyUrls1.1.6 so it is giving me this error below, can someone help me

I do not know! I use the new version 2.0.15 and gave 500 error.

Can someone help me ?
rewrite_module is enabled


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Xpresskonami

Quote from: SMFHacks.com Team on March 31, 2018, 12:35:08 PM
Update
1.1.6
!Fix for non latin characters in topics if mysql default-character-set is not utf8. This will fix wrong topics in urls like this site.tld/correct-board-title/t123/msg456 thanks to digger

I just install the new mod of the 1.6 and i see the character as been in the code , but it keep showing in my urls

Quote
   //   Do you know your ABCs?
   $characterHash = array (
      'a'   =>   array ('a', 'A', 'à', 'À', 'á', 'Á', 'â', 'Â', 'ã', 'Ã', 'ä', 'Ä', 'å', 'Å', 'ª', 'ą', 'Ą', 'а', 'А', 'ạ', 'Ạ', 'ả', 'Ả', 'Ầ', 'ầ', 'Ấ', 'ấ', 'Ậ', 'ậ', 'Ẩ', 'ẩ', 'Ẫ', 'ẫ', 'Ă', 'ă', 'Ắ', 'ắ', 'Ẵ', 'ẵ', 'Ặ', 'ặ', 'Ằ', 'ằ', 'Ẳ', 'ẳ', 'а', 'А'),
      'ae'   =>   array ('æ', 'Æ'),
      'b'   =>   array ('b', 'B', 'б', 'Б'),
      'c'   =>   array ('c', 'C', 'ç', 'Ç', 'ć', 'Ć', 'č', 'Č', 'ц', 'Ц'),
      'd'   =>   array ('d', 'D', 'Ð', 'đ', 'Đ', 'ď', 'Ď', 'д', 'Д'),
      'e'   =>   array ('e', 'E', 'è', 'È', 'é', 'É', 'ê', 'Ê', 'ë', 'Ë', 'ę', 'Ę', 'е', 'Е', 'ё', 'Ё', 'э', 'Э', 'Ẹ', 'ẹ', 'Ẻ', 'ẻ', 'Ẽ', 'ẽ', 'Ề', 'ề', 'Ế', 'ế', 'Ệ', 'ệ', 'Ể', 'ể', 'Ễ', 'ễ', 'ε', 'Ε', 'ě', 'Ě', 'е', 'Е'),
      'f'   =>   array ('f', 'F', 'ф', 'Ф'),
      'g'   =>   array ('g', 'G', 'ğ', 'Ğ', 'г', 'Г'),
      'h'   =>   array ('h', 'H', 'х', 'Х'),
      'i'   =>   array ('i', 'I', 'ì', 'Ì', 'í', 'Í', 'î', 'Î', 'ï', 'Ï', 'ı', 'İ', 'Ị', 'ị', 'Ỉ', 'ỉ', 'Ĩ', 'ĩ', 'Ι', 'ι', 'и', 'И'),
      'j'   =>   array ('j', 'J', 'й', 'Й'),
      'k'   =>   array ('k', 'K', 'к', 'К', 'κ', 'Κ', 'к', 'К'),
      'l'   =>   array ('l', 'L', 'ł', 'Ł', 'л', 'Л'),
      'm'   =>   array ('m', 'M', 'м', 'М', 'Μ', 'м', 'М'),
      'n'   =>   array ('n', 'N', 'ñ', 'Ñ', 'ń', 'Ń', 'ň', 'Ň', 'н', 'Н'),
      'o'   =>   array ('o', 'O', 'ò', 'Ò', 'ó', 'Ó', 'ô', 'Ô', 'õ', 'Õ', 'ö', 'Ö', 'ø', 'Ø', 'º', 'о', 'О', 'Ọ', 'ọ', 'Ỏ', 'ỏ', 'Ộ', 'ộ', 'Ố', 'ố', 'Ỗ', 'ỗ', 'Ồ', 'ồ', 'Ổ', 'ổ', 'Ơ', 'ơ', 'Ờ', 'ờ', 'Ớ', 'ớ', 'Ợ', 'ợ', 'Ở', 'ở', 'Ỡ', 'ỡ', 'ο', 'Ο', 'о', 'О'),
      'p'   =>   array ('p', 'P', 'п', 'П'),
      'q'   =>   array ('q', 'Q'),
      'r'   =>   array ('r', 'R', 'ř', 'Ř', 'р', 'Р'),
      's'   =>   array ('s', 'S', 'ş', 'Ş', 'ś', 'Ś', 'š', 'Š', 'с', 'С'),
      'ss'   =>   array ('ß'),
      't'   =>   array ('t', 'T', 'т', 'Т', 'τ', 'Τ', 'ţ', 'Ţ', 'ť', 'Ť', 'т', 'Т'),
      'u'   =>   array ('u', 'U', 'ù', 'Ù', 'ú', 'Ú', 'û', 'Û', 'ü', 'Ü', 'Ụ', 'ụ', 'Ủ', 'ủ', 'Ũ', 'ũ', 'Ư', 'ư', 'Ừ', 'ừ', 'Ứ', 'ứ', 'Ự', 'ự', 'Ử', 'ử', 'Ữ', 'ữ', 'ů', 'Ů', 'у', 'У'),
      'v'   =>   array ('v', 'V', 'в', 'В'),
      'w'   =>   array ('w', 'W'),
      'x'   =>   array ('x', 'X', '×'),
      'y'   =>   array ('y', 'Y', 'ý', 'Ý', 'ÿ', 'Ỳ', 'ỳ', 'Ỵ', 'ỵ', 'Ỷ', 'ỷ', 'Ỹ', 'ỹ', 'ы', 'Ы'),
      'z'   =>   array ('z', 'Z', 'ż', 'Ż', 'ź', 'Ź', 'ž', 'Ž', 'Ζ', 'з', 'З'),
      'jo' => array ('ё', 'Ё'),
      'zh' => array ('ж', 'Ж'),
      'ch' => array ('ч', 'Ч'),
      'sh' => array ('ш', 'Ш'),
      'sch' => array ('щ', 'Щ'),
      'eh' => array ('э', 'Э'),
      'yu' => array ('ю', 'Ю'),
      'ya' => array ('я', 'Я'),
      '' => array ('ъ', 'Ъ', 'ь', 'Ь', '?', '«', '»', ':', '&', '+', '@', '%', '^', '№', '#'),
      '-'   =>   array ('-', ' ', '.', ',', "'", '"'),
      '_'   =>   array ('_'),
      '!'   =>   array ('!'),
      '~'   =>   array ('~'),
      '*'   =>   array ('*'),
      "\x12"   =>   array ("'", '"'),
      '('   =>   array ('(', '{', '['),
      ')'   =>   array (')', '}', ']'),

      '$'   =>   array ('$'),
      '0'   =>   array ('0'),
      '1'   =>   array ('1', '¹'),
      '2'   =>   array ('2', '²'),
      '3'   =>   array ('3', '³'),
      '4'   =>   array ('4'),
      '5'   =>   array ('5'),
      '6'   =>   array ('6'),
      '7'   =>   array ('7'),
      '8'   =>   array ('8'),
      '9'   =>   array ('9'),
   );

GigaWatt

Try this.

Code (Subs-PrettyUrls.php) Select
'-' => array ('-', ' ', '.', ',', "'", '"', '`', '(', ')', '[', ']'),
'_'   =>   array ('_'),
'!'   =>   array ('!'),
'~'   =>   array ('~'),
'*'   =>   array ('*'),
"\x12"   =>   array ("'", '"'),
// '('   =>   array ('(', '{', '['),
// ')'   =>   array (')', '}', ']'),
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

floyde


good night friends,

I installed this mod PrettyUrls1.1.6 so it is giving me this error below, can someone help me

I do not know! I use the new version 2.0.15 and gave 500 error.

Can someone help me ?
rewrite_module is enabled


Code: [Select]
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Kindred

Floyde, you have made the same post three times. Please stop.  Your issue will be addressed when someone has a chance or an idea.  Until that time, you need to wait. multi-posting is rude.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Xpresskonami

Quote from: GigaWatt on May 29, 2018, 08:23:50 PM
Try this.

Code (Subs-PrettyUrls.php) Select
'-' => array ('-', ' ', '.', ',', "'", '"', '`', '(', ')', '[', ']'),
'_'   =>   array ('_'),
'!'   =>   array ('!'),
'~'   =>   array ('~'),
'*'   =>   array ('*'),
"\x12"   =>   array ("'", '"'),
// '('   =>   array ('(', '{', '['),
// ')'   =>   array (')', '}', ']'),



This work for Me. thanks to the Developers in the forum.. The pretty-url is now fine and friendly


mattizzy

I installed this mod. It is good. I commed you for that. Please I would love to know how to customize the Default PRETTY URL.

E.g
Changing
site.com/board/topic-name
to site.com/topic_id/topic-name

It would have been better if you included a way to do this in there.

Please thanks in advance.
I am only an SMF Addict. I think I took overdose.

vbgamer45

No easy way to do that requires a lot of of changes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mattizzy

Thank you. I don't like the fact that the board name is showing. Can I easily remove the board from site.com/board/topic to site.com/custom_text/topic
I am only an SMF Addict. I think I took overdose.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mattizzy

Quote from: vbgamer45 on June 13, 2018, 11:41:52 PM
No easy way to do that requires a lot of of changes.

Please can you tell me how to change them.
To
site.com/topic_Id/topic-name

I'm moving to SMF and that's how my URL IS, I DON'T WANT ANY BROKEN LINK
I am only an SMF Addict. I think I took overdose.

Advertisement: