Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted April 9, 201510 yr Hi All,I just upgraded from v3 to 4.0.0. All seems ok but the RSS feed used to list just 5 topics. Now it lists 25! I can't find where to change this.. does anyone know?
April 9, 201510 yr Community Expert RSS feeds generated from your forums? Or imported RSS feeds into your forums?(Whatever the answer. There are not settings for the amount of entries currently.)
April 9, 201510 yr Author RSS feeds generated by the forums. https://forums.cubecart.com/forum/1-news-announcements.xml
April 9, 201510 yr Community Expert Out of curiosity: why do you need a limit of 5? An RSS reader doesn’t really care about the number of entries, it just cares about what is new from those entries.
April 9, 201510 yr Author Because its been used in a PHP script to bring notifications into customers stores dashboards. The PHP code is hosted on thousands of stores globally and we don't have access to specify the number of entries. Since IPB 2 and IPB 3 its always been 5. IPB 4 is 25. Our customers stores now get a MASSIVE list of articles instead of just 5. I've hacked the code but I don't know how to clear the cache..
April 9, 201510 yr Because its been used in a PHP script to bring notifications into customers stores dashboards. The PHP code is hosted on thousands of stores globally and we don't have access to specify the number of entries. Since IPB 2 and IPB 3 its always been 5. IPB 4 is 25. Our customers stores now get a MASSIVE list of articles instead of just 5. I've hacked the code but I don't know how to clear the cache.. The "fix" is on my post above.
April 9, 201510 yr Author The "fix" is on my post above.Thanks for this but its not very clear."It uses the default for node items ($table), which is 25 . To change the number of items on FORUMS app RSS, open..."I fixed it myself by opening applications/forums/modules/front/forums/forums.phpI changed: $table->where[] = array( 'forums_topics.moved_to IS NULL' ); foreach ( $table->getRows( array() ) as $topic ) { if ( ! $topic->hidden() ) { $document->addItem( $topic->title, $topic->url(), $topic->content(), \IPS\DateTime::ts( $topic->last_post ), $topic->tid ); } } To: $table->where[] = array( 'forums_topics.moved_to IS NULL' ); $i=1; foreach ( $table->getRows( array() ) as $topic ) { if ( ! $topic->hidden() ) { $document->addItem( $topic->title, $topic->url(), $topic->content(), \IPS\DateTime::ts( $topic->last_post ), $topic->tid ); } if($i==5) break; $i++; } Hacky.. but works...
April 9, 201510 yr Author Infact I just improved it with; $table->where[] = array( 'forums_topics.moved_to IS NULL' ); $table->limit = 5; foreach ( $table->getRows( array() ) as $topic ) { if ( ! $topic->hidden() ) { $document->addItem( $topic->title, $topic->url(), $topic->content(), \IPS\DateTime::ts( $topic->last_post ), $topic->tid ); } } Thanks for the pointers.
Archived
This topic is now archived and is closed to further replies.