Перейти к публикации
View in the app

A better way to browse. Learn more.

Дизайн и модификация Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ЧПУ IPB 3.1.4

Опубликовано:

Приветствую. У меня сразу куча фейлов.

Решил сделать ЧПУ.

 

1. При добавлении в .htaccess

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\..+$
RewriteRule . /index.php [L]
</IfModule>

Форум выключается с 505 ошибкой.

 

2. При добавлении в /admin/sources/base/core.php

static public function makeSeoTransliterate( $text )
       {
               if ( IPB_USE_SEO_TRANSLIT )
               {
                       $text = urldecode($text);

                       $text = str_replace( array('а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','э','ю','я','ы','ь','ъ'), array('a','b','v','g','d','e','e','zh','z','i','i','k','l','m','n','o','p','r','s','t','u','f','h','c','ch','sh','sh','a','ju','ja','i','',''), $text);

                       /* Fix */
                       $text = preg_replace( array('#[^a-z0-9-]#', '#-{2,}#'), array('', '-'), $text );                        
                       $text = trim($text, '-');
                       /* /Fix */

                       $text = urlencode($text);
               }

               return $text;

       }

Форум вообще отключается...

3. При изменении этих строчек в initdata.php

define( 'IPB_USE_SEO_TRANSLIT', TRUE );
define( 'IPB_USE_ONLY_ID_FURL', FALSE );

Ничего не происходит.

В чем проблема?

Как мне сделать адреса подобно http://mysite.ru/topic8105.html

А не

http://mysite.ru/index.php?/topic/373-%d1%87%d0%b5%d0%b3%d0%be-%d0%b2%d0%b0%d0%bc-%d0%bd%d0%b5-%d1%85%d0%b2%d0%b0%d1%82%d0%b0%d0%b5%d1%82/page__pid__1037#entry1037

Рекомендованные сообщения

Опубликовано:

1. Удалить Options -MultiViews

Эту строчку RewriteCond %{REQUEST_URI} !\..+$ вы вообще откуда берете? С такой не будут работать чпу вида .html

 

2. Хз

 

3. Кэш чпу нужно обновить, в редких случаях сбросить вручную.

 

Как мне сделать адреса подобно

Нужно переписать шаблоны чпу из /applications/(core|forum)/extensions/furlTemplates.php

Опубликовано:
  • Автор

Спасибо. Переписал) и все работает.

/applications/(core|forum)/extensions/furlTemplates.php

Опубликовано:
  • Автор

Емае... А можно как-то сделать, чтоб ссылка была типо: http://site.ru/index.php/topic/23622-гиперссылка/

Просто у меня вместо русских букв показывает

http://mysite.ru/index.php?/topic/373-%d1%87%d0%b5%d0%b3%d0%be-%d0%b2%d0%b0%d0%bc-%d0%bd%d0%b5-%d1%85%d0%b2%d0%b0%d1%82%d0%b0%d0%b5%d1%82/page__pid__1037#entry1037

Создайте аккаунт или войдите в него для комментирования

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.