News:

Join the Facebook Fan Page.

Main Menu

Pretty URLs

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

Previous topic - Next topic

Arantor

Which site? It's almost certainly not the URL but the relevant login form missing the flag that equates to "stay logged in forever".

jsx

Quote from: Arantor on August 26, 2020, 07:14:42 AM
Which site? It's almost certainly not the URL but the relevant login form missing the flag that equates to "stay logged in forever".

I have this modification installed on a test forum. I get this error:

An Error Has Occurred! Unable to verify referring url. Please go back and try again.

when I want to log in via the top login field with the "Forever" function selected.

I already know what was causing it. I use SSL on the forum and in the .htaccess file I had the code to redirect to SSL and after installing this modification, the modification replaces the .htaccess file with its own. I added a code to redirect to SSL to the .htaccess file and this error with logging in no longer occurs and index.php is displayed in the forum address. What do you think about it?

Arantor

So, again, which site? I didn't ask that for no reason, I wanted to see what the issue was because without seeing the HTML for myself I can't help you.

lazanet

Quote from: lazanet on October 26, 2019, 04:16:06 PM
I have problem mentioned earlier in this thread, on my SMF 2.0.15 forum, however fixes presented in those posts are no longer valid since even with latest tapatalk plugin - 4.5.2  and latest Pretty URLs - 2.1.4b, android-app:// and ios-app:// protocol links are replaced like:
"https://playpes.rs/forum/android-app://com.quoord.tapatalkpro.activity/tapatalk/playpes.rs/forum/
and
"https://playpes.rs/forum/ios-app://307880732/tapatalk/playpes.rs/forum/
respectively.

I've tried to move android-app in PrettyUrl-Filters.php to before // Absolutise relative URLs, but to no avail.
Does anyone have idea how could I fix this mess?

FYI regex for // Absolutise relative URLs is wrong since it wouldn't capture protocols with dash in them (such as ios-app and android-app)
Solution is to use this regex
~^[a-zA-Z\-]+:|^#|@~
instead of
~^[a-zA-Z]+:|^#|@~
on all occurences in PrettyUrl-Filters.php

SMFHacks.com Team

Update! 2.3.1
!Fixes for tapatalk urls thanks to lazanet
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

SMFHacks.com Team

Updated to include SMF 2.1 RC3 support.
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

statusjpn

Dear SMFHacks team,

Been using this mod on 2 of my sites and have been working great without issues so far.

1 thing i've noticed however is the HUGE amount of space it uses in the MySQL database.

i.e. On one of my sites, the entire DB is 8.2Gb large and the pretty_urls_cache table is 7.3Gb on its own.

I've gone into the Pretty URLs setting and checked the box "Use caching instead of database table for PrettyUrls".

Question is:

1) Does checking this box make it work any better and do i have to do anything else?
2) Can i safely drop the table prefix_pretty_urls_cache so that i can clear up 7.3Gb of space?

Thanks in advance!

Sir Osis of Liver

Empty the table, I believe it will remain empty once you change the setting.  It's caused problems on forums I've worked on, some servers will choke on a table that large, and makes it difficult to export a complete backup.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

SoftAid

Dear Helpers,

Ran into the same problem as statusjpn here above.
Our small SMF site 2.0.17 (Dutch version) is a free Computer-Help-site and has a tiny little Database of 500 MB.
As we run this on our host for free, and the site doesn't generate income, I can not affort to buy more space.
Of the 500 MB, there is only 90 MB free, for this moment, and decreasing rapidly.
The table smf-Messages is the biggest table with 189 MB. The second largest is smf_pretty_url_cache with 138 MB

My question, can I de-install the pretty_url_mod (Ver. 2.1) safely, and regain those 138 MB by empty the smf_pretty_url_cache-table?
Can I ran into errors with the rest of the database/forum?

When I can do this, can I also empty the smf_pretty_topic_urls and smf_pretty_topics_url_bak tables?

Thanks for your wise advise and help.

Softaid :)
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

vbgamer45

You can empty the tables via phpmyadmins smf_pretty_topics_url_bak  is not a standard table and can probably be removed.
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

SoftAid

Hello vbgamer45,

thank you for your quick response.

I supose I can then empty these tables each time it's neccesary?

SoftAid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

vbgamer45

Just use this setting instead "Use caching instead of database table for PrettyUrls".
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

SoftAid

Hi vbgamer45.

I tried to find that setting, as I did read it in this topic. Can't find it (and I'm grey, not blond  ;D)

Thanks

SoftAid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

vbgamer45

You might need a newer version. You can upgrade on topic if you can't uninstall the old version.
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

SoftAid

Hi vbgamer45,

found the setting and emptyed the tables.

Thanks a lot.

Greetings,

SoftAid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

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

s10dulkar

i lost a forum before some days and managed to get backups now i have installed new smf on a server and using old db where pretty url tables are there. when i copied prettyurl.php to package folder and tried installing from package manager it gives error below, any suggestions ?

Specified key was too long; max key length is 1000 bytes
File: /home/customer/www/samplesite.com/public_html/Packages/temp/SMF2-0/install.php
Line: 39

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.17, while your database is at version 2.0.10. The above error might possibly go away if you execute the latest version of upgrade.php.

vbgamer45

Strange...it shoudn't be that big 255 characters
You can try this query

CREATE TABLE `smf_pretty_urls_cache` (
  `url_id` varchar(255) NOT NULL,
  `replacement` varchar(255) NOT NULL,
KEY (`url_id`(100))
) ENGINE=MyISAM DEFAULT CHARSET=latin1

Where smf_ is your database prefix


You would then need to remove these lines from install.php

$smcFunc['db_drop_table']('{db_prefix}pretty_urls_cache');
$smcFunc['db_create_table']('{db_prefix}pretty_urls_cache', array(
array('name' => 'url_id', 'type' => 'varchar', 'size' => 255),
array('name' => 'replacement', 'type' => 'varchar', 'size' => 255),
), array(
array('type' => 'primary', 'columns' => array('url_id')),
), array(), 'overwrite');


Then repackage the zip file and install from there.

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

s10dulkar

Quote from: vbgamer45 on December 08, 2020, 01:57:53 PM
Strange...it shoudn't be that big 255 characters
You can try this query

CREATE TABLE `smf_pretty_urls_cache` (
  `url_id` varchar(255) NOT NULL,
  `replacement` varchar(255) NOT NULL,
KEY (`url_id`(100))
) ENGINE=MyISAM DEFAULT CHARSET=latin1

Where smf_ is your database prefix


You would then need to remove these lines from install.php

$smcFunc['db_drop_table']('{db_prefix}pretty_urls_cache');
$smcFunc['db_create_table']('{db_prefix}pretty_urls_cache', array(
array('name' => 'url_id', 'type' => 'varchar', 'size' => 255),
array('name' => 'replacement', 'type' => 'varchar', 'size' => 255),
), array(
array('type' => 'primary', 'columns' => array('url_id')),
), array(), 'overwrite');


Then repackage the zip file and install from there.

thank you for quick reply sir. query ran successfully but where can i find install.php ?

s10dulkar

Quote from: vbgamer45 on December 08, 2020, 01:57:53 PM
Strange...it shoudn't be that big 255 characters
You can try this query

CREATE TABLE `smf_pretty_urls_cache` (
  `url_id` varchar(255) NOT NULL,
  `replacement` varchar(255) NOT NULL,
KEY (`url_id`(100))
) ENGINE=MyISAM DEFAULT CHARSET=latin1

Where smf_ is your database prefix


You would then need to remove these lines from install.php

$smcFunc['db_drop_table']('{db_prefix}pretty_urls_cache');
$smcFunc['db_create_table']('{db_prefix}pretty_urls_cache', array(
array('name' => 'url_id', 'type' => 'varchar', 'size' => 255),
array('name' => 'replacement', 'type' => 'varchar', 'size' => 255),
), array(
array('type' => 'primary', 'columns' => array('url_id')),
), array(), 'overwrite');


Then repackage the zip file and install from there.
and what does it mean by repackage the zip file and install ?

Advertisement: