CalvinK Posted May 28, 2016 Share Posted May 28, 2016 Hi there, Would it be possible please to add an option to the topic feed widget that allows me to display topics that have specific tags attached to them? At present this option is not available and in my opinion it really should be. For a possible use case - the European Championships are coming up and I would like to showcase the threads that have the tag "euro2016" attached to the topic. Thanks Link to comment Share on other sites More sharing options...
Simon Woods Posted May 29, 2016 Share Posted May 29, 2016 +1 Link to comment Share on other sites More sharing options...
BomAle Posted July 1, 2017 Share Posted July 1, 2017 This is available now? i am refer to topic feed as plugin for pages app Link to comment Share on other sites More sharing options...
PrettyPixels Posted July 1, 2017 Share Posted July 1, 2017 I really need this, too. Link to comment Share on other sites More sharing options...
kmk Posted July 2, 2017 Share Posted July 2, 2017 +1 Link to comment Share on other sites More sharing options...
BomAle Posted July 2, 2017 Share Posted July 2, 2017 i have solved with a pages php block but is not same thing /* \IPS\Content\_Widget::buildWhere OR find for tag_text OR \IPS\Content\_Controller::getSimilarContent for search along content router */ $class = 'IPS\forums\Topic'; $where = []; $tags = ['home']; $container = ['201','203']; /* Container */ if ( isset( $class::$containerNodeClass ) ) { $where[] = array( \IPS\Db::i()->in( $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['container'], $container ) ); } /* Tags */ $tagWhere = array(); $binds = array( $class::$application, $class::$module ); foreach( $tags as $tag ) { $tagWhere[] = "( tag_text LIKE CONCAT( ?, '%') )"; $binds[] = $tag; } $where[] = array( $class::$databaseColumnId . ' IN (?)', \IPS\Db::i()->select( 'tag_meta_id', 'core_tags', array( array_merge( array( 'tag_meta_app=? AND tag_meta_area=? AND (' . implode( ' OR ', $tagWhere ) . ')' ), $binds ) ) ) ); $table = new IPS\Helpers\Table\Content( $class, \IPS\Http\Url::external( \IPS\Http\Url::baseUrl().ltrim($_SERVER['PHP_SELF'],'/') ), $where, NULL, \IPS\Content\Hideable::FILTER_AUTOMATIC, 'read', FALSE ); $table->limit = 9; //.......... print table; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.