aLEX49566 Опубликовано 21 января Поделиться Опубликовано 21 января Advanced Tags & Prefixes v3.2.2.tar Уже было. Сорян тогда) Не заметил( Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 22 января Поделиться Опубликовано 22 января В 21.01.2024 в 02:07, gnom4k1 сказал: А мне помочь можешь? В чем именно? Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
mgs22 Опубликовано 27 января Поделиться Опубликовано 27 января Hey! is there any replacement for this plugin? even with the latest modifications provided doesnt work with 4.7.15 Zero108 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 28 января Поделиться Опубликовано 28 января mgs22 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля ArgumentCountError: Too few arguments to function IPS\forums\_Forum::clubForm(), 1 passed in /html/init.php(913) : eval()'d code on line 213 and exactly 2 expected (0) #0 /html/init.php(913) : eval()'d code(213): IPS\forums\_Forum->clubForm() #1 /html/applications/core/modules/admin/clubs/clubs.php(468): IPS\forums\advancedtagsprefixes_hook_forumLastPostPrefix->clubForm() #2 /html/system/Dispatcher/Controller.php(90): IPS\core\modules\admin\clubs\_clubs->nodeForm() #3 /html/applications/core/modules/admin/clubs/clubs.php(38): IPS\Dispatcher\_Controller->execute() #4 /html/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\clubs\_clubs->execute() #5 /html/siteadminant/index.php(13): IPS\_Dispatcher->run() #6 {main} При создании в клубах, темы, вызывает окно с ошибкой и не дает создать темы Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля На 4.7 такая же ситуцация. Нужно деактивировать приложение Advanced Tags & Prefixes, создать форум в клубе, затем активировать приложение. Ну, или обратиться к кодеру. Там проблема в какой-то одной строке, скорее всего, как показывает практика. Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Не фанат ошибок. Пока выключил это приложение. Может кто то исправит-включу. Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля hooks/ForunLasrPostPrefix.php найти parent::clubForm( $form ); заменить на parent::clubForm( $form, $club ); найти public function setLastComment( \IPS\Content\Comment $comment=NULL ) заменить на public function setLastComment( \IPS\Content\Comment $comment=NULL, \IPS\Content\Item $updatedItem = null ) Больше не искал, всплывет еще что-то - пишите. aLEX49566 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля 9 минут назад, Desti сказал: hooks/ForunLasrPostPrefix.php найти parent::clubForm( $form ); заменить на parent::clubForm( $form, $club ); найти public function setLastComment( \IPS\Content\Comment $comment=NULL ) заменить на public function setLastComment( \IPS\Content\Comment $comment=NULL, \IPS\Content\Item $updatedItem = null ) Больше не искал, всплывет еще что-то - пишите. Спасибо. Попробую вечером 😙 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Форумы теперь дает создавать в клубах. Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля 1 час назад, Zero108 сказал: Форумы теперь дает создавать в клубах. А через ац дает создавать темы в клубах? И редактировать Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля в том же файле найти if ( isset( $values['allowed_prefixes'] ) and !empty( $values['allowed_prefixes'] ) ) добавить перед $values['club_node_public'] = 0; темы после этого создает и редактирует. aLEX49566 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля 38 минут назад, Desti сказал: в том же файле найти if ( isset( $values['allowed_prefixes'] ) and !empty( $values['allowed_prefixes'] ) ) добавить перед $values['club_node_public'] = 0; темы после этого создает и редактирует. Испробуем) сколько с меня золотых?) Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Гусары денег не берут! aLEX49566 и avangcom 2 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля 7 часов назад, Zero108 сказал: Форумы теперь дает создавать в клубах. можешь кинуть исправленный файл? нА 4.6 не заводится что то.. ArgumentCountError: Too few arguments to function IPS\forums\_Forum::clubForm(), 1 passed in /html/init.php(913) : eval()'d code on line 213 and exactly 2 expected (0) #0 /antcod4.ru/html/init.php(913) : eval()'d code(213): IPS\forums\_Forum->clubForm() #1 //html/applications/core/modules/front/clubs/view.php(1545): IPS\forums\advancedtagsprefixes_hook_forumLastPostPrefix->clubForm() #2 /html/system/Dispatcher/Controller.php(90): IPS\core\modules\front\clubs\_view->nodeForm() #3 /html/applications/core/modules/front/clubs/view.php(120): IPS\Dispatcher\_Controller->execute() #4 /html/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\front\clubs\_view->execute() #5 /html/index.php(13): IPS\_Dispatcher->run() #6 {main} Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Цитата //<?php class advancedtagsprefixes_hook_forumLastPostPrefix extends _HOOK_CLASS_ { /** * Set last comment * * @param \IPS\Content\Comment $comment The latest comment or NULL to work it out * @return void */ public function setLastComment( \IPS\Content\Comment $comment=NULL, \IPS\Content\Item $updatedItem = null ) { try { try { /** * Save prefix off with the topic */ if ( $comment === NULL ) { try { $select = \IPS\Db::i()->select( '*', 'forums_topics', array( "forums_topics.forum_id={$this->id} AND forums_topics.approved=1" ), 'forums_topics.last_post DESC', 1 )->first(); $topic = \IPS\forums\Topic::constructFromData( $select ); $this->last_prefix = $topic->prefix(); return call_user_func_array( 'parent::setLastComment', func_get_args() ); } catch ( \UnderflowException $e ) { $this->last_prefix = NULL; return call_user_func_array( 'parent::setLastComment', func_get_args() ); } } $this->last_prefix = $comment->item()->prefix(); return call_user_func_array( 'parent::setLastComment', func_get_args() ); } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * Get last post data * * @return array|NULL */ public function lastPost() { try { try { /** * Load prefix for display with last post info */ $result = call_user_func_array( 'parent::lastPost', func_get_args() ); if( !is_null( $result ) ) { /** * Must recreate the condition structure to get the data from the right place. */ if ( !$this->can_view_others and ( !( \IPS\Member::loggedIn()->modPermission( 'forums' ) === -1 or ( is_array( \IPS\Member::loggedIn()->modPermission( 'forums' ) ) and in_array( $this->_id, \IPS\Member::loggedIn()->modPermission( 'forums' ) ) ) ) and !\IPS\Member::loggedIn()->modPermission( 'can_read_all_topics' ) ) ) { try { $lastPost = \IPS\forums\Topic\Post::constructFromData( \IPS\Db::i()->select( '*', 'forums_posts', array( 'topic_id=? AND queued=0', \IPS\Db::i()->select( 'tid', 'forums_topics', array( 'forum_id=? AND approved=1 AND starter_id=?', $this->_id, \IPS\Member::loggedIn()->member_id ), 'last_post DESC', 1 )->first() ), 'post_date DESC', 1 )->first() ); $result['prefix'] = $lastPost->item()->prefix(); $result['prefix_encoded'] = rawurlencode( $result['prefix'] ); } catch ( \UnderflowException $e ) { } } elseif ( !$this->permission_showtopic and !$this->can('read') ) { } else { if( $this->last_post and $result['date'] == $this->last_post ) { $result['prefix'] = $this->last_prefix; $result['prefix_encoded'] = rawurlencode( $result['prefix'] ); } } } return $result; } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * [Node] Add/Edit Form * * @param \IPS\Helpers\Form $form The form * @return void */ public function form( &$form ) { try { try { parent::form( $form ); if ( \IPS\Settings::i()->tags_enabled ) { $form->add( new \IPS\Helpers\Form\YesNo( 'show_prefix_in_desc', $this->show_prefix_in_desc, FALSE, array(), NULL, NULL, NULL, 'show_prefix_in_desc' ) ); } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * Set form for creating a node of this type in a club * * @param \IPS\Helpers\Form $form Form object * @return void */ public function clubForm( \IPS\Helpers\Form $form, \IPS\Member\Club $club ) { try { try { parent::clubForm( $form, $club ); if ( static::isTaggable() === TRUE ) { /** * If there are multiple tabs, add another one for ours. */ if ( count( $form->elements ) > 1 ) { // No icon: looks nice, but no way to tell if the existing tabs have icons. aarg. $form->addTab( 'advancedtagsprefixes_node_tab'/*, 'tags'*/ ); } $form->addHeader('advancedtagsprefixes_node_tab'); $isForum = ( $this instanceof \IPS\forums\Forum ) ? TRUE : FALSE; if ( $isForum === TRUE ) { /** * If forums, toggle our settings on the 'allow prefixes' and 'allow tags' settings. */ $tagFieldKeys = array( 'bw_disable_prefixes', 'forum_tag_predefined', 'tag_mode', 'require_prefix', 'default_prefix', 'default_tags', 'show_prefix_in_desc', 'tag_min', 'tag_max' ); $prefixFieldKeys = array( 'require_prefix', 'default_prefix', 'show_prefix_in_desc', 'allowed_prefixes' ); $form->add( new \IPS\Helpers\Form\YesNo( 'bw_disable_tagging', !$this->forums_bitoptions['bw_disable_tagging'], FALSE, array( 'togglesOn' => $tagFieldKeys ), NULL, NULL, NULL, 'bw_disable_tagging' ), NULL ); $form->add( new \IPS\Helpers\Form\YesNo( 'bw_disable_prefixes', !$this->forums_bitoptions['bw_disable_prefixes'], FALSE, array( 'togglesOn' => $prefixFieldKeys ), NULL, NULL, NULL, 'bw_disable_prefixes' ), NULL ); } /** * Gather sources for settings */ $tagModes = array( 'inherit' => \IPS\Member::loggedIn()->language()->addToStack('advancedtagsprefixes_tagmode_inherit'), 'open' => \IPS\Member::loggedIn()->language()->addToStack('advancedtagsprefixes_tagmode_open'), 'closed' => \IPS\Member::loggedIn()->language()->addToStack('advancedtagsprefixes_tagmode_closed'), 'prefix' => \IPS\Member::loggedIn()->language()->addToStack('advancedtagsprefixes_tagmode_prefix'), ); $app = \IPS\Application::load('advancedtagsprefixes'); $allowedTags = array(); foreach ( explode( ',', $this->tag_predefined ) as $v ) { $allowedTags[ $v ] = $v; } $allPrefixes = array(); foreach ( $app->getPrefixCache() as $k => $v ) { $prefix = \IPS\advancedtagsprefixes\Prefix::constructFromData( $v ); if ( $prefix !== FALSE ) { $allPrefixes[ $k ] = $k; } } if ( count( $allPrefixes ) < 2 ) { $allPrefixes = array( '' => '' ) + $allPrefixes; } /** * Add our special settings */ if ( $isForum === TRUE ) { // Adding input that may otherwise be missing (if \IPS\Settings::i()->tags_open_system) $form->add( new \IPS\Helpers\Form\Text( 'forum_tag_predefined', implode( ',', $allowedTags ), FALSE, array( 'autocomplete' => array( 'unique' => 'true' ), 'nullLang' => 'forum_tag_predefined_unlimited' ), NULL, NULL, NULL, 'forum_tag_predefined' ), NULL ); } $form->add( new \IPS\Helpers\Form\YesNo( 'require_prefix', $this->require_prefix, FALSE, array(), NULL, NULL, NULL, 'require_prefix' ) ); $form->add( new \IPS\Helpers\Form\Select( 'tag_mode', $this->tag_mode, FALSE, array( 'options' => $tagModes ), NULL, NULL, NULL, 'tag_mode' ) ); $form->add( new \IPS\Helpers\Form\Text( 'default_tags', $this->default_tags, FALSE, array( 'autocomplete' => array( 'unique' => 'true' ), 'nullLang' => NULL ), NULL, NULL, NULL, 'default_tags' ) ); $form->add( new \IPS\Helpers\Form\Text( 'allowed_prefixes', $this->allowed_prefixes, FALSE, array( 'autocomplete' => array( 'unique' => 'true', 'source' => $allPrefixes, 'freeChoice' => FALSE ) ), NULL, NULL, NULL, 'allowed_prefixes' ) ); $form->add( new \IPS\Helpers\Form\Select( 'default_prefix', $this->default_prefix, FALSE, array( 'options' => array( '' => '' ) + $allPrefixes ), NULL, NULL, NULL, 'default_prefix' ) ); $form->add( new \IPS\Helpers\Form\Number( 'tag_min', !is_null( $this->tag_min ) ? $this->tag_min : -1, FALSE, array( 'unlimited' => -1, 'unlimitedLang' => 'use_default' ), NULL, NULL, NULL, 'tag_min' ) ); $form->add( new \IPS\Helpers\Form\Number( 'tag_max', !is_null( $this->tag_max ) ? $this->tag_max : -1, FALSE, array( 'unlimited' => -1, 'unlimitedLang' => 'use_default' ), NULL, NULL, NULL, 'tag_max' ) ); } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * Determine whether the current node class is taggable. Only way to find this is through the child content item class. Isn't that grand? */ public static function isTaggable() { try { try { if ( isset( static::$contentItemClass ) and \IPS\Settings::i()->tags_enabled and in_array( 'IPS\Content\Tags', class_implements( static::$contentItemClass ) ) ) { return TRUE; } return FALSE; } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * Save club form * * @param \IPS\Member\Club $club The club * @param array $values Values * @return void */ public function saveClubForm( \IPS\Member\Club $club, $values ) { try { try { /** * Unpack our values and cleanse. */ $values['club_node_public'] = 0; if ( isset( $values['allowed_prefixes'] ) and !empty( $values['allowed_prefixes'] ) ) { if( !is_array( $values['allowed_prefixes'] ) ) { $values['allowed_prefixes'] = explode( ',', $values['allowed_prefixes'] ); } array_map( 'trim', $values['allowed_prefixes'] ); $values['allowed_prefixes'] = array_filter( $values['allowed_prefixes'] ); } $nodeSettings = array(); foreach ( \IPS\advancedtagsprefixes\Application::$nodeSettingsKeys as $key ) { $nodeSettings[ $key ] = isset( $values[ $key ] ) ? $values[ $key ] : NULL; unset( $values[ $key ] ); } /** * Set default tag values */ $this->forums_bitoptions['bw_disable_tagging'] = !$values['bw_disable_tagging']; $this->forums_bitoptions['bw_disable_prefixes'] = !$values['bw_disable_prefixes']; $this->tag_predefined = implode( ',', $values['forum_tag_predefined'] ); /** * Do the normal node save hereish. */ parent::saveClubForm( $club, $values ); /** * Save our values after the node. */ $this->saveNodeSettings( $nodeSettings ); } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } /** * Save AT&P node data to the DB. * * @param array $nodeSettings * @return $this */ protected function saveNodeSettings( $nodeSettings ) { try { try { if ( static::isTaggable() === TRUE and !is_null( static::$permApp ) and !is_null( static::$permType ) and !empty( $nodeSettings ) ) { $primaryKey = static::$databaseColumnId; if ( !isset( $nodeSettings['default_tags'] ) ) { $nodeSettings['default_tags'] = array(); } if ( !is_array( $nodeSettings['default_tags'] ) ) { $nodeSettings['default_tags'] = explode( ',', $nodeSettings['default_tags'] ); } if ( !isset( $nodeSettings['allowed_prefixes'] ) ) { $nodeSettings['allowed_prefixes'] = array(); } if ( !is_array( $nodeSettings['allowed_prefixes'] ) ) { $nodeSettings['allowed_prefixes'] = explode( ',', $nodeSettings['allowed_prefixes'] ); } $data = array( 'node_app' => static::$permApp, 'node_type' => static::$permType, 'node_id' => $this->$primaryKey, 'require_prefix' => isset( $nodeSettings['require_prefix'] ) ? (int)$nodeSettings['require_prefix'] : 0, 'default_prefix' => $nodeSettings['default_prefix'] ?: NULL, 'default_tags' => !empty( $nodeSettings['default_tags'] ) ? implode( ',', $nodeSettings['default_tags'] ) : NULL, 'tag_mode' => $nodeSettings['tag_mode'] ?: NULL, 'allowed_prefixes' => !empty( $nodeSettings['allowed_prefixes'] ) ? implode( ',', $nodeSettings['allowed_prefixes'] ) : NULL, 'tag_min' => (int)$nodeSettings['tag_min'], 'tag_max' => (int)$nodeSettings['tag_max'], ); \IPS\Db::i()->insert( 'advancedtagsprefixes_node_settings', $data, TRUE ); \IPS\Application::load('advancedtagsprefixes')->flushNodeSettingsCache(); } return $this; } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); } else { throw $e; } } } } Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Еще в tools rebuild не работает.. Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля и облако тегов тоже Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Zero108 версия 3.2.2 ? Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 2 февраля Поделиться Опубликовано 2 февраля Вот, это должно работать на 4.6 и 4.7, проверяйте. Advanced Tags & Prefixes 3.2.2a.tar aLEX49566, avangcom и bigpipo 1 2 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
aLEX49566 Опубликовано 3 февраля Поделиться Опубликовано 3 февраля 1 час назад, Desti сказал: Вот, это должно работать на 4.6 и 4.7, проверяйте. Advanced Tags & Prefixes 3.2.2a.tar 267.5 kB · 1 загрузка Это в загрузки надо добавить. Спасибо, добрый человек!! Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Zero108 Опубликовано 3 февраля Поделиться Опубликовано 3 февраля 5 часов назад, Desti сказал: Вот, это должно работать на 4.6 и 4.7, проверяйте. Можно список измененных файлов, чтобы всё не проверять? Не хочу, чтобы кастомные изменения слетели. Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 3 февраля Поделиться Опубликовано 3 февраля Все без исключения, везде криворукость разработчика. Один хук темы только без ошибок. aLEX49566 и avangcom 1 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
avangcom Опубликовано 22 марта Поделиться Опубликовано 22 марта On 2/3/2024 at 3:28 AM, Desti said: Вот, это должно работать на 4.6 и 4.7, проверяйте. Advanced Tags & Prefixes 3.2.2a.tar 267.5 kB · 22 downloads I had version 3.2.2 installed, and after upgrading to PHP8.1 and version 4.7.16, the system announced after upgrading that this program is not compatible with PHP8.1 and will be disabled. I saw a version updated by @Desti to version 3.2.2a is this version updated for new PHP version ???? Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Desti Опубликовано 22 марта Поделиться Опубликовано 22 марта 3.2.2a, 4.7.16, php 8.1 - no problem. avangcom 1 Цитата Ссылка на комментарий Поделиться на другие сайты Поделиться
Рекомендуемые сообщения
Присоединяйтесь к обсуждению
Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.
Примечание: Ваш пост будет проверен модератором, прежде чем станет видимым.