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

Arantor

That isn't what I said. Commenting it out means the PHP 5.5 compliant code isn't going to be run. Whether PURLs itself is compliant is something else entirely.
Holder of controversial views, all of which my own.


nfpuu1u

Hi,

Quote from: Sir Cumber-Patcher on January 27, 2014, 01:58:04 AM
That isn't what I said. Commenting it out means the PHP 5.5 compliant code isn't going to be run. Whether PURLs itself is compliant is something else entirely.

upps sorry i've misunderstood your post. The part of the News.php is commented out so i thought PrettyURLs is maybe compliant.

Arantor

Well... the change made is to make the queryless URLs work - but Pretty URLs disables that. Pretty URLs itself may well not work properly on PHP 5.5 because of all the regular expressions it uses.
Holder of controversial views, all of which my own.


Don Jajo

Quote from: margarett on January 23, 2014, 08:55:59 AM
Quote from: Johanvd on January 21, 2014, 03:22:15 AM
The update from SMF 2.0.6 to 2.0.7 will not work because a change in Sources/News.php by Pretty Urls.
Can you update this mod or provide instructions on how I can fix this myself?
Thanks.

For anyone interested, the code to replace in the new 2.0.7 is:

if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0 && @get_cfg_var('cgi.fix_pathinfo') == 0) || (!$context['server']['is_apache'] && !$context['server']['is_lighttpd']))
return $val;

$val = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$~', create_function('$m', 'global $scripturl; return $scripturl . \'/\' . strtr("$m[1]", \'&;=\', \'//,\') . \'.html\' . (isset($m[2]) ? $m[2] : "");'), $val);


It was of course caused by the changes for PHP 5.5 compatibility but, since it will be commented out, it's just a matter of find the correct text.

Thanks, so should we uncomment it?

margarett

Yes or no :P In any case, you will not be able to uninstall either the upgrade or the MOD :P

Or you can ignore the error and continue (thus keeping the MOD "uninstallable" but with incorrect SMF code if you do so)
Or you can uncomment that code, let the upgrade install and then re-comment it again. This will prevent the MOD to self-install if you choose to, but you can go there manually, uncomment the code and have a nice SMF code in place.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Don Jajo

lol :D its better i uncomment and install then comment back, i can't be so retarded to uninstall the update :D thanks :)

SimpleJoe

Is there anyway to make this mod *not* rewrite URL's for a specific subfolder?

Hosting Simple Machines since YaBB -- One of the first SMF Forum Hosting providers with Chat and FTP for the inner developer in us all.

margarett

There is an option to ignore specific actions in MOD's configuration, yes
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Don Jajo

Quote from: SimpleJoe on January 30, 2014, 04:09:39 PM
Is there anyway to make this mod *not* rewrite URL's for a specific subfolder?
I can recall back when i created a directory that has the same name with a board, when i want to visit a directory it redirects me to the board. So i just added some lines of code in the directory htaccess which worked me


RewriteEngine on
RewriteBase /



SimpleJoe

Hosting Simple Machines since YaBB -- One of the first SMF Forum Hosting providers with Chat and FTP for the inner developer in us all.

cpf

So, how do I overcome this upgrade problem?  I run pretty URLs.  How can I upgrade, and have pretty URLs?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

cpf

Should I uninstall Pretty URLs, do the upgrade, then install again?
Don't email me, PM me, IM me, contact me, look at me, breath on me, or even attempt to think about thinking of contacting me.  If you do, I will send you to the correct forum to post, where I will promptly tell you that you posted in the wrong forum.

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

reFaNN

Ok, guys - you've been great but I'm seriously at a loss here. Which is the best way to confront the issue with Pretty Urls?

Keeping them and somehow installing the new SMF version over them?
Uninstalling them completely (and ruining completely every google indexed page?)?
Or disabling them temporarily just to install the new SMF version (if that's possible)?

What's your opinion on the long term prognosis with using Pretty Urls? Should we get rid off them while we still have the chance? I apologize for my lack of knowledge.

gigashiga

Hi,
I have smf 1.1.13
I guess
and I want to disable pretty url for time being through database
there is no config table in sql
I am not able to access my website

when i try to login it doesnt happen
even if i use index.php?action=admin
login2


please help

margarett

First things first: please update your forum to 1.1.19. You are *several* security fixes behind.
Use patch update, should be easy and painless (anyway, do backup)
http://wiki.simplemachines.org/smf/Patching

(of course, you need to access your forum first :P )
To disable it, go to your database via phpmyadmin, table smf_settings and find this row: pretty_enable_filters
Set it to empty (delete the 1)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

nfpuu1u

Hi,

Quote from: reFaNN on February 05, 2014, 06:37:46 PM
Ok, guys - you've been great but I'm seriously at a loss here. Which is the best way to confront the issue with Pretty Urls?

on my SMF 2.0.6 i have removed the comments of the problematic line in the News.php. Then i have installed the update to 2.0.7 and re-added the comments to the modified line. PrettyURLs is still working as far as i can test but i don't have updated to PHP 5.5 yet.

Tokzu

Hi, I installed the last version (1.1.1a) of this fantastic mod in a new installation of smf 2.0.7, but the value "pretty_bufferusecache" is not inserted in the DB. The solution: insert it manually.

I report you this so that you're aware. :P
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

kamili34

So what should be change manually in News.php? Tip me please.  ::)

Tokzu

Quote from: hqv on February 06, 2014, 07:24:58 PM
So what should be change manually in News.php? Tip me please.  ::)

In News.php

Code (Search) Select
if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0 && @get_cfg_var('cgi.fix_pathinfo') == 0) || (!$context['server']['is_apache'] && !$context['server']['is_lighttpd']))
return $val;

$val = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$~', create_function('$m', 'global $scripturl; return $scripturl . \'/\' . strtr("$m[1]", \'&;=\', \'//,\') . \'.html\' . (isset($m[2]) ? $m[2] : "");'), $val);


Code (Replace with) Select
/*if (empty($modSettings['queryless_urls']) || ($context['server']['is_cgi'] && @ini_get('cgi.fix_pathinfo') == 0 && @get_cfg_var('cgi.fix_pathinfo') == 0) || (!$context['server']['is_apache'] && !$context['server']['is_lighttpd']))
return $val;

$val = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$~', create_function('$m', 'global $scripturl; return $scripturl . \'/\' . strtr("$m[1]", \'&;=\', \'//,\') . \'.html\' . (isset($m[2]) ? $m[2] : "");'), $val);*/
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Advertisement: