seed Posted February 27, 2014 Share Posted February 27, 2014 Добрый день. Есть такая проблема. Поставил форум с нуля. IP.Content настроил как главную страницу. (возможно есть связь) Тема не стандартная >Shift Теперь если зайти на главную страницу форума и кликнуть на время темы, то должен произойти переход к последнему сообщению, но ничего не происходит. Ссылка на времени вида сайт.ru/forums/topic/тема/?view=getlastpost Более того, если нажать на тему, происходит ровно тоже самое. Ссылка на теме сайт.ru/forums/topic/тема/?view=getnewpost Подскажите где копать Спасибо. Quote Link to comment Share on other sites More sharing options...
seed Posted February 28, 2014 Author Share Posted February 28, 2014 Как я понял корень проблемы в furlTemplates.php который я менял для вывода ip content на главную страницу. Но понять почему не открываются последние сообщения не могу need help /** * * Invision Power Services * IP.Board v3.3.4 * Sets up SEO templates * Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ * * * @author $Author: bfarber $ * @copyright © 2001 - 2009 Invision Power Services, Inc. * @license __www.invisionp...rds.php#license * @package IP.Board * @subpackage Forums * @link __www.invisionpower.com * @since 20th February 2002 * @version $Rev: 10914 $ * */ if ( ! defined( 'IN_IPB' ) ) { print " Incorrect access You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } /** * 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( 'showannouncement' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showannouncement=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'forums/forum-$3/announcement-$1-#{__title__}/$4' ), 'in' => array( 'regex' => '#/forums/forum-(d+?)?/announcement-(d+?)-#i', 'matches' => array( array( 'showannouncement', '$2' ), array( 'f', '$1' ) ) ) ), 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'forums/forum/$1-#{__title__}/$2' ), 'in' => array( 'regex' => '#^/forums/forum/(d+?)-#i', 'matches' => array( array( 'showforum', '$1' ) ) ) ), 'showtopicunread'=> array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(?:&|&)view=getnewpost(&|$)#i', 'forums/topic/$1-#{__title__}/unread/$2' ), 'in' => array( 'regex' => '#^/forums/topic/(d+?)-([^/]+?)/unread(/|$)#i', 'matches' => array( array( 'showtopic', '$1' ), array( 'view', 'getnewpost' ) ) ) ), 'showtopicnextunread'=> array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(?:&|&)view=getnextunread(&|$)#i', 'forums/topic/$1-#{__title__}/nextunread/$2' ), 'in' => array( 'regex' => '#^/forums/topic/(d+?)-([^/]+?)/nextunread(/|$)#i', 'matches' => array( array( 'showtopic', '$1' ), array( 'view', 'getnextunread' ) ) ) ), 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(&|$)#i', 'forums/topic/$1-#{__title__}/$2' ), 'in' => array( 'regex' => '#^/forums/topic/(d+?)-#i', 'matches' => array( array( 'showtopic', '$1' ) ) ) ), 'acteqst' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#act=ST(.*?)&t=(.+?)(&|$)#i', 'forums/topic/$2-#{__title__}/$3' ), 'in' => array( 'regex' => '#^notavalidrequest$#i', 'matches' => array( array( 'showtopic', '0' ) ) ) ), 'act=idx' => array( 'app' => 'forums', 'allowRedirect' => 0, 'out' => array( '#act=idx(&|$)#i', 'forums/$1' ), 'in' => array( 'regex' => '#^/forums(/|$|?)#i', 'matches' => array( array( 'act', 'idx' ) ) ) ), ); Quote Link to comment Share on other sites More sharing options...
seed Posted February 28, 2014 Author Share Posted February 28, 2014 Методом тыка пришел к вот такому файлу furlTemplates.php. Вроде работает пока. /** * * Invision Power Services * IP.Board v3.4.6 * Sets up SEO templates * Last Updated: $Date: 2012-07-31 09:39:50 -0400 (Tue, 31 Jul 2012) $ * * * @author $Author: mmecham $ * @copyright © 2001 - 2009 Invision Power Services, Inc. * @license __www.invisionpower.com/company/standards.php#license * @package IP.Board * @subpackage Forums * @link __www.invisionpower.com * @since 20th February 2002 * @version $Rev: 11159 $ * */ if ( ! defined( 'IN_IPB' ) ) { print " Incorrect access You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } /** * 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( 'showannouncement' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showannouncement=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'forum-$3/announcement-$1-#{__title__}/$4' ), 'in' => array( 'regex' => '#/forum-(d+?)?/announcement-(d+?)-#i', 'matches' => array( array( 'showannouncement', '$2' ), array( 'f', '$1' ) ) ) ), 'showforum' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showforum=(.+?)(&|$)#i', 'forum/$1-#{__title__}/$2' ), 'in' => array( 'regex' => '#^/forum/(d+?)-#i', 'matches' => array( array( 'showforum', '$1' ) ) ) ), 'showtopic' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#showtopic=(.+?)(#|&|$)#i', 'topic/$1-#{__title__}/$2' ), 'in' => array( 'regex' => '#^/topic/(d+?)-#i', 'matches' => array( array( 'showtopic', '$1' ) ) ) ), 'acteqst' => array( 'app' => 'forums', 'allowRedirect' => 1, 'out' => array( '#act=ST(.*?)&t=(.+?)(&|$)#i', 'topic/$2-#{__title__}/$3' ), 'in' => array( 'regex' => '#^notavalidrequest$#i', 'matches' => array( array( 'showtopic', '0' ) ) ) ), 'act=idx' => array( 'app' => 'forums', 'allowRedirect' => 0, 'out' => array( '#act=idx(&|$)#i', 'forums/$1' ), 'in' => array( 'regex' => '#^/forums(/|$|?)#i', 'matches' => array( array( 'act', 'idx' ) ) ) ), ); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.