News:

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

Main Menu

Pretty URLs

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

Previous topic - Next topic

Draffi

Thank you. I`m asking about the reverter-Package, not the Mod-Package. Sure, the Mod is v1.1.1a, but the reverter have a 1.0-RC2 and a 1.0-RC4 Version....

(IPB: Its in progress, i need to see how can i tranfer the data from e.g. SMF-MemberMap to IPB-MemberMap, but my timeline is soon finished, and i never can wait...

In the meantime, i try many, many great mods, too.... ;))

Arantor

The data didn't change, so no need to update the reverter...
Holder of controversial views, all of which my own.


akbora

Database Error: Duplicate entry '28900' for key 'PRIMARY'

I have updated new version but I am getting errors like that continuously.How can I solve this...
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

Johanvd

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.

It's this commented code from line 382 (line 377 in the original News.php):

/*** 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('/^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+)(#[^"]*)?$/e', '\'\' . $scripturl . \'/\' . strtr(\'$1\', \'&;=\', \'//,\') . \'.html$2\'', $val); ***/

vbgamer45

2.0.7 is not out yet the final 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

Arantor

Even when it is, anything using preg_replace with /e or ~e will require changes for PHP 5.5 compatibility which is what 2.0.7 was supposed to provide but some late bugs slipped through :(
Holder of controversial views, all of which my own.


usa4all

When trying to activate I get this message:

QuoteTable 'infosite_forum.smf_pretty_urls_cache' doesn't exist
Bestand: /home/infosite/domains/forum.verenigdestaten.info/public_html/Sources/Subs-PrettyUrls.php
Regel: 306

Opmerking: het ziet er naar uit dat je database wellicht een upgrade nodig heeft. De versie van je forumbestanden is momenteel SMF 2.0.6, terwijl je database op dit moment op versie 2.0.2 staat. Het probleem kan mogelijk verholpen worden door de nieuwste versie van upgrade.php uit te voeren.

Small Translation Dutch part below: It says some files are from a previous version, but my forum says all files are up to date.

Arantor

Ignore the bottom part because that message is misleading; the database has not changed between 2.0.2 and 2.0.6.
Holder of controversial views, all of which my own.


usa4all

Quote from: Sir Cumber-Patcher on January 21, 2014, 05:40:52 PM
Ignore the bottom part because that message is misleading; the database has not changed between 2.0.2 and 2.0.6.

Ok, But seems like there is no table in the mysql database?

Can I add that manually?

Arantor

Yeah, what it's saying is that the table didn't get made and you probably could install it manually. I'm just clarifying the point that your database isn't 'out of date'.
Holder of controversial views, all of which my own.


usa4all

Quote from: Sir Cumber-Patcher on January 21, 2014, 05:56:02 PM
Yeah, what it's saying is that the table didn't get made and you probably could install it manually. I'm just clarifying the point that your database isn't 'out of date'.
ok Tx..


Is there anyone who could help me with some discription about how to add the table?

margarett

Unpack the MOD to a temp folder and upload the file SMF2-0/install.php to your forum root (where SSI.php is)

Then run it through your browser.

Or you can uninstall (choose to delete data) and install again, should be easier.
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

margarett

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.
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

usa4all

Quote from: margarett on January 23, 2014, 08:44:31 AM
Unpack the MOD to a temp folder and upload the file SMF2-0/install.php to your forum root (where SSI.php is)

Then run it through your browser.

Or you can uninstall (choose to delete data) and install again, should be easier.

When I choose the first option I get this message:


No database selected
Bestand: /home/infosite/domains/forum.verenigdestaten.info/public_html/install.php
Regel: 30
Terug

Arantor

If the code's commented out, you don't actually need to do the replacement as such... especially as Pretty URLs removes the need to worry about queryless URLs which is all that's dealing with.


And THAT error is the sign of a mod install not being set up properly by its author.
Holder of controversial views, all of which my own.


whoey

this is a great mod, unfortunately seems to have caused us more grief than the benefit of having pretty urls, and now that it's not working with 2.0.7... we're saying goodbye for now.

usa4all

Quote from: Sir Cumber-Patcher on January 23, 2014, 11:38:59 AM
If the code's commented out, you don't actually need to do the replacement as such... especially as Pretty URLs removes the need to worry about queryless URLs which is all that's dealing with.


And THAT error is the sign of a mod install not being set up properly by its author.

Ok.. I suppose I did something wrong..   Automatic installation fails. I'll get a lot of failure's on misc. php file's..

So If I can add the table mannualy in the MsQyl database, maybe that will work..

margarett

Not really, no. The file edits are still necessary.
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

usa4all

Quote from: margarett on January 23, 2014, 12:53:41 PM
Not really, no. The file edits are still necessary.

Seems like i have to start all over again.  Put it in backorder for now, because of the 2.07 release.

nfpuu1u

Hi,

Quote from: Sir Cumber-Patcher on January 23, 2014, 11:38:59 AMIf the code's commented out, you don't actually need to do the replacement as such... especially as Pretty URLs removes the need to worry about queryless URLs which is all that's dealing with.

so Pretty URLs is compatible with the latest update 2.0.7 and PHP 5.5?

Advertisement: