Перейти к публикации
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.

Ссылка на профиль

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

Здравствуйте.

 

Как изменить ссылку на профиль, щас выглядит так сайт.ру/user/1-fixer/

Хочу переделать на сайт.ру/player/fixer/

 

Можно ли так ?

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

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

В корневом .htaccess через модуль mod_rewrite.c, но как... лучше спросить специалистов-гуру этого форума.

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

Без id - никак, потому что именно он служит идентификатором. user на player можно поменять в шаблоне чпу /admin/applications/members/extensions/furlTemplates.php

 

Отредактировать user в

 

user/$1-

/user/(\d+?)

После перестроить кеш чпу в АЦ.

  • 5 недель спустя...
Опубликовано:
  • Автор

почему-то на 3.4.6 не работает.

делал на 3.3.4 все работала, точно также сделал на 3.4.6 все равно ссылается на user а делал на player

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

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

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

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

я обновлял, толку ноль Инструменты > Управление кешем перестроил все кеши, также пробовал и по отдельности не помогло!

Опубликовано:
Управление кешем перестроил все кеши

Ни все, и не по отдельности, а надо один конкретный - Перестроить FURL кеш.

Также проверите правильно вы отредактировали шаблон чпу.

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

та и пробовал именно обновлять "Перестроить FURL кеш" толку ноль.

 

вот шаблон

 

<?php
/**
* Invision Power Services
* IP.Board v3.0.1
* Sets up SEO templates
* Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $
*
* @author 		$Author: bfarber $
* @copyright	(c) 2001 - 2009 Invision Power Services, Inc.
* @license		Nulled by Сайт нарушает авторские права
* @package		Invision Power Board
* @subpackage	Members
* @link		http://www.invisionpower.com
* @since		20th February 2002
* @version		$Rev: 4136 $
*
*/

/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array(  array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(

'showuser'		=> array( 'app'		      => 'members',
						  'allowRedirect' => 1,
						  'out'           => array( '#showuser=(.+?)(&|$)#i', 'player/$1/$2' ),
						  'in'            => array( 'regex'   => "#/player/(\d+)/?#i",
												    'matches' => array( array( 'showuser', '$1' ) ) ) ),

'members_status_friends'=> array( 'app'		      => 'members',
								  'allowRedirect' => 0,
								  'out'           => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=friends(&|$)#i', 'statuses/friends/$2' ),
								  'in'            => array( 'regex'   => "#/statuses/friends#i",
														    'matches' => array( array( 'app'    , 'members' ),
														    					array( 'section', 'status' ),
														    					array( 'module' , 'profile' ),
														    					array( 'type'   , 'friends' ) ) ) ),

'members_status_all'	=> array( 'app'		      => 'members',
								  'allowRedirect' => 0,
								  'out'           => array( '#app=members(?:&|&)module=profile(?:&|&)section=status((?:&|&)type=all)?(&|$)#i', 'statuses/all/$2' ),
								  'in'            => array( 'regex'   => "#/statuses/all#i",
														    'matches' => array( array( 'app'    , 'members' ),
														    					array( 'section', 'status' ),
														    					array( 'module' , 'profile'  ) ) ) ),

'members_list'  => array( 
					'app'			=> 'members',
					'allowRedirect' => 0,
					'out'			=> array( '#app=members((&|&)module=list)?#i', 'members/' ),
					'in'			=> array( 
												'regex'		=> "#/members(/|$|\?)#i",
												'matches'	=> array( array( 'app', 'members' ),
																	  array( 'module', 'list' )  )
											) 
								),
);

 

Изменено пользователем VetalDX

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

удалил шаблон, шаблон создался сам заново, переменовал на что мне надо, обновил кеш, заработало!

мистика какае-то ...

Опубликовано:
* IP.Board v3.0.1

А ничего, что это версия устарела лет десять назад?..

Для начала обновите файл от соответствующей версии форума.

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

Сейчас на странице 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.