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

Vandaahl

Quote from: lastminute on September 03, 2010, 06:08:27 AM
what is the latest version of Pretty UrLs? is it still applicable now? thanks thanks

Yes it still works with the latest beta RC3 of SMF 2.

KensonPlays

Author, is it possible to disable this mod for curve mobile and smf4iphone so i dont have to uninstall/reinstall and unselect code from smf4iphone/curve mobile...

Owner of Mesozoic Haven

MordyT

I am setting up another board (2.0 RC3) and on a clean install, this will load fine. But after I load simple portal this errors out in the package manager. If I load this first then simple portal errors out.

The package manager has an issue in subs.php

Doing a quick compare of the code I have and the code it wants to find (using the parser), I found that my code (part of it) is
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)
And the code it wants to load is
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic)

Notice how there is "page" (no quotes) after "topic", (there is two different occurrences), and causes the errors.


What do you recommend vbagmer?
Want to see SMF in action? Head over to RvOClan.info

vbgamer45

Proceed with the install and change the code to
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)
Community Suite for SMF - Grow your forum with 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

dsanchez

Quote from: dsanchez on September 03, 2010, 05:26:06 AM
Hello and thanks for this excellent mod!

I'd like to know if there is a way to eliminate certain symbols (!,*, etc.) from the URLs by default. For instance, instead

http://mysite.com/audio/1986-04-25-london-(flac)/

just

http://mysite.com/audio/1986-04-25-london-flac/

Cheers!

anyone?

vbgamer45

There isn't any built in way you would have to modify the code to strip those out.
Community Suite for SMF - Grow your forum with 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

MordyT

Quote from: vbgamer45 on September 05, 2010, 10:12:31 AM
Proceed with the install and change the code to
$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic|page)
Ok, didn't know if it wasn't safe or not.

I modified the install package to include it, do you want me to attach it?
Want to see SMF in action? Head over to RvOClan.info

vbgamer45

No that is ok. SP adds |page to that query so I can search for that too I guess.
Community Suite for SMF - Grow your forum with 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

wynnyelle

Huge overload of errors seen here:

http://www.simplemachines.org/community/index.php?topic=399571.0

i have shown them here in this thread. I need help badly with this. How do I fix it?

vbgamer45

Community Suite for SMF - Grow your forum with 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

wynnyelle

#5550
Okay! We also have more problems like when I put the links into a page they won't work, sometimes they go only to the board that the topic is on or sometimes even the WRONG topic entirely.

Where do I go to find this update and how do  I install it? I don't see a link to a new patch or anything.

vbgamer45

Just download the latest version from the modsite uninstall old install new version
Community Suite for SMF - Grow your forum with 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

wynnyelle

Wait would that reset all the pretty URL board names that I took hours to redo just to make them not return an error and make it so the boards could be acccessed? I also manually optimised them, over 400 boards.

I need to be 100% certain that all those hours of manual work won't be lost.

vbgamer45

All the data is safe in the database not removed on uninstall.
Community Suite for SMF - Grow your forum with 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

wynnyelle

Okay there's another problem that I didn't have before but have now, the boards' names are not showing up, all that shows is a number. Like this:

http://warriorcatsrpg.com/54/

The board's name is fan art and fan fiction. Shouldn't that be showing up in the URL?

vbgamer45

#5555
Edit:
Check recheck the board urls/topic links under pretty urls settings and see if that helps and saves
Community Suite for SMF - Grow your forum with 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

Frostsoul

73:  // The central part of the board - topic display.
74: function Display()
75: {
76:



global $scripturl, $txt, $modSettings, $context, $settings;
77:



global $options, $sourcedir, $user_info, $board_info, $topic, $board;
78:



global $attachments, $messages_request, $topicinfo, $language, $smcFunc;
79:
80:



// What are you gonna display if these are empty?!
81:



if (empty($topic))
82:





fatal_lang_error('no_board', false);
83:
84:



//



301 redirects
==>85:



if ((isset($context['pretty']['oldschoolquery']) || $context['pretty']['query_string']['board'] != $context['pretty']['board_urls'][$board]) && $modSettings['pretty_enable_filters'])
86:



{
87:





$filterData = unserialize($modSettings['pretty_filters']);
88:





if ($filterData['topics']['enabled'])
89:





{
90:







$url = 'topic=' . $topic . '.' . (isset($_REQUEST['start']) ? $_REQUEST['start'] : '0') . (isset($_REQUEST['prev_next']) ? ';prev_next=' . $_REQUEST['prev_next'] : '') . (isset($_REQUEST['topicseen']) ? ';topicseen' : '') . (isset($_REQUEST['all']) ? ';all' : '') . (isset($_REQUEST['viewResults']) ? ';viewResults' : '');
91:







header('HTTP/1.1 301 Moved Permanently');
92:







redirectexit($url, false);
93:





}
94:



}
95:
96:



// Load the proper template and/or sub template.
97:



if (WIRELESS)
98:





$context['sub_template'] = WIRELESS_PROTOCOL . '_display';
99:



else
100:





loadTemplate('Display');
101:
102:



// Not only does a prefetch make things slower for the server, but it makes it impossible to know if they read it.
103:



if (isset($_SERVER['HTTP_X_MOZ']) && $_SERVER['HTTP_X_MOZ'] == 'prefetch')
104:



{
105:





ob_end_clean();


Line 85 is giving us the errors. some places can't be accessed - some stuff doesn't work. Please help.

File: /home/warrior/public_html/Sources/Display.php

vbgamer45

Community Suite for SMF - Grow your forum with 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

Frostsoul

"Internal Server Error

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

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

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

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

In our error logs, it tells us that file and line 85 is what's causing it. It happens randomly in some places, some threads and some boards. It also happens with our admin > packages.

vbgamer45

Sounds like a mod_security or permissions issue on the forum. If you have mod_security I would disable it.
Community Suite for SMF - Grow your forum with 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

Advertisement: