phpbb-seo / usu

Ultimate phpBB SEO Friendly URL extension
GNU General Public License v2.0
17 stars 12 forks source link

phpbb 3.3 #27

Closed ser closed 4 years ago

ser commented 4 years ago

phpbb 3.3 changed something and extension does not work at all :(

batazo commented 4 years ago

It seems It is an abandoned project

meis2m commented 4 years ago

https://github.com/phpbb-seo/usu/commit/6504f103831cbd46fe2982aeb40fc3cbd243d08c

batazo commented 4 years ago

6504f10

Thank for fast reaction. I hope it will work on phpbb3.3

tmartincpp commented 4 years ago

Hello,

Thanks for the commit meis2m.

For the record there is at least one another change required by PHPBB 3.3.0; here is the patch :

--- phpbb32/ext/phpbbseo/usu/acp/usu.php    2019-10-31 07:01:34.000000000 +0100
+++ phpbb33/ext/phpbbseo/usu/acp/usu.php    2020-01-21 16:42:55.146005538 +0100
@@ -730,7 +730,7 @@ class usu
                    // Let's make sure that the proper field was added to the topic table
                    if ($config_name === 'sql_rewrite' && $config_value == 1 && !$this->core->seo_opt['sql_rewrite'])
                    {
-                       $db_tools = new \phpbb\db\tools($this->db);
+                       $db_tools = new \phpbb\db\tools\tools($this->db);
                        $db_tools->db->sql_return_on_error(true);

                        if (!$db_tools->sql_column_exists(TOPICS_TABLE, 'topic_url'))

This allow to enable "Activate SQL Rewriting". This patch is mandatory as phpbb/db/tools.php doesn't exist anymore in 3.3.0.

meis2m commented 4 years ago

Hello,

Thanks for the commit meis2m.

For the record there is at least one another change required by PHPBB 3.3.0; here is the patch :

--- phpbb32/ext/phpbbseo/usu/acp/usu.php  2019-10-31 07:01:34.000000000 +0100
+++ phpbb33/ext/phpbbseo/usu/acp/usu.php  2020-01-21 16:42:55.146005538 +0100
@@ -730,7 +730,7 @@ class usu
                  // Let's make sure that the proper field was added to the topic table
                  if ($config_name === 'sql_rewrite' && $config_value == 1 && !$this->core->seo_opt['sql_rewrite'])
                  {
-                     $db_tools = new \phpbb\db\tools($this->db);
+                     $db_tools = new \phpbb\db\tools\tools($this->db);
                      $db_tools->db->sql_return_on_error(true);

                      if (!$db_tools->sql_column_exists(TOPICS_TABLE, 'topic_url'))

This allow to enable "Activate SQL Rewriting". This patch is mandatory as phpbb/db/tools.php doesn't exist anymore in 3.3.0.

Thank you bro