News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Pretty URLs

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

Previous topic - Next topic

SomeoneElse

It knows that it's still 2.5.1c even if I change the filename, and still says no, but presumably it works for someone as that internally.

SomeoneElse

.. and if I edit the XML file to say that it's 2.5.1, it still has a red 'older version' mark and won't let me install it.

gorbi


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

Butiks

Hello.
Thanks for the wonderful mod. Everything works fine on SMF v2.1.3
I'm switching from the old version of the IPB (to SMF). And it is very important save that the old links work.
Search engines have remembered the old link format.

Please tell me how to change the output of information about links, changing the standard view, now it looks like this:

URLs FOR Boards
https://site.com/there-nameboard-sample/
 https://site.com/there-nameboard-sample/15/
 need to
 https://site.com/board233445.html
 https://site.com/board233445s15.html

URLs FOR Topics

https://site.com/there-nameboard-sample/there-name-topic-of-title/
 https://site.com/there-nameboard-sample/there-name-topic-of-title/15/
 need to
 https://site.com/topic233445.html
 https://site.com/topic233445s15.html

Use:
SMF v2.1.3
Pretty URLs v2.5.1c
Shared hosting with PHP v7.4

vbgamer45

That would be somewhat difficult. You would need access to the original database to to do a lookup based on the url entered.  Then do the mapping to the new url.

Pretty urls default is https://site.com/board-name/topic-title
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

Butiks

Quote from: vbgamer45 on March 09, 2023, 09:24:28 PMThat would be somewhat difficult. You would need access to the original database to to do a lookup based on the url entered.  Then do the mapping to the new url.

Pretty urls default is https://site.com/board-name/topic-title
After the forum conversion, all forum and topic IDs remained original. In which mod file can the code be corrected so that it displays links so that instead of names there are only ids?

vbgamer45

In that case would need pretty urls if want to display numbers? Do you want to keep urls like this site here?
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

Gryzor

#8248
Hello!

In a fresh installation (2.1.3), I'm trying to install the latest version (2.5.1c). However I'm getting the following errors when trying to apply the mod:

1.Execute ModificationSMF2-1/Sources.xmlFile not found
2.Execute ModificationSMF2-1/BoardsAndTopics.xmlFile not found
3.Execute ModificationSMF2-1/Themes.xmlFile not found
*4.Execute Modification./Themes/default/languages/Modifications.english.phpTest successful
5.Extract File./Sources/PrettyUrls.phpFile not found
6.Extract File./Sources/PrettyUrls-Filters.phpFile not found
7.Extract File./Sources/PrettyUrls-Tests.php
8.Extract File./Sources/Subs-PrettyUrls.phpFile not found
9.Extract File./Sources/Subs-PrettyUrls-Hooks.phpFile not found
10.Extract File./Themes/default/PrettyUrls.template.phpFile not found
11.Extract File./Themes/default/images/admin/prettyurls.png
12.Extract Tree./Themes/default/prettyFile not found
13.Extract File./Themes/default/languages/PrettyUrls.english.php
14.Add HookAdapting hook integrate_admin_areasTest successful
15.Adapt DatabaseSMF2-1/install.phpFile not found

I thought maybe it was a permissions issue but even setting the whole Packages directory to 777 temporarily doesn't solve it... any ideas?

Thanks!

So it would appear the package was not able to be extracted correctly; the root zip contents were extracted in temp/ , however the subfolders were not. Once I unzipped it manually I was able to install the mod, but still the usual SMF URLs appear, not prettified. No errors in the log, and htaccess has indeed been changed with:

# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: March 14, 2023, 11:44

RewriteEngine on
RewriteBase /forum

# Rules for: profiles
RewriteRule ^profile/([^/]+)/?$ ./index.php?pretty;action=profile;user=$1 [L,QSA]

# Rules for: actions
RewriteRule ^(agreement|acceptagreement|activate|admin|announce|attachapprove|buddy|calendar)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(clock|coppa|credits|deletemsg|dlattach|editpoll|editpoll2|findmember)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(groups|help|helpadmin|jsmodify|jsoption|likes|lock|lockvoting)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(login|login2|logintfa|logout|markasread|mergetopics|mlist|moderate)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(modifycat|movetopic|movetopic2|notifyannouncements|notifyboard|notifytopic|pm|post)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(post2|printpage|profile|quotefast|quickmod|quickmod2|recent|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendactivation)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(signup|signup2|smstats|suggest|splittopics|stats|sticky|theme)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(trackip|about:unknown|unread|unreadreplies|uploadAttach|verificationcode|viewprofile|vote)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewquery|viewsmfile|who|\.xml|xmlhttp|forum)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS

I'm puzzled...

Ok some more info, after changing it to use caching instead just to check things I got errors in the log:

In Subs-PrettyURLs.php:
In line 301: 2: Invalid argument supplied for foreach()
In line 298: 2: array_chunk() expects parameter 1 to be array, string given
In line 297: 8: Undefined index: action_array

Anybody can give any insights?

Thanks!

thatjustit

Hi, I have a small issue that I wrote about in this thread: https://www.simplemachines.org/community/index.php?topic=585227.0
Basically when "Enable URL rewriting" is enabled on SMF 2.1 then external links without bbcode turn into burning-brushes.pl///link.com and when I disable it then it's fine, but maybe I can add something to "Skip Actions List" so it doesn't happen?

DiscussAI.net


Advertisement: