×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: mod_comments (v4) does not properly select sections

mod_comments (v4) does not properly select sections 14 years 7 months ago #9711

  • Robin Molnar
  • Robin Molnar's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
When multiple instances of the mod_comments (v4) in the "Most Commented" mode are published on the same page, selecting different sections from the drop down list does not work as all instances seem to have the same section (although in their setting they all have different sections).

Workaround: this module also has an input box for multiple sections so just insert the section(s) ID(s) there (while also having a section selected in the drop down list).

mod_comments (v4) does not properly select sections 14 years 7 months ago #9713

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
v4.1 you mean :)
Could you try the following. Find the modules/mod_comment/helper.php file and go to line
54
		self::$_secids	  	= intval($params->get('secid', ''));
		if (!self::$_secids || $component!='') {
			self::$_secids = strval($params->get('secids', ''));
		}
		self::$_catids	 = intval($params->get('catid', ''));
		if (!self::$_catids || $component!='') {
			self::$_catids = strval($params->get('catids', ''));
		}
and change it to this:
		self::$_secids	  	= intval($params->get('secid', ''));
		if (!self::$_secids) {
			self::$_secids = strval($params->get('secids', ''));
		}
		self::$_catids	 = intval($params->get('catid', ''));
		if (!self::$_catids) {
			self::$_catids = strval($params->get('catids', ''));
		}

It should work like this now:
if you have selected a category for com_content, then the values in the field should not be taken in account. If you haven't selected a category, but have entered category ids, the category ids should be taken in account.
Daniel
  • Page:
  • 1
Time to create page: 0.130 seconds