Recent Topics

1 Apr 20, 2008 00:58    

My b2evolution Version: 2.4.1

Hi.

Although according to the Calendar Widget there are posts some days, nothing comes up because they are [Type : Page]

How should it be?
The calendar not showing pages or
The calendar showing both Posts and Pages and linking to both.

I have a similar problem with the Archive widget. It shows a total of all Posts and Pages but when the link is clicked only Posts are shown .

I'm using a modified 'simple_zen' skin but it's the same in the default 'evopress'

Thanks

2 Apr 20, 2008 01:03

*moves to bugs forum*

¥

3 Apr 20, 2008 09:29

Option 1
To ensure only days with posts are highlighted in the Calendar, I suppose I need to find where the Calendar gets its info from for which days to highlight and make sure it only does it WHERE post_ptyp = 1. So if anyone can help with that for now at least there won't be a bug. But it does raise the issue of whether:

Option 2
it is intended or desired to show posts and pages when a date is chosen..

Which do the users of this forum think is the better option?

As this anomalie affects both the normal calendar and the archive one, would it be a good idea to have drop-down box to decide whether to show Posts and/or Pages?

4 Apr 20, 2008 10:21

OK : In plugins_calendar_plugin.php I have found this: lines 542 to 549 (inclusive)

$arc_sql = 'SELECT COUNT(DISTINCT '.$this->dbIDname.') AS item_count,
													EXTRACT(DAY FROM '.$this->dbprefix.'datestart) AS myday
									FROM ('.$this->dbtable.' INNER JOIN T_postcats ON '.$this->dbIDname.' = postcat_post_ID)
										INNER JOIN T_categories ON postcat_cat_ID = cat_ID
									WHERE EXTRACT(YEAR FROM '.$this->dbprefix.'datestart) = \''.$this->year.'\'
										AND EXTRACT(MONTH FROM '.$this->dbprefix.'datestart) = \''.$this->month.'\'
										'.$this->ItemQuery->get_where( ' AND ' ).'
									GROUP BY myday '.$this->ItemQuery->get_group_by( ', ' );

Does anyone know if this is where I need to make a modification?

EDIT 1

Ah yes I'm getting close. I just commented out line 551

$arc_result = $DB->get_results( $arc_sql, ARRAY_A );

and then no dated are highlighted :)


Form is loading...